diff --git a/common/hooks/post-install/06-prepare-32bit.sh b/common/hooks/post-install/06-prepare-32bit.sh index 7dac08d2497..674a6e66e04 100644 --- a/common/hooks/post-install/06-prepare-32bit.sh +++ b/common/hooks/post-install/06-prepare-32bit.sh @@ -12,7 +12,7 @@ hook() { return fi # This hook will only work when building for x86. - if [ "$XBPS_MACHINE" != "i686" ]; then + if [ "$XBPS_TARGET_MACHINE" != "i686" ]; then return fi # Ignore noarch pkgs. @@ -43,6 +43,10 @@ hook() { rmdir --ignore-fail-on-non-empty -p "$f" &>/dev/null done + if [ ! -d ${destdir32} ]; then + return + fi + # Switch pkg-config files to lib32. if [ -d ${destdir32}/usr/lib32/pkgconfig ]; then sed -e 's,/usr/lib,/usr/lib32,g' \