[git] GPG-ERROR - branch, master, updated. libgpg-error-1.32-30-g40e22c7

by NIIBE Yutaka cvs at cvs.gnupg.org
Tue Oct 23 05:47:51 CEST 2018


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  40e22c774afebca23fdaa6dec2b8698572501c32 (commit)
      from  12b834ba59ae2f3cd0568e4cfa1dca47fc41269a (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 40e22c774afebca23fdaa6dec2b8698572501c32
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Tue Oct 23 11:50:45 2018 +0900

    gpg-error-config: Fix cross build support.
    
    * configure.ac: Fix regexp matching multiarch environment.
    * src/gpg-error-config-new.in: Support standard cross build.
    Handle the case where $multiarch != $triplet.
    
    --
    
    For standard cross build, use @exec_prefix@/$triplet/lib/pkgconfig.
    
    Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>

diff --git a/configure.ac b/configure.ac
index 52966b9..25719d4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -651,7 +651,7 @@ AC_ARG_ENABLE([tests], AC_HELP_STRING([--disable-tests],
                      build_tests=$enableval, build_tests=yes)
 AM_CONDITIONAL([BUILD_TESTS], [test "x$build_tests" != xno])
 
-if expr $libdir : "/$host\$" >/dev/null; then
+if expr $libdir : ".*/$host_alias\$" >/dev/null; then
   # Looks like it's multiarch, then,
   # let the script detect host architecture at runtime
   pkg_config_libdir=auto
diff --git a/src/gpg-error-config-new.in b/src/gpg-error-config-new.in
index 0ccf55a..b8b7328 100644
--- a/src/gpg-error-config-new.in
+++ b/src/gpg-error-config-new.in
@@ -12,21 +12,48 @@
 
 prefix=@prefix@
 exec_prefix=@exec_prefix@
-pkg_config_libdir=${PKG_CONFIG_LIBDIR:- at pkg_config_libdir@}
-if [ "$pkg_config_libdir" = auto ]; then
-    # "auto" supports multiarch environment
+pkg_config_libdir=@pkg_config_libdir@
+if [ x"${PKG_CONFIG_LIBDIR+set}" = x ]; then
+    # If PKG_CONFIG_LIBDIR is not specified, detect the directory.
+
+    # We supports standard cross build with $CC
     triplet=""
     case "$CC" in
 	*-*-*) triplet=${CC%-*} ;;
 	*) ;;
     esac
-    if [ -z "$triplet" ]; then
-	triplet=$(gcc -dumpmachine)
+    if [ "$pkg_config_libdir" = auto ]; then
+	# It's multiarch environment.
+	# It may be standard cross build, native multiarch build, or
+	# multiarch-cross build
+	multiarch=""
+	if [ -n "$triplet" ]; then
+	    triplet1=$triplet
+	else
+	    triplet1=$(gcc -dumpmachine)
+	fi
+	# Follow existing practice for multiarch name
+	if expr $triplet1 : "^i[4567]86-" >/dev/null; then
+	    multiarch="i386-${triplet1#*-}"
+	else
+	    multiarch=$triplet1
+	fi
+	if [ -n "$triplet" ]; then
+	    PKG_CONFIG_LIBDIR="@exec_prefix@/$triplet/lib/pkgconfig:@exec_prefix@/lib/$multiarch/pkgconfig"
+	else
+	    PKG_CONFIG_LIBDIR="@exec_prefix@/lib/$multiarch/pkgconfig"
+	fi
+	unset multiarch triplet1
+    elif [ -n "$triplet" ]; then
+	# It's cross build
+	PKG_CONFIG_LIBDIR="@exec_prefix@/$triplet/lib/pkgconfig"
+    else
+	# Native build in standard (non-multiarch) environment
+	PKG_CONFIG_LIBDIR="$pkg_config_libdir"
     fi
-    pkg_config_libdir=@exec_prefix@/lib/$triplet/pkgconfig
     unset triplet
 fi
-PKG_CONFIG_PATH="$PKG_CONFIG_PATH${PKG_CONFIG_PATH:+:}$pkg_config_libdir"
+PKG_CONFIG_PATH="$PKG_CONFIG_PATH${PKG_CONFIG_PATH:+:}$PKG_CONFIG_LIBDIR"
 #
 
 #### start of functions for this script

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

Summary of changes:
 configure.ac                |  2 +-
 src/gpg-error-config-new.in | 41 ++++++++++++++++++++++++++++++++++-------
 2 files changed, 35 insertions(+), 8 deletions(-)


hooks/post-receive
-- 
Error codes used by GnuPG et al.
http://git.gnupg.org




More information about the Gnupg-commits mailing list