diff --git a/build-all.sh b/build-all.sh index c0bff918a..41816be5e 100755 --- a/build-all.sh +++ b/build-all.sh @@ -35,7 +35,7 @@ for package in `cat $BUILDORDER_FILE`; do echo -n "Building $package... " BUILD_START=`date "+%s"` - bash -x $BUILDSCRIPT $package > $TERMUX_TOPDIR/_buildall/${package}.out 2> $TERMUX_TOPDIR/_buildall/${package}.err + bash -x $BUILDSCRIPT -s $package > $TERMUX_TOPDIR/_buildall/${package}.out 2> $TERMUX_TOPDIR/_buildall/${package}.err BUILD_END=`date "+%s"` BUILD_SECONDS=$(( $BUILD_END - $BUILD_START )) echo "done in $BUILD_SECONDS" diff --git a/build-package.sh b/build-package.sh index 8dfbd1b27..1eda2eeda 100755 --- a/build-package.sh +++ b/build-package.sh @@ -12,15 +12,17 @@ show_usage () { echo " -a The architecture to build for: aarch64(default), arm, i686, x86_64 or all." echo " -d Build with debug symbols." echo " -D Build a disabled package in disabled-packages/." + echo " -s Skip dependency check." exit 1 } -while getopts :a:hdD option +while getopts :a:hdDs option do case "$option" in a) TERMUX_ARCH="$OPTARG";; h) show_usage;; d) TERMUX_DEBUG=true;; D) TERMUX_IS_DISABLED=true;; + s) export TERMUX_SKIP_DEPCHECK=true;; ?) echo "./build-package.sh: illegal option -$OPTARG"; exit 1;; esac done @@ -567,6 +569,15 @@ if [ -n "${TERMUX_PKG_BLACKLISTED_ARCHES:=""}" -a "$TERMUX_PKG_BLACKLISTED_ARCHE exit 0 fi +if [ -z "${TERMUX_SKIP_DEPCHECK:=""}" ]; then + for p in `./scripts/buildorder.py $TERMUX_PKG_NAME`; do + if [ "$p" != "$TERMUX_PKG_NAME" ]; then + echo "Building dependency $p if necessary..." + ./build-package.sh -s $p + fi + done +fi + # Compute full version: TERMUX_PKG_FULLVERSION=$TERMUX_PKG_VERSION if [ "$TERMUX_PKG_BUILD_REVISION" != "0" -o "$TERMUX_PKG_FULLVERSION" != "${TERMUX_PKG_FULLVERSION/-/}" ]; then