aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2009-12-09 19:30:08 -0500
committerMike Frysinger <vapier@gentoo.org>2009-12-09 19:31:07 -0500
commit8c17f30c5c738edd279d6ccedce18d77879a1d82 (patch)
treecd590fd6a82cc84919b7cf96fd3e33f679d206de /wrappers/cross-fix-root
parentcrossdev: allow gcc-stage2 (C++) for avr by default (diff)
downloadcrossdev-8c17f30c5c738edd279d6ccedce18d77879a1d82.tar.gz
crossdev-8c17f30c5c738edd279d6ccedce18d77879a1d82.tar.bz2
crossdev-8c17f30c5c738edd279d6ccedce18d77879a1d82.zip
cross-fix-root: improve .pc dir searching
Only search dirs that actually exist. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'wrappers/cross-fix-root')
-rwxr-xr-xwrappers/cross-fix-root8
1 files changed, 6 insertions, 2 deletions
diff --git a/wrappers/cross-fix-root b/wrappers/cross-fix-root
index 08319d3..f0ee3d9 100755
--- a/wrappers/cross-fix-root
+++ b/wrappers/cross-fix-root
@@ -46,8 +46,12 @@ if [ -d "${LIBDIR}" ] ; then
-e "/^dependency_libs=/s: /usr/lib/: ${SYSROOT}/usr/lib/:g"
fi
-if [ -d "${LIBDIR}/pkgconfig" ] ; then
- find "./${LIBDIR}/pkgconfig/" ./usr/share/pkgconfig/ -name '*.pc' -print0 | xargs -0 -r \
+set --
+for d in "./${LIBDIR}/pkgconfig/" ./usr/share/pkgconfig/ ; do
+ [[ -d $d ]] && set -- "$@" "${d}"
+done
+if [ $# -gt 0 ] ; then
+ find "$@" -name '*.pc' -print0 | xargs -0 -r \
sed -i -r -e "/^(exec_)?prefix=/s:=/usr\$:='${SYSROOT}/usr':"
fi