[git] GPG-ERROR - branch, gniibe/pkg-config-support, updated. libgpg-error-1.32-26-g1b025ca

by NIIBE Yutaka cvs at cvs.gnupg.org
Tue Sep 4 03:52:43 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, gniibe/pkg-config-support has been updated
       via  1b025ca89b58cb630530084c49e40166e4a8e089 (commit)
       via  6bca1ddc29a70a4efa9ea874f8bbb64772470842 (commit)
       via  129e75fabd4a97832296ad2677de79bc61fb1ce0 (commit)
      from  a2cb8c2451d9df5bded10d767eec263cd2739e0a (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 1b025ca89b58cb630530084c49e40166e4a8e089
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Tue Sep 4 10:43:29 2018 +0900

    Fix configure time check for includedir and libdir.

diff --git a/configure.ac b/configure.ac
index ad78677..8389b67 100644
--- a/configure.ac
+++ b/configure.ac
@@ -494,12 +494,37 @@ else
   GPG_ERROR_CONFIG_MT_CFLAGS=""
 fi
 GPG_ERROR_CONFIG_HOST="$host"
+
 case "$includedir" in
   /usr/include|/include) ;;
-  *) GPG_ERROR_CONFIG_CFLAGS="-I$includedir $GPG_ERROR_CONFIG_CFLAGS" ;;
+  '${prefix}/include')
+    if test "$prefix" != / -a "$prefix" != /usr; then
+      if test -z "$GPG_ERROR_CONFIG_CFLAGS"; then
+        GPG_ERROR_CONFIG_CFLAGS="-I$includedir"
+      else
+        GPG_ERROR_CONFIG_CFLAGS="-I$includedir $GPG_ERROR_CONFIG_CFLAGS"
+      fi
+    fi
+    ;;
+  *)
+    if test -z "$GPG_ERROR_CONFIG_CFLAGS"; then
+      GPG_ERROR_CONFIG_CFLAGS="-I$includedir"
+    else
+      GPG_ERROR_CONFIG_CFLAGS="-I$includedir $GPG_ERROR_CONFIG_CFLAGS"
+    fi
+    ;;
 esac
 case "$libdir" in
   /usr/lib|/usr/lib64|/lib|/lib64) ;;
+  '${exec_prefix}/lib')
+    if test "$exec_prefix" = "NONE"; then
+      if test "$prefix" != / -a "$prefix" != /usr; then
+        GPG_ERROR_CONFIG_LIBS="-L$libdir $GPG_ERROR_CONFIG_LIBS"
+      fi
+    elif test "$exec_prefix" != / -a "$exec_prefix" != /usr; then
+      GPG_ERROR_CONFIG_LIBS="-L$libdir $GPG_ERROR_CONFIG_LIBS"
+    fi
+    ;;
   *) GPG_ERROR_CONFIG_LIBS="-L$libdir $GPG_ERROR_CONFIG_LIBS" ;;
 esac
 
@@ -509,6 +534,7 @@ AC_SUBST(GPG_ERROR_CONFIG_MT_LIBS)
 AC_SUBST(GPG_ERROR_CONFIG_MT_CFLAGS)
 AC_SUBST(GPG_ERROR_CONFIG_HOST)
 
+
 #
 # Special defines for certain platforms
 #
diff --git a/src/Makefile.am b/src/Makefile.am
index 04b8fb6..d631ee2 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -336,12 +336,14 @@ gpgrt-config: gpg-error-config
 	cp gpg-error-config gpgrt-config
 
 gpg-error-config: gpg-error-config-new gpg-error-config-old
-	@echo "Confirm gpg-error-config works"
+	@echo "Confirm gpg-error-config works... "
 	@if $(srcdir)/gpg-error-config-test.sh --old-new; then \
-	  cp gpg-error-config-new $@;               \
-	else                                        \
-	  echo "***  New gpg-error-config doesn't work on this machine, please report to <https://bugs.gnupg.org>"; \
-	  cp gpg-error-config-old $@;               \
+	  echo "good";                                         \
+	  cp gpg-error-config-new $@;                          \
+	else                                                   \
+	  echo "no";                                           \
+	  echo "***  Please report to <https://bugs.gnupg.org> with gpg-error-config-test.log"; \
+	  cp gpg-error-config-old $@;                          \
 	fi
 
 install-data-local:

commit 6bca1ddc29a70a4efa9ea874f8bbb64772470842
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Tue Sep 4 09:39:23 2018 +0900

    Add gpg-error-config to CLEANFILES.

diff --git a/src/Makefile.am b/src/Makefile.am
index 81be641..04b8fb6 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -116,7 +116,7 @@ CLEANFILES = err-sources.h err-codes.h code-to-errno.h code-from-errno.h \
         mkerrcodes$(EXEEXT_FOR_BUILD) mkerrcodes.h gpg-error.def mkw32errmap.tab.h \
 	mkw32errmap.map.c err-sources-sym.h err-codes-sym.h errnos-sym.h \
 	gpg-extra/errno.h mkheader$(EXEEXT_FOR_BUILD) \
-	gpg-error-config-test.log \
+	gpg-error-config gpg-error-config-test.log \
 	$(tmp_files) lock-obj-pub.native.h
 
 TESTS = gpg-error-config-test.sh

commit 129e75fabd4a97832296ad2677de79bc61fb1ce0
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Tue Sep 4 09:34:56 2018 +0900

    Extend gpg-error-config-test.sh to test against pkg-config.

diff --git a/src/Makefile.am b/src/Makefile.am
index 69cc487..81be641 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -102,6 +102,7 @@ EXTRA_DIST = mkstrtable.awk err-sources.h.in err-codes.h.in \
 	gpg-error.m4 gpgrt.m4 \
 	gpg-error.vers gpg-error.def.in \
         versioninfo.rc.in gpg-error.w32-manifest.in \
+	gpg-error-config-test.sh \
 	$(lock_obj_pub)
 
 BUILT_SOURCES = err-sources.h err-codes.h code-to-errno.h code-from-errno.h \
@@ -114,7 +115,11 @@ CLEANFILES = err-sources.h err-codes.h code-to-errno.h code-from-errno.h \
 	gpg-error.h gpgrt.h gpgrt-config \
         mkerrcodes$(EXEEXT_FOR_BUILD) mkerrcodes.h gpg-error.def mkw32errmap.tab.h \
 	mkw32errmap.map.c err-sources-sym.h err-codes-sym.h errnos-sym.h \
-	gpg-extra/errno.h mkheader$(EXEEXT_FOR_BUILD) $(tmp_files) lock-obj-pub.native.h
+	gpg-extra/errno.h mkheader$(EXEEXT_FOR_BUILD) \
+	gpg-error-config-test.log \
+	$(tmp_files) lock-obj-pub.native.h
+
+TESTS = gpg-error-config-test.sh
 
 #
 # {{{ Begin Windows part
@@ -331,10 +336,11 @@ gpgrt-config: gpg-error-config
 	cp gpg-error-config gpgrt-config
 
 gpg-error-config: gpg-error-config-new gpg-error-config-old
-	if $(srcdir)/gpg-error-config-test.sh; then \
+	@echo "Confirm gpg-error-config works"
+	@if $(srcdir)/gpg-error-config-test.sh --old-new; then \
 	  cp gpg-error-config-new $@;               \
 	else                                        \
-	  echo "New gpg-error-config doesn't work on this machine, please report to <https://bugs.gnupg.org>" \
+	  echo "***  New gpg-error-config doesn't work on this machine, please report to <https://bugs.gnupg.org>"; \
 	  cp gpg-error-config-old $@;               \
 	fi
 
diff --git a/src/gpg-error-config-test.sh b/src/gpg-error-config-test.sh
index 9d8c2ce..a9a6b8d 100755
--- a/src/gpg-error-config-test.sh
+++ b/src/gpg-error-config-test.sh
@@ -4,32 +4,71 @@ PKG_CONFIG_PATH="."
 
 export PKG_CONFIG_PATH
 
-OUTPUT_OLD=$(./gpg-error-config-old --version)
-OUTPUT_NEW=$(./gpg-error-config-new --version)
-[ "$OUTPUT_OLD" = "$OUTPUT_NEW" ] || exit 99
+if [ "$1" = --old-new ]; then
+    PKG_CONFIG_CMD=./gpg-error-config-old
+else
+    PKG_CONFIG_CMD="pkg-config gpg-error"
+    if ! $PKG_CONFIG_CMD --exists >/dev/null; then
+	exit 77			# Skip tests
+    fi
+fi
 
-OUTPUT_OLD=$(./gpg-error-config-old --libs)
+test_failed=""
+
+failure () {
+    (
+	echo "Test result: $*"
+	echo "====================: $PKG_CONFIG_CMD"
+	echo "$OUTPUT_OLD"
+	echo "====================: gpg-error-config-new"
+	echo "$OUTPUT_NEW"
+	echo "===================="
+    ) >> gpg-error-config-test.log
+    test_failed=yes
+}
+
+rm -f gpg-error-config-test.log
+
+OUTPUT_OLD=$($PKG_CONFIG_CMD --libs)
 OUTPUT_NEW=$(./gpg-error-config-new --libs)
-[ "$OUTPUT_OLD" = "$OUTPUT_NEW" ] || exit 99
+[ "$OUTPUT_OLD" = "$OUTPUT_NEW" ] || failure --libs
 
-OUTPUT_OLD=$(./gpg-error-config-old --cflags)
+OUTPUT_OLD=$($PKG_CONFIG_CMD --cflags)
 OUTPUT_NEW=$(./gpg-error-config-new --cflags)
-[ "$OUTPUT_OLD" = "$OUTPUT_NEW" ] || exit 99
+[ "$OUTPUT_OLD" = "$OUTPUT_NEW" ] || failure --cflags
 
-OUTPUT_OLD=$(./gpg-error-config-old --mt --libs)
-OUTPUT_NEW=$(./gpg-error-config-new --mt --libs)
-[ "$OUTPUT_OLD" = "$OUTPUT_NEW" ] || exit 99
+OUTPUT_OLD=$($PKG_CONFIG_CMD --cflags --libs)
+OUTPUT_NEW=$(./gpg-error-config-new --cflags --libs)
+[ "$OUTPUT_OLD" = "$OUTPUT_NEW" ] || failure --cflags --libs
 
-OUTPUT_OLD=$(./gpg-error-config-old --mt --cflags)
-OUTPUT_NEW=$(./gpg-error-config-new --mt --cflags)
-[ "$OUTPUT_OLD" = "$OUTPUT_NEW" ] || exit 99
+if [ "$PKG_CONFIG_CMD" = ./gpg-error-config-old ]; then
+    OUTPUT_OLD=$($PKG_CONFIG_CMD --version)
+    OUTPUT_NEW=$(./gpg-error-config-new --version)
+    [ "$OUTPUT_OLD" = "$OUTPUT_NEW" ] || failure --version
 
-OUTPUT_OLD=$(./gpg-error-config-old --cflags --libs)
-OUTPUT_NEW=$(./gpg-error-config-new --cflags --libs)
-[ "$OUTPUT_OLD" = "$OUTPUT_NEW" ] || exit 99
+    OUTPUT_OLD=$($PKG_CONFIG_CMD --mt --libs)
+    OUTPUT_NEW=$(./gpg-error-config-new --mt --libs)
+    [ "$OUTPUT_OLD" = "$OUTPUT_NEW" ] || failure --mt --libs
+
+    OUTPUT_OLD=$($PKG_CONFIG_CMD --mt --cflags)
+    OUTPUT_NEW=$(./gpg-error-config-new --mt --cflags)
+    [ "$OUTPUT_OLD" = "$OUTPUT_NEW" ] || failure --mt --cflags
+
+    OUTPUT_OLD=$($PKG_CONFIG_CMD --cflags --libs)
+    OUTPUT_NEW=$(./gpg-error-config-new --cflags --libs)
+    [ "$OUTPUT_OLD" = "$OUTPUT_NEW" ] || failure --cflags --libs
+
+    OUTPUT_OLD=$($PKG_CONFIG_CMD --mt --cflags --libs)
+    OUTPUT_NEW=$(./gpg-error-config-new --mt --cflags --libs)
+    [ "$OUTPUT_OLD" = "$OUTPUT_NEW" ] || failure --mt --cflags --libs
+fi
+
+if [ -n "$test_failed" ]; then
+    OUTPUT_OLD=$($PKG_CONFIG_CMD --version)
+    OUTPUT_NEW=$(./gpg-error-config-new --version)
+    failure --version
 
-OUTPUT_OLD=$(./gpg-error-config-old --mt --cflags --libs)
-OUTPUT_NEW=$(./gpg-error-config-new --mt --cflags --libs)
-[ "$OUTPUT_OLD" = "$OUTPUT_NEW" ] || exit 99
+    exit 99
+fi
 
 exit 0

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

Summary of changes:
 configure.ac                 | 28 +++++++++++++++-
 src/Makefile.am              | 20 ++++++++----
 src/gpg-error-config-test.sh | 77 +++++++++++++++++++++++++++++++++-----------
 3 files changed, 99 insertions(+), 26 deletions(-)


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




More information about the Gnupg-commits mailing list