diff --git a/common/xbps-src/libexec/build.sh b/common/xbps-src/libexec/build.sh index 1f751ca13b9..024bb11d18b 100755 --- a/common/xbps-src/libexec/build.sh +++ b/common/xbps-src/libexec/build.sh @@ -43,6 +43,10 @@ if [ "$PKGNAME" != "$XBPS_TARGET_PKG" -o -z "$XBPS_SKIP_DEPS" ]; then install_pkg_deps $PKGNAME $XBPS_TARGET_PKG pkg $XBPS_CROSS_BUILD $XBPS_CROSS_PREPARE || exit $? fi +if [ "$XBPS_CROSS_BUILD" ]; then + install_cross_pkg $XBPS_CROSS_BUILD || exit $? +fi + # Fetch distfiles after installing required dependencies, # because some of them might be required for do_fetch(). $XBPS_LIBEXECDIR/xbps-src-dofetch.sh $SOURCEPKG $XBPS_CROSS_BUILD || exit 1 diff --git a/common/xbps-src/shutils/cross.sh b/common/xbps-src/shutils/cross.sh index e72100986dd..a699885e801 100644 --- a/common/xbps-src/shutils/cross.sh +++ b/common/xbps-src/shutils/cross.sh @@ -54,8 +54,6 @@ prepare_cross_sysroot() { ln -s usr/include ${XBPS_CROSS_BASE}/include ln -s usr/lib ${XBPS_CROSS_BASE}/lib - install_cross_pkg $cross || return 1 - touch -f $statefile return 0