shutils: introduce XBPS_ORIG_MAKEJOBS variable

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 <congdanhqx@gmail.com>
This commit is contained in:
classabbyamp 2022-01-11 02:56:04 -05:00 committed by Leah Neukirchen
parent 86f91dd5a7
commit 7548d06eca
1 changed files with 3 additions and 1 deletions

View File

@ -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"