diff options
Diffstat (limited to 'wrappers')
-rwxr-xr-x | wrappers/cross-fix-root | 8 |
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 |