1 |
vapier 10/01/08 09:17:27 |
2 |
|
3 |
Modified: cross-fix-root cross-pkg-config |
4 |
Log: |
5 |
cross-pkg-config: switch to PKG_CONFIG_SYSROOT_DIR |
6 |
|
7 |
Revision Changes Path |
8 |
1.10 crossdev-wrappers/cross-fix-root |
9 |
|
10 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-projects/crossdev-wrappers/cross-fix-root?rev=1.10&view=markup |
11 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-projects/crossdev-wrappers/cross-fix-root?rev=1.10&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-projects/crossdev-wrappers/cross-fix-root?r1=1.9&r2=1.10 |
13 |
|
14 |
Index: cross-fix-root |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo-projects/crossdev-wrappers/cross-fix-root,v |
17 |
retrieving revision 1.9 |
18 |
retrieving revision 1.10 |
19 |
diff -u -r1.9 -r1.10 |
20 |
--- cross-fix-root 8 Jan 2010 07:10:34 -0000 1.9 |
21 |
+++ cross-fix-root 8 Jan 2010 09:17:27 -0000 1.10 |
22 |
@@ -59,14 +59,7 @@ |
23 |
-e "/^dependency_libs=/s: /usr/lib/: ${SYSROOT}/usr/lib/:g" |
24 |
fi |
25 |
|
26 |
-set -- |
27 |
-for d in "./${LIBDIR}/pkgconfig/" ./usr/share/pkgconfig/ ; do |
28 |
- [ -d "$d" ] && set -- "$@" "${d}" |
29 |
-done |
30 |
-if [ $# -gt 0 ] ; then |
31 |
- find "$@" -name '*.pc' -print0 | xargs -0 -r \ |
32 |
- sed -i -r -e "/^(exec_)?prefix=/s:=/usr\$:='${SYSROOT}/usr':" |
33 |
-fi |
34 |
+# we don't touch .pc files anymore as we require pkg-config 0.23+ and PKG_CONFIG_SYSROOT_DIR |
35 |
|
36 |
if [ -d usr/bin ] ; then |
37 |
find ./usr/bin/ -name '*-config' -print0 | xargs -0 -r \ |
38 |
|
39 |
|
40 |
|
41 |
1.9 crossdev-wrappers/cross-pkg-config |
42 |
|
43 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-projects/crossdev-wrappers/cross-pkg-config?rev=1.9&view=markup |
44 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-projects/crossdev-wrappers/cross-pkg-config?rev=1.9&content-type=text/plain |
45 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-projects/crossdev-wrappers/cross-pkg-config?r1=1.8&r2=1.9 |
46 |
|
47 |
Index: cross-pkg-config |
48 |
=================================================================== |
49 |
RCS file: /var/cvsroot/gentoo-projects/crossdev-wrappers/cross-pkg-config,v |
50 |
retrieving revision 1.8 |
51 |
retrieving revision 1.9 |
52 |
diff -u -r1.8 -r1.9 |
53 |
--- cross-pkg-config 8 Jan 2010 07:16:34 -0000 1.8 |
54 |
+++ cross-pkg-config 8 Jan 2010 09:17:27 -0000 1.9 |
55 |
@@ -1,5 +1,5 @@ |
56 |
#!/bin/sh |
57 |
-# Copyright 2008-2009 Gentoo Foundation |
58 |
+# Copyright 2008-2010 Gentoo Foundation |
59 |
# Distributed under the terms of the GNU General Public License v2 |
60 |
|
61 |
# |
62 |
@@ -23,7 +23,7 @@ |
63 |
# |
64 |
# Sanity/distro checks |
65 |
# |
66 |
-MIN_VER="0.20" |
67 |
+MIN_VER="0.23" # needs PKG_CONFIG_SYSROOT_DIR |
68 |
if ! pkg-config --atleast-pkgconfig-version ${MIN_VER} ; then |
69 |
error pkg-config is too old ... upgrade to at least v${MIN_VER} |
70 |
fi |
71 |
@@ -79,6 +79,12 @@ |
72 |
if [ -n "${EXTRA_PKG_CONFIG_LIBDIR}" ] ; then |
73 |
PKG_CONFIG_LIBDIR="${EXTRA_PKG_CONFIG_LIBDIR}:${PKG_CONFIG_LIBDIR}" |
74 |
fi |
75 |
+# |
76 |
+# This guy is horribly broken in pkg-config <=0.23: |
77 |
+# https://bugs.freedesktop.org/show_bug.cgi?id=16905 |
78 |
+# |
79 |
+#export PKG_CONFIG_SYSROOT_DIR="${SYSROOT}" |
80 |
+unset PKG_CONFIG_SYSROOT_DIR |
81 |
|
82 |
# |
83 |
# Sanity check the output to catch common errors that do not |
84 |
@@ -86,6 +92,14 @@ |
85 |
# |
86 |
output=$(pkg-config "$@") |
87 |
ret=$? |
88 |
+ |
89 |
+# |
90 |
+# Inject PKG_CONFIG_SYSROOT_DIR ourselves until pkg-config is fixed. |
91 |
+# We can't mung the .pc files as some of the vars are used at compile |
92 |
+# time to encode runtime paths. |
93 |
+# |
94 |
+output=$(echo "${output}" | sed -e 's:\(-[IL][[:space:]]*\)\(/usr\):\1'"${SYSROOT}"'\2:g') |
95 |
+ |
96 |
case " ${output} " in |
97 |
*" -L/usr/lib "*|*" -L/usr/local/lib "*|\ |
98 |
*" -L /usr/lib "*|*" -L /usr/local/lib "*|\ |