From 7548d06eca986c04b2642cb92a26205388aa18ba Mon Sep 17 00:00:00 2001 From: classabbyamp Date: Tue, 11 Jan 2022 02:56:04 -0500 Subject: [PATCH] shutils: introduce XBPS_ORIG_MAKEJOBS variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some packages couldn't work well with XBPS_MAKEJOBS, thus we disable parallel build for those packages. On the other hand, some packages including but not limited to openjdk use an internal mechanism to build themselves in parallel. Let's invent another variable for those packages. (message by sgn) Co-authored-by: Đoàn Trần Công Danh --- common/xbps-src/shutils/common.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/xbps-src/shutils/common.sh b/common/xbps-src/shutils/common.sh index 1739124050f..47ff365e9ff 100644 --- a/common/xbps-src/shutils/common.sh +++ b/common/xbps-src/shutils/common.sh @@ -465,7 +465,9 @@ setup_pkg() { DESTDIR=$XBPS_DESTDIR/$XBPS_CROSS_TRIPLET/${sourcepkg}-${version} PKGDESTDIR=$XBPS_DESTDIR/$XBPS_CROSS_TRIPLET/${pkg}-${version} - if [ -n "$disable_parallel_build" -o -z "$XBPS_MAKEJOBS" ]; then + : ${XBPS_MAKEJOBS:=1} + export XBPS_ORIG_MAKEJOBS=${XBPS_ORIG_MAKEJOBS:=$XBPS_MAKEJOBS} + if [ -n "$disable_parallel_build" ]; then XBPS_MAKEJOBS=1 fi makejobs="-j$XBPS_MAKEJOBS"