add git support to csv package system
authorJonathan Boeing <jonathan.n.boeing@gmail.com>
Mon, 28 Jun 2021 00:46:56 +0000 (17:46 -0700)
committerJonathan Boeing <jonathan.n.boeing@gmail.com>
Fri, 2 Jul 2021 04:47:56 +0000 (21:47 -0700)
.gitignore
Makefile.am
autogen.sh
configure.ac
m4/claws-mail.m4
packages/download.sh
packages/packages.current
patches/claws_mail/99-autogen.patch [new file with mode: 0755]

index 1341437c766b27203742ea3ab2722a6ed086cd36..c64ef583e9279787705be532bd4c1b6b30f98d90 100644 (file)
@@ -26,6 +26,7 @@ Makefile.in
 /packages/*.tar.xz
 /packages/*.tgz
 /packages/*.zip
+/packages/**/*
 
 /patches/icu4c-58.3/99-build.patch
 
index 8c24398dd7a51084fa90f185b74b7ddbf31f4ef2..d445e9695b45ab1dc8cfe34f52b526855f039513 100644 (file)
@@ -45,6 +45,7 @@ EXTRA_DIST = autogen.sh \
              patches/claws_mail-3.17.8/04-fclose.patch \
              patches/claws_mail-3.17.8/05-define-WIN32-for-litehtml.patch \
              patches/claws_mail-3.17.8/06-Double-buffer-row-drawing-in-gtkcmctree.patch \
+             patches/claws_mail/99-autogen.patch \
              patches/cyrus_sasl-2.1.27/01-md5-typedef.patch \
              patches/cyrus_sasl-2.1.27/02-tchar.patch \
              patches/cyrus_sasl-2.1.27/03-exports.patch \
index ea1ab247deede5e30926d65fff2318a411fdf3a2..b5d70b13cfb775a85ac71b0c1617270d386b41d0 100755 (executable)
 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
 win_rel=1
+git_revision=""
 tsdir="$(readlink -f $(dirname $0))"
 
-claws_pkg=$(ls -1 packages/claws-mail-*.*.*.tar.* | head -n 1)
-if [ -z "${claws_pkg}" ]; then
-       echo "No Claws Mail source tarball found in packages/ dir, exiting..."
-       exit 1
-fi
-
-claws_full_ver=$(basename ${claws_pkg} | sed 's/claws-mail-\(.*\)\.tar\..*/\1/')
-claws_base_ver=$(echo ${claws_full_ver} | sed 's/git.*//')
+claws_full_ver=$(grep -E "^claws_mail," packages/packages.current | cut -f 2 -d ,)
+claws_base_ver=$(echo ${claws_full_ver} | cut -f 1 -d -)
 
-if [ "$claws_full_ver" != "$claws_base_ver" ]; then
+claws_type=$(grep -E "^claws_mail," packages/packages.current | cut -f 3 -d ,)
+if [ "x${claws_type}" = "xgit" ]; then
        echo "Building a git snapshot of Claws Mail."
-       git_revision=$(echo ${claws_full_ver} | sed 's/.*\(git.*\)/\1/')
+       git_revision="git$(echo ${claws_full_ver} | cut -f 2 -d -)"
        win_rel=99
-else
-       git_revision=""
 fi
 
 printf "%s\n" "${claws_base_ver}" > ${tsdir}/VERSION
index 53c0b75328dfd728c24583e31711aa98f7f0c8dd..310de8f896bb85244eeee452ca1b285796e5764d 100644 (file)
@@ -26,13 +26,13 @@ AC_PREREQ([2.69])
 #
 # The expected Claws package filename formats are
 #   claws-mail-3.17.8.tar.xz
-#   claws-mail-3.99.0git70.tar.xz
+#   claws-mail-3.99.0-105-g88f72a.tar.xz
 #
 # VERSION contains (regular tarball)  | (git snapshot)
 # ------------------------------------------------------
 #                  3.17.8             | 3.99.0
 #                  1                  | 99
-#                                     | git70
+#                                     | git105
 
 m4_define([base_ver], m4_esyscmd_s([sed -n '1p' VERSION]))
 m4_define([win_rel], m4_esyscmd_s([sed -n '2p' VERSION]))
index 0ca5d351b062d0a4b01a3e2498f08e93254c7f9e..c3aa815108f0ec5977ef2a8509e1d989a9492805 100644 (file)
@@ -65,10 +65,21 @@ AC_DEFUN([CM_PKG],
        version=$(grep -E "^$name," packages/packages.current | cut -f 2 -d ,)
        AS_IF([test -z "$version"], AC_MSG_ERROR([could not find version for $1]))
 
-       url=$(grep -E "^$name," packages/packages.current | cut -f 3 -d ,)
-       AS_IF([test -z "$url"], AC_MSG_ERROR([could not find url for $1]))
-       file=$(basename $url)
-       AS_IF([test -z "$file"], AC_MSG_ERROR([could not find file for $1]))
+       type=$(grep -E "^$name," packages/packages.current | cut -f 3 -d ,)
+       AS_IF([test -z "$type"], AC_MSG_ERROR([could not find type for $1]))
+
+       if test "$type" = "file"; then
+               url=$(grep -E "^$name," packages/packages.current | cut -f 4 -d ,)
+               if test -z "$url"; then
+                       AC_MSG_ERROR([could not find url for $1])
+               fi
+               file=$(basename $url)
+               if test -z "$file"; then
+                       AC_MSG_ERROR([could not find file for $1])
+               fi
+       elif test "$type" = "git"; then
+               file=$name-$version.tar.xz
+       fi
 
        file=`readlink -f packages/$file`
        AS_IF([test -r "$file"],
index 318337da8047adc64e19c19c6d34d59401fc0a97..d22eddfda12c4dc1579583ddd63fd9b99a2fec65 100755 (executable)
 failed_downloads=""
 failed_hash=""
 
-while IFS=, read name version url hash
-do
+failed_download () {
+       failed_downloads="$failed_downloads $name"
+       printf "$@"
+}
+
+pkg_root="$(readlink -f $(dirname $0))"
+
+download_file () {
        file=$(basename "$url")
 
-       if [[ ! -f "$file" ]]; then
-               wget "$url"
-               if [[ $? != 0 ]]; then
-                       printf "Error while downloading %s package from %s\n" "$name" "$url"
-                       failed_downloads="$failed_downloads $name"
-                       continue
+       if [[ -f "$file" ]]; then
+               return 0
+       fi
+
+       wget "$url" || {
+               failed_download "Error while downloading %s package from %s\n" "$name" "$url"
+               return 1
+       }
+}
+
+download_git () {
+       file=${name}-${version}.tar.xz
+
+       if [[ -f "$file" ]]; then
+               return 0
+       fi
+
+       # Clone the repo if it doesn't exist
+       if [[ ! -d "$name" ]]; then
+               if [[ -n "$branch" ]]; then
+                       git clone --single-branch --branch "$branch" "$url" "$name" || {
+                               failed_download "Error cloning %s --single-branch=%s\n" "$name" "$branch"
+                               return 1
+                       }
+               else
+                       git clone "$url" "$name" || {
+                               failed_download "Error cloning %s\n" "$name"
+                               return 1
+                       }
                fi
        fi
 
+       pushd "$name" > /dev/null || exit 1
+
+       # Check if the ref already exists.  Attempt to pull if it doesn't
+       git rev-parse -q --verify "$ref^{commit}" || {
+               git pull || {
+                       failed_download "Error pulling %s\n" "$name"
+                       popd > /dev/null
+                       return 1
+               }
+
+               git rev-parse -q --verify "$ref^{commit}" || {
+                       failed_download "Did not find ref %s in repo %s after pulling\n" "$ref" "$url"
+                       popd > /dev/null
+                       return 1
+               }
+       }
+
+       # Create the archive from the ref
+       git archive --format=tar --prefix="${name}-${version}/" "$ref" | xz -z > "../${file}"
+
+       popd > /dev/null
+       return 0
+}
+
+pushd "${pkg_root}" > /dev/null || exit 1
+current=1
+total=$(sed -e '/^#/d' -e '/^$/d' packages.current | wc -l)
+
+while IFS=, read name version type url hash branch ref
+do
+       printf "\033[1mpackage %02d/%d %s\033[0m\n" "$current" "$total" "$name"
+       if [[ "$type" = "file" ]]; then
+               download_file || continue
+       elif [[ "$type" = "git" ]]; then
+               download_git || continue
+       else
+               printf "Bad package type %s for package %s\n" "$type" "$name"
+               exit 1
+       fi
+
        printf "%s *%s" "$hash" "$file" | sha256sum -c
        if [[ $? != 0 ]]; then
                printf "Error while checking sha256sum for %s package\n" "$name"
                failed_hash="$failed_hash $name"
        fi
+
+       (( current++ ))
+
 done < <(sed -e '/^#/d' -e '/^$/d' packages.current)
 
 if [[ -n "$failed_downloads" ]]; then
-       printf "\nFailed to download these packages: %s\n" "$failed_downloads"
+       printf "\nError: Failed to download these packages: %s\n" "$failed_downloads"
 fi
 
 if [[ -n "$failed_hash" ]]; then
-       printf "\nSHA256 verification failed for these packages: %s\n" "$failed_hash"
+       printf "\nError: SHA256 verification failed for these packages: %s\n" "$failed_hash"
 fi
 
+popd > /dev/null
+
index 050ff0fd95cc036e93a7da9422a49a384e816a0a..60f7fe08769fdfa0ff25ce4c3b6b433b26cc4766 100644 (file)
@@ -1,77 +1,77 @@
-# package name,version,url,sha256 hash
+# package name,version,type,url,sha256 hash,branch,ref
 
-claws_mail,3.17.8,https://www.claws-mail.org/releases/claws-mail-3.17.8.tar.xz,cdb7b2814995d6f4a9c3b1f0bc1467ed5c3cf2a5e0da1730aaa25a8accafddaf
+claws_mail,3.17.8,file,https://www.claws-mail.org/releases/claws-mail-3.17.8.tar.xz,cdb7b2814995d6f4a9c3b1f0bc1467ed5c3cf2a5e0da1730aaa25a8accafddaf,,
 
-gettext,0.21,https://ftp.gnu.org/pub/gnu/gettext/gettext-0.21.tar.xz,d20fcbb537e02dcf1383197ba05bd0734ef7bf5db06bdb241eb69b7d16b73192
-libiconv,1.16,https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.16.tar.gz,e6a1b1b589654277ee790cce3734f07876ac4ccfaecbee8afa0b649cf529cc04
-libtasn1,4.17.0,https://ftp.gnu.org/pub/gnu/libtasn1/libtasn1-4.17.0.tar.gz,ece7551cea7922b8e10d7ebc70bc2248d1fdd73351646a2d6a8d68a9421c45a5
-nettle,3.7.3,https://ftp.gnu.org/pub/gnu/nettle/nettle-3.7.3.tar.gz,661f5eb03f048a3b924c3a8ad2515d4068e40f67e774e8a26827658007e3bcf0
+gettext,0.21,file,https://ftp.gnu.org/pub/gnu/gettext/gettext-0.21.tar.xz,d20fcbb537e02dcf1383197ba05bd0734ef7bf5db06bdb241eb69b7d16b73192,,
+libiconv,1.16,file,https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.16.tar.gz,e6a1b1b589654277ee790cce3734f07876ac4ccfaecbee8afa0b649cf529cc04,,
+libtasn1,4.17.0,file,https://ftp.gnu.org/pub/gnu/libtasn1/libtasn1-4.17.0.tar.gz,ece7551cea7922b8e10d7ebc70bc2248d1fdd73351646a2d6a8d68a9421c45a5,,
+nettle,3.7.3,file,https://ftp.gnu.org/pub/gnu/nettle/nettle-3.7.3.tar.gz,661f5eb03f048a3b924c3a8ad2515d4068e40f67e774e8a26827658007e3bcf0,,
 
-zlib,1.2.11,https://zlib.net/zlib-1.2.11.tar.gz,c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1
+zlib,1.2.11,file,https://zlib.net/zlib-1.2.11.tar.gz,c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1,,
 
-gmp,6.2.1,https://gmplib.org/download/gmp/gmp-6.2.1.tar.xz,fd4829912cddd12f84181c3451cc752be224643e87fac497b69edddadc49b4f2
+gmp,6.2.1,file,https://gmplib.org/download/gmp/gmp-6.2.1.tar.xz,fd4829912cddd12f84181c3451cc752be224643e87fac497b69edddadc49b4f2,,
 
-gnutls,3.6.16,https://www.gnupg.org/ftp/gcrypt/gnutls/v3.6/gnutls-3.6.16.tar.xz,1b79b381ac283d8b054368b335c408fedcb9b7144e0c07f531e3537d4328f3b3
+gnutls,3.6.16,file,https://www.gnupg.org/ftp/gcrypt/gnutls/v3.6/gnutls-3.6.16.tar.xz,1b79b381ac283d8b054368b335c408fedcb9b7144e0c07f531e3537d4328f3b3,,
 
-expat,2.4.1,https://github.com/libexpat/libexpat/releases/download/R_2_4_1/expat-2.4.1.tar.xz,cf032d0dba9b928636548e32b327a2d66b1aab63c4f4a13dd132c2d1d2f2fb6a
+expat,2.4.1,file,https://github.com/libexpat/libexpat/releases/download/R_2_4_1/expat-2.4.1.tar.xz,cf032d0dba9b928636548e32b327a2d66b1aab63c4f4a13dd132c2d1d2f2fb6a,,
 
-libetpan,1.9.4,https://www.claws-mail.org/win32/libetpan-1.9.4.tar.gz,82ec8ea11d239c9967dbd1717cac09c8330a558e025b3e4dc6a7594e80d13bb1
-regex,20090805,https://www.claws-mail.org/win32/regex-20090805.tar.gz,199bbf3fca3bcee826b10d718f556485c3e1d031af21252ed58a8cb83cf3b493
-bsfilter,1.0.16,https://www.claws-mail.org/win32/bsfilter-1.0.16-bin.tar.gz,d95938a0af1a55f69d0f24d500b663529af122a651a06e0eb046b44064f37d85
-ytnef,1.9.3,https://www.claws-mail.org/win32/ytnef-1.9.3.tar.gz,41a0033bde33c86a7e4aa4e14bb822dd03084098638e7d6557263e47e80b4f4f
-cyrus_sasl,2.1.27,https://www.claws-mail.org/win32/cyrus-sasl-2.1.27.tar.gz,26866b1549b00ffd020f188a43c258017fa1c382b3ddadd8201536f72efb05d5
+libetpan,1.9.4,file,https://www.claws-mail.org/win32/libetpan-1.9.4.tar.gz,82ec8ea11d239c9967dbd1717cac09c8330a558e025b3e4dc6a7594e80d13bb1,,
+regex,20090805,file,https://www.claws-mail.org/win32/regex-20090805.tar.gz,199bbf3fca3bcee826b10d718f556485c3e1d031af21252ed58a8cb83cf3b493,,
+bsfilter,1.0.16,file,https://www.claws-mail.org/win32/bsfilter-1.0.16-bin.tar.gz,d95938a0af1a55f69d0f24d500b663529af122a651a06e0eb046b44064f37d85,,
+ytnef,1.9.3,file,https://www.claws-mail.org/win32/ytnef-1.9.3.tar.gz,41a0033bde33c86a7e4aa4e14bb822dd03084098638e7d6557263e47e80b4f4f,,
+cyrus_sasl,2.1.27,file,https://www.claws-mail.org/win32/cyrus-sasl-2.1.27.tar.gz,26866b1549b00ffd020f188a43c258017fa1c382b3ddadd8201536f72efb05d5,,
 
-jpeg,9d,https://ijg.org/files/jpegsrc.v9d.tar.gz,6c434a3be59f8f62425b2e3c077e785c9ce30ee5874ea1c270e843f273ba71ee
+jpeg,9d,file,https://ijg.org/files/jpegsrc.v9d.tar.gz,6c434a3be59f8f62425b2e3c077e785c9ce30ee5874ea1c270e843f273ba71ee,,
 
-curl,7.77.0,https://curl.se/download/curl-7.77.0.tar.xz,0f64582c54282f31c0de9f0a1a596b182776bd4df9a4c4a2a41bbeb54f62594b
+curl,7.77.0,file,https://curl.se/download/curl-7.77.0.tar.xz,0f64582c54282f31c0de9f0a1a596b182776bd4df9a4c4a2a41bbeb54f62594b,,
 
-libxml2,2.9.12,ftp://xmlsoft.org/libxml2/libxml2-2.9.12.tar.gz,c8d6681e38c56f172892c85ddc0852e1fd4b53b4209e7f4ebf17f7e2eae71d92
-libxslt,1.1.34,ftp://xmlsoft.org/libxml2/libxslt-1.1.34.tar.gz,98b1bd46d6792925ad2dfe9a87452ea2adebf69dcb9919ffd55bf926a7f93f7f
+libxml2,2.9.12,file,ftp://xmlsoft.org/libxml2/libxml2-2.9.12.tar.gz,c8d6681e38c56f172892c85ddc0852e1fd4b53b4209e7f4ebf17f7e2eae71d92,,
+libxslt,1.1.34,file,ftp://xmlsoft.org/libxml2/libxslt-1.1.34.tar.gz,98b1bd46d6792925ad2dfe9a87452ea2adebf69dcb9919ffd55bf926a7f93f7f,,
 
-enchant,2.2.15,https://github.com/AbiWord/enchant/releases/download/v2.2.15/enchant-2.2.15.tar.gz,3b0f2215578115f28e2a6aa549b35128600394304bd79d6f28b0d3b3d6f46c03
-hunspell,1.7.0,https://github.com/hunspell/hunspell/files/2573619/hunspell-1.7.0.tar.gz,57be4e03ae9dd62c3471f667a0d81a14513e314d4d92081292b90435944ff951
+enchant,2.2.15,file,https://github.com/AbiWord/enchant/releases/download/v2.2.15/enchant-2.2.15.tar.gz,3b0f2215578115f28e2a6aa549b35128600394304bd79d6f28b0d3b3d6f46c03,,
+hunspell,1.7.0,file,https://github.com/hunspell/hunspell/files/2573619/hunspell-1.7.0.tar.gz,57be4e03ae9dd62c3471f667a0d81a14513e314d4d92081292b90435944ff951,,
 
-sqlite,3.35.5,https://sqlite.org/2021/sqlite-autoconf-3350500.tar.gz,f52b72a5c319c3e516ed7a92e123139a6e87af08a2dc43d7757724f6132e6db0
+sqlite,3.35.5,file,https://sqlite.org/2021/sqlite-autoconf-3350500.tar.gz,f52b72a5c319c3e516ed7a92e123139a6e87af08a2dc43d7757724f6132e6db0,,
 
-libpsl,0.21.1,https://github.com/rockdaboot/libpsl/releases/download/0.21.1/libpsl-0.21.1.tar.gz,ac6ce1e1fbd4d0254c4ddb9d37f1fa99dec83619c1253328155206b896210d4c
+libpsl,0.21.1,file,https://github.com/rockdaboot/libpsl/releases/download/0.21.1/libpsl-0.21.1.tar.gz,ac6ce1e1fbd4d0254c4ddb9d37f1fa99dec83619c1253328155206b896210d4c,,
 
-glib,2.66.8,https://download.gnome.org/sources/glib/2.66/glib-2.66.8.tar.xz,97bc87dd91365589af5cbbfea2574833aea7a1b71840fd365ecd2852c76b9c8b
-gtk,2.24.33,https://download.gnome.org/sources/gtk+/2.24/gtk+-2.24.33.tar.xz,ac2ac757f5942d318a311a54b0c80b5ef295f299c2a73c632f6bfb1ff49cc6da
-gdk_pixbuf,2.42.6,https://download.gnome.org/sources/gdk-pixbuf/2.42/gdk-pixbuf-2.42.6.tar.xz,c4a6b75b7ed8f58ca48da830b9fa00ed96d668d3ab4b1f723dcf902f78bde77f
-pango,1.48.5,https://download.gnome.org/sources/pango/1.48/pango-1.48.5.tar.xz,501e74496173c02dcd024ded7fbb3f09efd37e2a488e248aa40799424dbb3b2a
-atk,2.36.0,https://download.gnome.org/sources/atk/2.36/atk-2.36.0.tar.xz,fb76247e369402be23f1f5c65d38a9639c1164d934e40f6a9cf3c9e96b652788
-glib_networking,2.66.0,https://download.gnome.org/sources/glib-networking/2.66/glib-networking-2.66.0.tar.xz,c5d7be2437fdd196eebfb70c4517b96d3ba7ec13bd496318b8f02dea383e0099
-libsoup,2.72.0,https://download.gnome.org/sources/libsoup/2.72/libsoup-2.72.0.tar.xz,170c3f8446b0f65f8e4b93603349172b1085fb8917c181d10962f02bb85f5387
+glib,2.66.8,file,https://download.gnome.org/sources/glib/2.66/glib-2.66.8.tar.xz,97bc87dd91365589af5cbbfea2574833aea7a1b71840fd365ecd2852c76b9c8b,,
+gtk,2.24.33,file,https://download.gnome.org/sources/gtk+/2.24/gtk+-2.24.33.tar.xz,ac2ac757f5942d318a311a54b0c80b5ef295f299c2a73c632f6bfb1ff49cc6da,,
+gdk_pixbuf,2.42.6,file,https://download.gnome.org/sources/gdk-pixbuf/2.42/gdk-pixbuf-2.42.6.tar.xz,c4a6b75b7ed8f58ca48da830b9fa00ed96d668d3ab4b1f723dcf902f78bde77f,,
+pango,1.48.5,file,https://download.gnome.org/sources/pango/1.48/pango-1.48.5.tar.xz,501e74496173c02dcd024ded7fbb3f09efd37e2a488e248aa40799424dbb3b2a,,
+atk,2.36.0,file,https://download.gnome.org/sources/atk/2.36/atk-2.36.0.tar.xz,fb76247e369402be23f1f5c65d38a9639c1164d934e40f6a9cf3c9e96b652788,,
+glib_networking,2.66.0,file,https://download.gnome.org/sources/glib-networking/2.66/glib-networking-2.66.0.tar.xz,c5d7be2437fdd196eebfb70c4517b96d3ba7ec13bd496318b8f02dea383e0099,,
+libsoup,2.72.0,file,https://download.gnome.org/sources/libsoup/2.72/libsoup-2.72.0.tar.xz,170c3f8446b0f65f8e4b93603349172b1085fb8917c181d10962f02bb85f5387,,
 
-fribidi,1.0.10,https://github.com/fribidi/fribidi/releases/download/v1.0.10/fribidi-1.0.10.tar.xz,7f1c687c7831499bcacae5e8675945a39bacbad16ecaa945e9454a32df653c01
+fribidi,1.0.10,file,https://github.com/fribidi/fribidi/releases/download/v1.0.10/fribidi-1.0.10.tar.xz,7f1c687c7831499bcacae5e8675945a39bacbad16ecaa945e9454a32df653c01,,
 
-harfbuzz,2.8.1,https://github.com/harfbuzz/harfbuzz/releases/download/2.8.1/harfbuzz-2.8.1.tar.xz,4124f663ec4bf4e294d9cf230668370b4249a48ff34deaf0f06e8fc82d891300
+harfbuzz,2.8.1,file,https://github.com/harfbuzz/harfbuzz/releases/download/2.8.1/harfbuzz-2.8.1.tar.xz,4124f663ec4bf4e294d9cf230668370b4249a48ff34deaf0f06e8fc82d891300,,
 
-cairo,1.17.4,https://cairographics.org/snapshots/cairo-1.17.4.tar.xz,74b24c1ed436bbe87499179a3b27c43f4143b8676d8ad237a6fa787401959705
-pixman,0.40.0,https://cairographics.org/releases/pixman-0.40.0.tar.gz,6d200dec3740d9ec4ec8d1180e25779c00bc749f94278c8b9021f5534db223fc
+cairo,1.17.4,file,https://cairographics.org/snapshots/cairo-1.17.4.tar.xz,74b24c1ed436bbe87499179a3b27c43f4143b8676d8ad237a6fa787401959705,,
+pixman,0.40.0,file,https://cairographics.org/releases/pixman-0.40.0.tar.gz,6d200dec3740d9ec4ec8d1180e25779c00bc749f94278c8b9021f5534db223fc,,
 
-freetype,2.10.4,https://download.savannah.gnu.org/releases/freetype/freetype-2.10.4.tar.xz,86a854d8905b19698bbc8f23b860bc104246ce4854dcea8e3b0fb21284f75784
+freetype,2.10.4,file,https://download.savannah.gnu.org/releases/freetype/freetype-2.10.4.tar.xz,86a854d8905b19698bbc8f23b860bc104246ce4854dcea8e3b0fb21284f75784,,
 
-fontconfig,2.13.93,https://www.freedesktop.org/software/fontconfig/release/fontconfig-2.13.93.tar.xz,ea968631eadc5739bc7c8856cef5c77da812d1f67b763f5e51b57b8026c1a0a0
+fontconfig,2.13.93,file,https://www.freedesktop.org/software/fontconfig/release/fontconfig-2.13.93.tar.xz,ea968631eadc5739bc7c8856cef5c77da812d1f67b763f5e51b57b8026c1a0a0,,
 
-libpng,1.6.37,https://downloads.sourceforge.net/project/libpng/libpng16/1.6.37/libpng-1.6.37.tar.xz,505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201fc80868d88ca
+libpng,1.6.37,file,https://downloads.sourceforge.net/project/libpng/libpng16/1.6.37/libpng-1.6.37.tar.xz,505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201fc80868d88ca,,
 
-libffi,3.3,https://mirrors.kernel.org/sourceware/libffi/libffi-3.3.tar.gz,72fba7922703ddfa7a028d513ac15a85c8d54c8d67f55fa5a4802885dc652056
+libffi,3.3,file,https://mirrors.kernel.org/sourceware/libffi/libffi-3.3.tar.gz,72fba7922703ddfa7a028d513ac15a85c8d54c8d67f55fa5a4802885dc652056,,
 
-w32pth,2.0.5,ftp://ftp.g10code.com/g10code/w32pth/w32pth-2.0.5.tar.bz2,5e462d06ed50e9e961546ab5264258e606b101860a74c1e410d086432ec27a06
+w32pth,2.0.5,file,ftp://ftp.g10code.com/g10code/w32pth/w32pth-2.0.5.tar.bz2,5e462d06ed50e9e961546ab5264258e606b101860a74c1e410d086432ec27a06,,
 
-bzip2,1.0.8,https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz,ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269
+bzip2,1.0.8,file,https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz,ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269,,
 
-libgpg_error,1.42,https://gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-1.42.tar.bz2,fc07e70f6c615f8c4f590a8e37a9b8dd2e2ca1e9408f8e60459c67452b925e23
-libassuan,2.5.5,https://gnupg.org/ftp/gcrypt/libassuan/libassuan-2.5.5.tar.bz2,8e8c2fcc982f9ca67dcbb1d95e2dc746b1739a4668bc20b3a3c5be632edb34e4
-gpgme,1.15.1,https://gnupg.org/ftp/gcrypt/gpgme/gpgme-1.15.1.tar.bz2,eebc3c1b27f1c8979896ff361ba9bb4778b508b2496c2fc10e3775a40b1de1ad
+libgpg_error,1.42,file,https://gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-1.42.tar.bz2,fc07e70f6c615f8c4f590a8e37a9b8dd2e2ca1e9408f8e60459c67452b925e23,,
+libassuan,2.5.5,file,https://gnupg.org/ftp/gcrypt/libassuan/libassuan-2.5.5.tar.bz2,8e8c2fcc982f9ca67dcbb1d95e2dc746b1739a4668bc20b3a3c5be632edb34e4,,
+gpgme,1.15.1,file,https://gnupg.org/ftp/gcrypt/gpgme/gpgme-1.15.1.tar.bz2,eebc3c1b27f1c8979896ff361ba9bb4778b508b2496c2fc10e3775a40b1de1ad,,
 
-libwebp,1.2.0,https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.2.0.tar.gz,2fc8bbde9f97f2ab403c0224fb9ca62b2e6852cbc519e91ceaa7c153ffd88a0c
+libwebp,1.2.0,file,https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.2.0.tar.gz,2fc8bbde9f97f2ab403c0224fb9ca62b2e6852cbc519e91ceaa7c153ffd88a0c,,
 
-icu4c,58.3,https://github.com/unicode-org/icu/releases/download/release-58-3/icu4c-58_3-src.tgz,2680f3c547cd26cba1d7ebd819cd336ff92cf444a270e195fd3b10bfdf22276c
+icu4c,58.3,file,https://github.com/unicode-org/icu/releases/download/release-58-3/icu4c-58_3-src.tgz,2680f3c547cd26cba1d7ebd819cd336ff92cf444a270e195fd3b10bfdf22276c,,
 
-webkitgtk,2.4.11,https://webkitgtk.org/releases/webkitgtk-2.4.11.tar.xz,588aea051bfbacced27fdfe0335a957dca839ebe36aa548df39c7bbafdb65bf7
+webkitgtk,2.4.11,file,https://webkitgtk.org/releases/webkitgtk-2.4.11.tar.xz,588aea051bfbacced27fdfe0335a957dca839ebe36aa548df39c7bbafdb65bf7,,
 
-libical,3.0.10,https://github.com/libical/libical/releases/download/v3.0.10/libical-3.0.10.tar.gz,f933b3e6cf9d56a35bb5625e8e4a9c3a50239a85aea05ed842932c1a1dc336b4
+libical,3.0.10,file,https://github.com/libical/libical/releases/download/v3.0.10/libical-3.0.10.tar.gz,f933b3e6cf9d56a35bb5625e8e4a9c3a50239a85aea05ed842932c1a1dc336b4,,
 
-gumbo_parser,0.10.1,https://github.com/google/gumbo-parser/archive/v0.10.1.tar.gz,28463053d44a5dfbc4b77bcf49c8cee119338ffa636cc17fc3378421d714efad
+gumbo_parser,0.10.1,file,https://github.com/google/gumbo-parser/archive/v0.10.1.tar.gz,28463053d44a5dfbc4b77bcf49c8cee119338ffa636cc17fc3378421d714efad,,
diff --git a/patches/claws_mail/99-autogen.patch b/patches/claws_mail/99-autogen.patch
new file mode 100755 (executable)
index 0000000..ade4c32
--- /dev/null
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+packages="$(readlink -f $(dirname $0)/../../packages/packages.current)"
+
+claws_type=$(grep -E "^claws_mail," ${packages} | cut -f 3 -d ,)
+if [ "x${claws_type}" != "xgit" ]; then
+       exit 0
+fi
+
+# The claws-mail autogen.sh script expects the 'version' file to contain
+# the output from 'git describe --abbrev=6' when building a git snapshot
+
+claws_full_ver=$(grep -E "^claws_mail," ${packages} | cut -f 2 -d ,)
+if [ -z "$claws_full_ver" ]; then
+       printf "Failed to read claws package version from packages file\n"
+       exit 1
+fi
+
+echo "echo ${claws_full_ver}" > version
+
+NOCONFIGURE=1 ./autogen.sh
+