commit:     b800ebdbe6e8d22701d1203a298bdba92a735f49
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 29 03:33:11 2014 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Tue Jul 29 03:33:11 2014 +0000
URL:        
http://sources.gentoo.org/gitweb/?p=proj/crossdev.git;a=commit;h=b800ebdb

cross-pkg-config: utilize PKG_CONFIG_SYSROOT_DIR

Now that the 0.24 release has been out for a few years, we can start
relying on its availability.

URL: https://bugs.gentoo.org/517530
Reported-by: Mike Marineau <mike <AT> marineau.org>
Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>

---
 wrappers/cross-pkg-config | 18 +++---------------
 1 file changed, 3 insertions(+), 15 deletions(-)

diff --git a/wrappers/cross-pkg-config b/wrappers/cross-pkg-config
index d124261..859ef05 100755
--- a/wrappers/cross-pkg-config
+++ b/wrappers/cross-pkg-config
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright 2008-2010 Gentoo Foundation
+# Copyright 2008-2014 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 #
@@ -23,7 +23,7 @@ error() {
 #
 # Sanity/distro checks
 #
-MIN_VER="0.20" # needs PKG_CONFIG_SYSROOT_DIR
+MIN_VER="0.24" # needs working PKG_CONFIG_SYSROOT_DIR
 if ! pkg-config --atleast-pkgconfig-version ${MIN_VER} ; then
        error pkg-config is too old ... upgrade to at least v${MIN_VER}
 fi
@@ -81,12 +81,7 @@ export 
PKG_CONFIG_LIBDIR="${SYSROOT}/usr/lib/pkgconfig:${SYSROOT}/usr/share/pkgc
 if [ -n "${EXTRA_PKG_CONFIG_LIBDIR}" ] ; then
        PKG_CONFIG_LIBDIR="${EXTRA_PKG_CONFIG_LIBDIR}:${PKG_CONFIG_LIBDIR}"
 fi
-#
-# This guy is horribly broken in pkg-config <=0.23:
-#      https://bugs.freedesktop.org/show_bug.cgi?id=16905
-#
-#export PKG_CONFIG_SYSROOT_DIR="${SYSROOT}"
-unset PKG_CONFIG_SYSROOT_DIR
+export PKG_CONFIG_SYSROOT_DIR="${SYSROOT}"
 
 #
 # Sanity check the output to catch common errors that do not
@@ -95,13 +90,6 @@ unset PKG_CONFIG_SYSROOT_DIR
 output=$(pkg-config "$@")
 ret=$?
 
-#
-# Inject PKG_CONFIG_SYSROOT_DIR ourselves until pkg-config is fixed.
-# We can't mung the .pc files as some of the vars are used at compile
-# time to encode runtime paths.
-#
-output=$(echo "${output}" | sed -e 
's:\(-[IL][[:space:]]*\)\(/usr\):\1'"${SYSROOT}"'\2:g')
-
 # We turn the output into a newline separate string of options, then use grep
 # to look for bad -Is and -Ls.  Bad -Is and -Ls are ones that point to things
 # outside the ${SYSROOT}.

Reply via email to