diff --git a/xbps.sh b/xbps.sh index f55f70b470f..82be0832074 100755 --- a/xbps.sh +++ b/xbps.sh @@ -531,6 +531,9 @@ fixup_libtool_file() [ "$pkgname" = "libtool" -o ! -f $wrksrc/libtool ] && return 0 [ -n "$no_libtool_fixup" ] && return 0 + # If we are being invoked by a chroot, don't transform stuff. + [ "$XBPS_MASTERDIR" = "/" ] && return 0 + sed -i -e \ 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec="-Wl,-rpath /usr/lib"|g' \ $wrksrc/libtool @@ -543,6 +546,9 @@ fixup_la_files() # Ignore libtool itself [ "$pkgname" = "libtool" ] && return 0 + # If we are being invoked by a chroot, don't transform stuff. + [ "$XBPS_MASTERDIR" = "/" ] && return 0 + # # Replace hardcoded or incorrect paths with correct ones. #