[git] GPG-ERROR - branch, master, updated. libgpg-error-1.32-28-g91bcb2c

[email protected] (by NIIBE Yutaka)
Newsgroups gmane.comp.encryption.gpg.cvs
Message-ID <[email protected]>
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Error codes used by GnuPG et al.".

The branch, master has been updated
       via  91bcb2c7d824de50c7dfedd4490e515ddb5dfc5a (commit)
      from  6d2e0546d50a0d4511fb7167566bfd0058a68f38 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 91bcb2c7d824de50c7dfedd4490e515ddb5dfc5a
Author: NIIBE Yutaka <[email protected]>
Date:   Mon Oct 22 10:17:48 2018 +0900

    gpg-error-config: Support "auto", architecture independent script.
    
    * configure.ac (pkg_config_libdir): Set it "auto" when it looks
    multiarch environment.
    * src/gpg-error-config-new.in: Automatically detects the triplet.
    
    --
    
    The triplet detection mechanism is not sufficient.  It's up to
    distributions to apply more changes (in distribution specific way).
    
    Signed-off-by: NIIBE Yutaka <[email protected]>

diff --git a/configure.ac b/configure.ac
index f6078ae..52966b9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -651,7 +651,13 @@ AC_ARG_ENABLE([tests], AC_HELP_STRING([--disable-tests],
                      build_tests=$enableval, build_tests=yes)
 AM_CONDITIONAL([BUILD_TESTS], [test "x$build_tests" != xno])
 
-pkg_config_libdir=$libdir/pkgconfig
+if expr $libdir : "/$host\$" >/dev/null; then
+  # Looks like it's multiarch, then,
+  # let the script detect host architecture at runtime
+  pkg_config_libdir=auto
+else
+  pkg_config_libdir=$libdir/pkgconfig
+fi
 AC_SUBST(pkg_config_libdir)
 #
 # Substitution
diff --git a/src/gpg-error-config-new.in b/src/gpg-error-config-new.in
index 442b95a..0ccf55a 100644
--- a/src/gpg-error-config-new.in
+++ b/src/gpg-error-config-new.in
@@ -13,6 +13,19 @@
 prefix=@prefix@
 exec_prefix=@exec_prefix@
 pkg_config_libdir=${PKG_CONFIG_LIBDIR:-@pkg_config_libdir@}
+if [ "$pkg_config_libdir" = auto ]; then
+    # "auto" supports multiarch environment
+    triplet=""
+    case "$CC" in
+	*-*-*) triplet=${CC%-*} ;;
+	*) ;;
+    esac
+    if [ -z "$triplet" ]; then
+	triplet=$(gcc -dumpmachine)
+    fi
+    pkg_config_libdir=@exec_prefix@/lib/$triplet/pkgconfig
+    unset triplet
+fi
 PKG_CONFIG_PATH="$PKG_CONFIG_PATH${PKG_CONFIG_PATH:+:}$pkg_config_libdir"
 #
 

-----------------------------------------------------------------------

Summary of changes:
 configure.ac                |  8 +++++++-
 src/gpg-error-config-new.in | 13 +++++++++++++
 2 files changed, 20 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
Error codes used by GnuPG et al.
http://git.gnupg.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.