aports/misc-tools/abuild/0002-buildbase-opt.patch

52 lines
1.2 KiB
Diff

diff --git a/abuild.in b/abuild.in
index d600e92..74b3ae5 100644
--- a/abuild.in
+++ b/abuild.in
@@ -27,7 +27,6 @@ fi
: ${ADDGROUP:="abuild-addgroup"}
: ${CC:="gcc"}
: ${CXX:="g++"}
-
apk_opt_wait="--wait 30"
umask 022
@@ -2200,15 +2199,17 @@ builddeps() {
[ -n "$nodeps" ] && return 0
msg "Analyzing dependencies..."
- case "$BOOTSTRAP" in
- no*) BUILD_BASE="";;
- *) if cross_creating || cross_compiling; then
- BUILD_BASE="build-base-$CTARGET_ARCH"
- else
- BUILD_BASE="build-base"
- fi
- esac
- calcdeps "$BUILD_BASE"
+ if ! options_has "!buildbase"; then
+ case "$BOOTSTRAP" in
+ no*) BUILD_BASE="";;
+ *) if cross_creating || cross_compiling; then
+ BUILD_BASE="build-base-$CTARGET_ARCH"
+ else
+ BUILD_BASE="build-base"
+ fi
+ esac
+ calcdeps "$BUILD_BASE"
+ fi
# find which deps are missing
local mbd mhd missing
@@ -2337,9 +2338,10 @@ rootbld() {
echo "$REPODEST/$repo"
) < "$repo_template" > "$BUILD_ROOT/etc/apk/repositories"
+ options_has "!buildbase" || builddeps="$builddeps build-base"
calcdeps
$SUDO_APK add --initdb --root "$BUILD_ROOT" --update \
- abuild alpine-base build-base git $hostdeps $builddeps \
+ abuild alpine-base git $hostdeps $builddeps \
${USE_CCACHE:+ccache}
local bwrap_opts=""