From d7aaa3e3e9c4fc970d00f0a0a6fe3f9e582a2108 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Mon, 3 Apr 2017 21:12:34 +0200 Subject: [PATCH] xbps-src: speed up cross compilation by installing cross pkgs a bit later. --- common/xbps-src/libexec/build.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/common/xbps-src/libexec/build.sh b/common/xbps-src/libexec/build.sh index 61a459f69cc..5f3a800ea93 100755 --- a/common/xbps-src/libexec/build.sh +++ b/common/xbps-src/libexec/build.sh @@ -32,10 +32,6 @@ readonly SOURCEPKG="$sourcepkg" show_pkg_build_options check_pkg_arch $XBPS_CROSS_BUILD -if [ -z "$XBPS_CROSS_PREPARE" ]; then - install_cross_pkg $XBPS_CROSS_BUILD || exit $? - prepare_cross_sysroot $XBPS_CROSS_BUILD || exit $? -fi if [ -z "$XBPS_DEPENDENCY" -a -z "$XBPS_TEMP_MASTERDIR" -a -n "$XBPS_KEEP_ALL" -a "$XBPS_CHROOT_CMD" = "proot" ]; then remove_pkg_autodeps fi @@ -44,6 +40,11 @@ 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 [ -z "$XBPS_CROSS_PREPARE" ]; then + install_cross_pkg $XBPS_CROSS_BUILD || exit $? + prepare_cross_sysroot $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