1 |
commit: b800ebdbe6e8d22701d1203a298bdba92a735f49 |
2 |
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jul 29 03:33:11 2014 +0000 |
4 |
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jul 29 03:33:11 2014 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/crossdev.git;a=commit;h=b800ebdb |
7 |
|
8 |
cross-pkg-config: utilize PKG_CONFIG_SYSROOT_DIR |
9 |
|
10 |
Now that the 0.24 release has been out for a few years, we can start |
11 |
relying on its availability. |
12 |
|
13 |
URL: https://bugs.gentoo.org/517530 |
14 |
Reported-by: Mike Marineau <mike <AT> marineau.org> |
15 |
Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org> |
16 |
|
17 |
--- |
18 |
wrappers/cross-pkg-config | 18 +++--------------- |
19 |
1 file changed, 3 insertions(+), 15 deletions(-) |
20 |
|
21 |
diff --git a/wrappers/cross-pkg-config b/wrappers/cross-pkg-config |
22 |
index d124261..859ef05 100755 |
23 |
--- a/wrappers/cross-pkg-config |
24 |
+++ b/wrappers/cross-pkg-config |
25 |
@@ -1,5 +1,5 @@ |
26 |
#!/bin/sh |
27 |
-# Copyright 2008-2010 Gentoo Foundation |
28 |
+# Copyright 2008-2014 Gentoo Foundation |
29 |
# Distributed under the terms of the GNU General Public License v2 |
30 |
|
31 |
# |
32 |
@@ -23,7 +23,7 @@ error() { |
33 |
# |
34 |
# Sanity/distro checks |
35 |
# |
36 |
-MIN_VER="0.20" # needs PKG_CONFIG_SYSROOT_DIR |
37 |
+MIN_VER="0.24" # needs working PKG_CONFIG_SYSROOT_DIR |
38 |
if ! pkg-config --atleast-pkgconfig-version ${MIN_VER} ; then |
39 |
error pkg-config is too old ... upgrade to at least v${MIN_VER} |
40 |
fi |
41 |
@@ -81,12 +81,7 @@ export PKG_CONFIG_LIBDIR="${SYSROOT}/usr/lib/pkgconfig:${SYSROOT}/usr/share/pkgc |
42 |
if [ -n "${EXTRA_PKG_CONFIG_LIBDIR}" ] ; then |
43 |
PKG_CONFIG_LIBDIR="${EXTRA_PKG_CONFIG_LIBDIR}:${PKG_CONFIG_LIBDIR}" |
44 |
fi |
45 |
-# |
46 |
-# This guy is horribly broken in pkg-config <=0.23: |
47 |
-# https://bugs.freedesktop.org/show_bug.cgi?id=16905 |
48 |
-# |
49 |
-#export PKG_CONFIG_SYSROOT_DIR="${SYSROOT}" |
50 |
-unset PKG_CONFIG_SYSROOT_DIR |
51 |
+export PKG_CONFIG_SYSROOT_DIR="${SYSROOT}" |
52 |
|
53 |
# |
54 |
# Sanity check the output to catch common errors that do not |
55 |
@@ -95,13 +90,6 @@ unset PKG_CONFIG_SYSROOT_DIR |
56 |
output=$(pkg-config "$@") |
57 |
ret=$? |
58 |
|
59 |
-# |
60 |
-# Inject PKG_CONFIG_SYSROOT_DIR ourselves until pkg-config is fixed. |
61 |
-# We can't mung the .pc files as some of the vars are used at compile |
62 |
-# time to encode runtime paths. |
63 |
-# |
64 |
-output=$(echo "${output}" | sed -e 's:\(-[IL][[:space:]]*\)\(/usr\):\1'"${SYSROOT}"'\2:g') |
65 |
- |
66 |
# We turn the output into a newline separate string of options, then use grep |
67 |
# to look for bad -Is and -Ls. Bad -Is and -Ls are ones that point to things |
68 |
# outside the ${SYSROOT}. |