[git] GPG-ERROR - branch, master, updated. libgpg-error-1.32-54-g4a92763
by NIIBE Yutaka
cvs at cvs.gnupg.org
Wed Nov 14 12:15:04 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 4a92763a6e529824f1c6043b75ac1346af41a926 (commit)
from 4b41cf3bd16c8afcb4ba152ab9d5d679a7cb91e7 (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 4a92763a6e529824f1c6043b75ac1346af41a926
Author: NIIBE Yutaka <gniibe at fsij.org>
Date: Wed Nov 14 20:08:40 2018 +0900
gpgrt-config: Prepend PKG_CONFIG_LIBDIR to PKG_CONFIG_PATH.
* src/gpgrt-config: Handle empty PKG_CONFIG_LIBDIR config, which
should ignore --libdir option. Otherwise, prepend
PKG_CONFIG_LIBDIR (instead of appending) to PKG_CONFIG_PATH.
--
Suggested-by: Andre Heinecke <aheinecke at intevation.de>
Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>
diff --git a/src/gpgrt-config b/src/gpgrt-config
index 9aec4f6..3a76869 100755
--- a/src/gpgrt-config
+++ b/src/gpgrt-config
@@ -451,17 +451,32 @@ while test $# -gt 0; do
esac
done
-# --libdir option has precedence over the env var.
-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
+if [ x"${PKG_CONFIG_LIBDIR:+set}" = xset -a -z "$PKG_CONFIG_LIBDIR" ]; then
+ # The variable set as empty, we use PKG_CONFIG_PATH in this case,
+ # ignoring --libdir option
+ if [ -z "$PKG_CONFIG_PATH" ]; then
+ echo "Please have valid PKG_CONFIG_PATH if PKG_CONFIG_LIBDIR is empty" 1>&2
exit 1
+ fi
+else
+ if [ -n "$libdir" ]; then
+ # --libdir option is available, it overrides existing PKG_CONFIG_LIBDIR
+ PKG_CONFIG_LIBDIR=$libdir/pkgconfig
+ fi
+ if [ -z "$PKG_CONFIG_LIBDIR" ]; then
+ if [ -z "$PKG_CONFIG_PATH" ]; then
+ echo "Please use --libdir=LIBDIR option or set PKG_CONFIG_LIBDIR" 1>&2
+ echo "Or set PKG_CONFIG_PATH" 1>&2
+ exit 1
+ fi
+ else
+ # PKG_CONFIG_LIBDIR is available here
+ # Modify PKG_CONFIG_PATH, prepending PKG_CONFIG_LIBDIR
+ PKG_CONFIG_PATH="$PKG_CONFIG_LIBDIR${PKG_CONFIG_PATH:+:}$PKG_CONFIG_PATH"
+ fi
fi
+# PKG_CONFIG_PATH is ready here
-PKG_CONFIG_PATH="$PKG_CONFIG_PATH${PKG_CONFIG_PATH:+:}$PKG_CONFIG_LIBDIR"
#
if test $# -eq 0; then
-----------------------------------------------------------------------
Summary of changes:
src/gpgrt-config | 31 +++++++++++++++++++++++--------
1 file changed, 23 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