[git] GPG-ERROR - branch, master, updated. libgpg-error-1.32-50-g78af09c

by NIIBE Yutaka cvs at cvs.gnupg.org
Fri Nov 2 04:18:46 CET 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  78af09ce13969b64f121ae5990e66fb7f1cd3f1d (commit)
       via  42413de59a063def05620d899a7fbda265b6c406 (commit)
       via  7ffd88b0e98af21aa61a57dde042d75f0d403839 (commit)
      from  8f034bb3a1bbde2fc7a8d2ada6e3d779c465895b (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 78af09ce13969b64f121ae5990e66fb7f1cd3f1d
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Fri Nov 2 11:31:01 2018 +0900

    gpgrt-config: Don't support variable reference in --libdir option.
    
    * src/gpgrt-config: Simplify --libdir support, remove variable
    substituion.
    * src/gpg-error.m4: Expand possible ${prefix}, ${exec_prefix} in
    libdir.  Simplify invocation of gpgrt-config.
    * src/gpgrt.m4: Likewise.
    
    --
    
    The --libdir option for configure can include variable reference
    like --libdir='${exec_prefix}/lib/x86_64-linux-gnu', and this
    expression should be expanded (the variable should be substituted)
    beforehand to determine if there is gpg-error.pc file or not.
    
    Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>

diff --git a/src/gpg-error.m4 b/src/gpg-error.m4
index 3bfa601..a9d572f 100644
--- a/src/gpg-error.m4
+++ b/src/gpg-error.m4
@@ -64,8 +64,20 @@ AC_DEFUN([AM_PATH_GPG_ERROR],
   min_gpg_error_version=ifelse([$1], ,1.33,$1)
   ok=no
 
-  if test -f $libdir/pkgconfig/gpg-error.pc; then
-    gpgrt_libdir=$libdir
+  if test "$prefix" = NONE ; then
+    prefix_option_expanded=/usr/local
+  else
+    prefix_option_expanded="$prefix"
+  fi
+  if test "$exec_prefix" = NONE ; then
+    exec_prefix_option_expanded=$prefix_option_expanded
+  else
+    exec_prefix_option_expanded=$(prefix=$prefix_option_expanded eval echo $exec_prefix)
+  fi
+  libdir_option_expanded=$(prefix=$prefix_option_expanded exec_prefix=$exec_prefix_option_expanded eval echo $libdir)
+
+  if test -f $libdir_option_expanded/pkgconfig/gpg-error.pc; then
+    gpgrt_libdir=$libdir_option_expanded
   else
     if crt1_path=$(${CC:-cc} -print-file-name=crt1.o 2>/dev/null); then
       if possible_libdir=$(cd ${crt1_path%/*} && pwd 2>/dev/null); then
@@ -81,7 +93,7 @@ AC_DEFUN([AM_PATH_GPG_ERROR],
     if test "$GPGRT_CONFIG" = "no"; then
       unset GPGRT_CONFIG
     else
-      GPGRT_CONFIG="$GPGRT_CONFIG --prefix=$prefix --exec-prefix=$exec_prefix --libdir=$gpgrt_libdir"
+      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])
@@ -117,7 +129,7 @@ AC_DEFUN([AM_PATH_GPG_ERROR],
         if test "$GPGRT_CONFIG" = "no"; then
           unset GPGRT_CONFIG
         else
-          GPGRT_CONFIG="$GPGRT_CONFIG --prefix=$prefix --exec-prefix=$exec_prefix --libdir=$gpgrt_libdir"
+          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])
diff --git a/src/gpgrt-config b/src/gpgrt-config
index 9ff0b3a..9aec4f6 100755
--- a/src/gpgrt-config
+++ b/src/gpgrt-config
@@ -417,7 +417,7 @@ sysroot () {
 # Show usage
 usage () {
     cat <<EOF
-Usage: gpgrt-config [--prefix=PREFIX] [--libdir=LIBDIR] [OPTIONS] MODULES
+Usage: gpgrt-config [--libdir=LIBDIR] [OPTIONS] MODULES
 Options:
 	[--exists]
 	[--modversion]
@@ -436,30 +436,13 @@ else
   default_module=${myname%-config}
 fi
 
-# First stage to process --prefix, --exec_prefix and --libdir options
-
-prefix_option=""
-exec_prefix_option=""
-libdir_option=""
+# First stage to process --libdir option
 
+libdir=""
 while test $# -gt 0; do
     case $1 in
-	--prefix=*)
-	    prefix_option=${1#--prefix=}
-	    if [ "$prefix_option" = NONE ]; then
-		prefix_option=/usr/local
-	    fi
-	    shift
-	    ;;
-	--exec-prefix=*)
-	    exec_prefix_option=${1#--exec-prefix=}
-	    if [ "$exec_prefix_option" = NONE ]; then
-		exec_prefix_option='${prefix}'
-	    fi
-	    shift
-	    ;;
 	--libdir=*)
-	    libdir_option=${1#--libdir=}
+	    libdir=${1#--libdir=}
 	    shift
 	    ;;
 	*)
@@ -468,28 +451,13 @@ while test $# -gt 0; do
     esac
 done
 
-if [ -n "$prefix_option" ]; then
-    read_config_from_stdin __gpgrt-config__ <<EOF
-prefix=$prefix_option
-EOF
-fi
-if [ -n "$exec_prefix_option" ]; then
-    read_config_from_stdin __gpgrt-config__ <<EOF
-exec_prefix=$exec_prefix_option
-EOF
-fi
-
 # --libdir option has precedence over the env var.
-if [ -n "$libdir_option" ]; then
-    libdir=$(substitute_vars $libdir_option)
+if [ -n "$libdir" ]; then
     PKG_CONFIG_LIBDIR=$libdir/pkgconfig
 fi
 
 if [ x"$PKG_CONFIG_PATH" = x -a x"$PKG_CONFIG_LIBDIR" = x ]; then
     echo "Please use --libdir=LIBDIR option or set PKG_CONFIG_LIBDIR" 1>&2
-    echo "When LIBDIR has variable references for prefix and/or exec_prefix," 1>&2
-    echo "you should provide --prefix=PREFIX option and/or" 1>&2
-    echo "--exec-prefix=EXEC_PREFIX option, too" 1>&2
     exit 1
 fi
 
diff --git a/src/gpgrt.m4 b/src/gpgrt.m4
index 912b103..55c3ff0 100644
--- a/src/gpgrt.m4
+++ b/src/gpgrt.m4
@@ -69,8 +69,20 @@ AC_DEFUN([AM_PATH_GPGRT],
      fi
   fi
 
-  if test -f $libdir/pkgconfig/gpg-error.pc; then
-    gpgrt_libdir=$libdir
+  if test "$prefix" = NONE ; then
+    prefix_option_expanded=/usr/local
+  else
+    prefix_option_expanded="$prefix"
+  fi
+  if test "$exec_prefix" = NONE ; then
+    exec_prefix_option_expanded=$prefix_option_expanded
+  else
+    exec_prefix_option_expanded=$(prefix=$prefix_option_expanded eval echo $exec_prefix)
+  fi
+  libdir_option_expanded=$(prefix=$prefix_option_expanded exec_prefix=$exec_prefix_option_expanded eval echo $libdir)
+
+  if test -f $libdir_option_expanded/pkgconfig/gpg-error.pc; then
+    gpgrt_libdir=$libdir_option_expanded
   else
     if crt1_path=$(${CC:-cc} -print-file-name=crt1.o 2>/dev/null); then
       if possible_libdir=$(cd ${crt1_path%/*} && pwd 2>/dev/null); then
@@ -84,7 +96,7 @@ AC_DEFUN([AM_PATH_GPGRT],
   if test -n "$gpgrt_libdir"; then
     AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no)
     if test "$GPGRT_CONFIG" != "no"; then
-      GPGRT_CONFIG="$GPGRT_CONFIG --prefix=$prefix --exec-prefix=$exec_prefix --libdir=$gpgrt_libdir"
+      GPGRT_CONFIG="$GPGRT_CONFIG --libdir=$gpgrt_libdir"
     fi
   fi
   min_gpgrt_version=ifelse([$1], ,1.33,$1)

commit 42413de59a063def05620d899a7fbda265b6c406
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Fri Nov 2 10:06:51 2018 +0900

    gpg-error.m4: Emit message when using gpgrt-config.
    
    * src/gpg-error.m4: Add AC_MSG_NOTICE.
    
    Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>

diff --git a/src/gpg-error.m4 b/src/gpg-error.m4
index 5d5cdf9..3bfa601 100644
--- a/src/gpg-error.m4
+++ b/src/gpg-error.m4
@@ -84,6 +84,7 @@ AC_DEFUN([AM_PATH_GPG_ERROR],
       GPGRT_CONFIG="$GPGRT_CONFIG --prefix=$prefix --exec-prefix=$exec_prefix --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
@@ -119,6 +120,7 @@ AC_DEFUN([AM_PATH_GPG_ERROR],
           GPGRT_CONFIG="$GPGRT_CONFIG --prefix=$prefix --exec-prefix=$exec_prefix --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])
           else
             unset GPGRT_CONFIG
           fi

commit 7ffd88b0e98af21aa61a57dde042d75f0d403839
Author: NIIBE Yutaka <gniibe at fsij.org>
Date:   Fri Nov 2 09:49:27 2018 +0900

    gpg-error.m4: Find gpgrt_libdir by CC.
    
    * src/gpg-error.m4 (gpgrt_libdir): New.  Bump the version date.
    * src/gpgrt.m4: Likewise.
    
    --
    
    Locating gpg-error.pc file, when it's not found at target's $libdir,
    try system libdir defined by CC, assuming CC supports gcc compatible
    -print-file-name option.
    
    GnuPG-bug-id: 4239
    Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>

diff --git a/src/gpg-error.m4 b/src/gpg-error.m4
index f643307..5d5cdf9 100644
--- a/src/gpg-error.m4
+++ b/src/gpg-error.m4
@@ -9,7 +9,7 @@
 # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 #
-# Last-changed: 2018-10-29
+# Last-changed: 2018-11-02
 
 
 dnl AM_PATH_GPG_ERROR([MINIMUM-VERSION,
@@ -64,14 +64,26 @@ AC_DEFUN([AM_PATH_GPG_ERROR],
   min_gpg_error_version=ifelse([$1], ,1.33,$1)
   ok=no
 
-  use_gpgrt_config=""
-  if test "$GPG_ERROR_CONFIG" = "no"; then
+  if test -f $libdir/pkgconfig/gpg-error.pc; then
+    gpgrt_libdir=$libdir
+  else
+    if crt1_path=$(${CC:-cc} -print-file-name=crt1.o 2>/dev/null); then
+      if possible_libdir=$(cd ${crt1_path%/*} && pwd 2>/dev/null); then
+        if test -f $possible_libdir/pkgconfig/gpg-error.pc; then
+          gpgrt_libdir=$possible_libdir
+        fi
+      fi
+    fi
+  fi
+
+  if test "$GPG_ERROR_CONFIG" = "no" -a -n "$gpgrt_libdir"; then
     AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no)
-    if test "$GPGRT_CONFIG" != "no"; then
-      GPGRT_CONFIG="$GPGRT_CONFIG --prefix=$prefix --exec-prefix=$exec_prefix --libdir=$libdir"
+    if test "$GPGRT_CONFIG" = "no"; then
+      unset GPGRT_CONFIG
+    else
+      GPGRT_CONFIG="$GPGRT_CONFIG --prefix=$prefix --exec-prefix=$exec_prefix --libdir=$gpgrt_libdir"
       if $GPGRT_CONFIG gpg-error >/dev/null 2>&1; then
         GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error"
-        use_gpgrt_config=yes
         gpg_error_config_version=`$GPG_ERROR_CONFIG --modversion`
       else
         unset GPGRT_CONFIG
@@ -98,14 +110,15 @@ AC_DEFUN([AM_PATH_GPG_ERROR],
             fi
         fi
     fi
-    if test -z "$GPGRT_CONFIG"; then
+    if test -z "$GPGRT_CONFIG" -a -n "$gpgrt_libdir"; then
       if test "$major" -gt 1 -o "$major" -eq 1 -a "$minor" -ge 33; then
         AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no)
-        if test "$GPGRT_CONFIG" != "no"; then
-          GPGRT_CONFIG="$GPGRT_CONFIG --prefix=$prefix --exec-prefix=$exec_prefix --libdir=$libdir"
+        if test "$GPGRT_CONFIG" = "no"; then
+          unset GPGRT_CONFIG
+        else
+          GPGRT_CONFIG="$GPGRT_CONFIG --prefix=$prefix --exec-prefix=$exec_prefix --libdir=$gpgrt_libdir"
           if $GPGRT_CONFIG gpg-error >/dev/null 2>&1; then
             GPG_ERROR_CONFIG="$GPGRT_CONFIG gpg-error"
-            use_gpgrt_config=yes
           else
             unset GPGRT_CONFIG
           fi
@@ -117,7 +130,7 @@ AC_DEFUN([AM_PATH_GPG_ERROR],
   if test $ok = yes; then
     GPG_ERROR_CFLAGS=`$GPG_ERROR_CONFIG --cflags`
     GPG_ERROR_LIBS=`$GPG_ERROR_CONFIG --libs`
-    if test -z "$use_gpgrt_config"; then
+    if test -z "$GPGRT_CONFIG"; then
       GPG_ERROR_MT_CFLAGS=`$GPG_ERROR_CONFIG --mt --cflags 2>/dev/null`
       GPG_ERROR_MT_LIBS=`$GPG_ERROR_CONFIG --mt --libs 2>/dev/null`
     else
@@ -128,7 +141,7 @@ AC_DEFUN([AM_PATH_GPG_ERROR],
     fi
     AC_MSG_RESULT([yes ($gpg_error_config_version)])
     ifelse([$2], , :, [$2])
-    if test -z "$use_gpgrt_config"; then
+    if test -z "$GPGRT_CONFIG"; then
       gpg_error_config_host=`$GPG_ERROR_CONFIG --host 2>/dev/null || echo none`
     else
       gpg_error_config_host=`$GPG_ERROR_CONFIG --variable=host 2>/dev/null || echo none`
diff --git a/src/gpgrt.m4 b/src/gpgrt.m4
index 7f92a22..912b103 100644
--- a/src/gpgrt.m4
+++ b/src/gpgrt.m4
@@ -10,7 +10,7 @@
 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 # SPDX-License-Identifier: FSFULLR
 #
-# Last-changed: 2018-10-29
+# Last-changed: 2018-11-02
 # Note: This is a kind of duplicate of gpg-error.m4 with uses the
 # future name of libgpg-error to prepare for a smooth migration in
 # some distant time.
@@ -69,15 +69,28 @@ AC_DEFUN([AM_PATH_GPGRT],
      fi
   fi
 
-  AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no)
-  if test "$GPGRT_CONFIG" != "no"; then
-    GPGRT_CONFIG="$GPGRT_CONFIG --prefix=$prefix --exec-prefix=$exec_prefix --libdir=$libdir"
+  if test -f $libdir/pkgconfig/gpg-error.pc; then
+    gpgrt_libdir=$libdir
+  else
+    if crt1_path=$(${CC:-cc} -print-file-name=crt1.o 2>/dev/null); then
+      if possible_libdir=$(cd ${crt1_path%/*} && pwd 2>/dev/null); then
+        if test -f $possible_libdir/pkgconfig/gpg-error.pc; then
+          gpgrt_libdir=$possible_libdir
+        fi
+      fi
+    fi
+  fi
+
+  if test -n "$gpgrt_libdir"; then
+    AC_PATH_PROG(GPGRT_CONFIG, gpgrt-config, no)
+    if test "$GPGRT_CONFIG" != "no"; then
+      GPGRT_CONFIG="$GPGRT_CONFIG --prefix=$prefix --exec-prefix=$exec_prefix --libdir=$gpgrt_libdir"
+    fi
   fi
   min_gpgrt_version=ifelse([$1], ,1.33,$1)
   AC_MSG_CHECKING(for GPG Runtime - version >= $min_gpgrt_version)
   ok=no
-  if test "$GPGRT_CONFIG" != "no" \
-     && test -f "$GPGRT_CONFIG" ; then
+  if test x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no" ; then
     req_major=`echo $min_gpgrt_version | \
                sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
     req_minor=`echo $min_gpgrt_version | \

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

Summary of changes:
 src/gpg-error.m4 | 51 +++++++++++++++++++++++++++++++++++++++------------
 src/gpgrt-config | 42 +++++-------------------------------------
 src/gpgrt.m4     | 37 +++++++++++++++++++++++++++++++------
 3 files changed, 75 insertions(+), 55 deletions(-)


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




More information about the Gnupg-commits mailing list