diff --git a/debian/patches/0005-build-Update-m4-gpg-error.m4.patch b/debian/patches/0005-build-Update-m4-gpg-error.m4.patch new file mode 100644 index 0000000..fa34d9e --- /dev/null +++ b/debian/patches/0005-build-Update-m4-gpg-error.m4.patch @@ -0,0 +1,111 @@ +From: NIIBE Yutaka +Date: Thu, 15 Apr 2021 14:31:49 +0900 +Subject: build: Update m4/gpg-error.m4 + +* m4/gpg-error.m4: Update from libgpg-error. + +-- + +Signed-off-by: NIIBE Yutaka +--- + m4/gpg-error.m4 | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++- + 1 file changed, 79 insertions(+), 1 deletion(-) + +diff --git a/m4/gpg-error.m4 b/m4/gpg-error.m4 +index 9d96d16..be9413d 100644 +--- a/m4/gpg-error.m4 ++++ b/m4/gpg-error.m4 +@@ -8,6 +8,8 @@ + # This file is distributed in the hope that it will be useful, but + # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the + # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ++# ++# Last-changed: 2021-03-31 + + dnl AM_PATH_GPG_ERROR([MINIMUM-VERSION, + dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]]) +@@ -28,7 +30,83 @@ AC_DEFUN([AM_PATH_GPG_ERROR], + min_gpg_error_version=ifelse([$1], ,0.0,$1) + AC_MSG_CHECKING(for GPG Error - version >= $min_gpg_error_version) + ok=no +- if test "$GPG_ERROR_CONFIG" != "no" ; then ++ ++ AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no, [$prefix/bin:$PATH]) ++ if test "$GPGRT_CONFIG" != "no"; then ++ # Determine gpgrt_libdir ++ # ++ # Get the prefix of gpgrt-config assuming it's something like: ++ # /bin/gpgrt-config ++ gpgrt_prefix=${GPGRT_CONFIG%/*/*} ++ possible_libdir1=${gpgrt_prefix}/lib ++ # Determine by using system libdir-format with CC, it's like: ++ # Normal style: /usr/lib ++ # GNU cross style: /usr//lib ++ # Debian style: /usr/lib/ ++ # Fedora/openSUSE style: /usr/lib, /usr/lib32 or /usr/lib64 ++ # It is assumed that CC is specified to the one of host on cross build. ++ if libdir_candidates=$(${CC:-cc} -print-search-dirs | \ ++ sed -n -e "/^libraries/{s/libraries: =//;s/:/\\ ++/g;p;}"); then ++ # From the output of -print-search-dirs, select valid pkgconfig dirs. ++ libdir_candidates=$(for dir in $libdir_candidates; do ++ if p=$(cd $dir 2>/dev/null && pwd); then ++ test -d "$p/pkgconfig" && echo $p; ++ fi ++ done) ++ ++ for possible_libdir0 in $libdir_candidates; do ++ # possible_libdir0: ++ # Fallback candidate, the one of system-installed (by $CC) ++ # (/usr//lib, /usr/lib/ or /usr/lib32) ++ # possible_libdir1: ++ # Another candidate, user-locally-installed ++ # (/lib) ++ # possible_libdir2 ++ # Most preferred ++ # (//lib, ++ # /lib/ or /lib32) ++ if test "${possible_libdir0##*/}" = "lib"; then ++ possible_prefix0=${possible_libdir0%/lib} ++ possible_prefix0_triplet=${possible_prefix0##*/} ++ if test -z "$possible_prefix0_triplet"; then ++ continue ++ fi ++ possible_libdir2=${gpgrt_prefix}/$possible_prefix0_triplet/lib ++ else ++ possible_prefix0=${possible_libdir0%%/lib*} ++ possible_libdir2=${gpgrt_prefix}${possible_libdir0#$possible_prefix0} ++ fi ++ if test -f ${possible_libdir2}/pkgconfig/gpg-error.pc; then ++ gpgrt_libdir=${possible_libdir2} ++ elif test -f ${possible_libdir1}/pkgconfig/gpg-error.pc; then ++ gpgrt_libdir=${possible_libdir1} ++ elif test -f ${possible_libdir0}/pkgconfig/gpg-error.pc; then ++ gpgrt_libdir=${possible_libdir0} ++ fi ++ if test -n "$gpgrt_libdir"; then break; fi ++ done ++ else ++ # When we cannot determine system libdir-format, use this: ++ gpgrt_libdir=${possible_libdir1} ++ fi ++ else ++ unset GPGRT_CONFIG ++ fi ++ ++ if test -n "$gpgrt_libdir"; then ++ GPGRT_CONFIG="$GPGRT_CONFIG --libdir=$gpgrt_libdir" ++ if $GPGRT_CONFIG gpg-error >/dev/null 2>&1; then ++ GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error" ++ AC_MSG_NOTICE([Use gpgrt-config with $gpgrt_libdir as gpg-error-config]) ++ gpg_error_config_version=`$GPG_ERROR_CONFIG --modversion` ++ else ++ unset GPGRT_CONFIG ++ fi ++ elif test "$GPG_ERROR_CONFIG" != "no"; then ++ gpg_error_config_version=`$GPG_ERROR_CONFIG --version` ++ fi ++ if test "$GPG_ERROR_CONFIG" != "no"; then + req_major=`echo $min_gpg_error_version | \ + sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` + req_minor=`echo $min_gpg_error_version | \ diff --git a/debian/patches/series b/debian/patches/series index 3d34e80..29084e1 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -2,3 +2,4 @@ 0006-Clean-up-gpa.desktop.patch 0003-Disable-scaling-also-for-cardkey-icon-in-keylist.patch 0004-Replace-use-of-the-GPGME_KEYLIST_MODE_LOCATE-alias.patch +0005-build-Update-m4-gpg-error.m4.patch