From 8c17f30c5c738edd279d6ccedce18d77879a1d82 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 9 Dec 2009 19:30:08 -0500 Subject: cross-fix-root: improve .pc dir searching Only search dirs that actually exist. Signed-off-by: Mike Frysinger --- wrappers/cross-fix-root | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'wrappers') 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 -- cgit v1.2.3