build-package.sh: Automatically build dependencies

We now automatically build dependencies unless the -s option is
used, so running scripts/buildorder.py shouldn't be necessary now.
This commit is contained in:
Fredrik Fornwall 2017-01-03 19:04:37 -05:00
parent e388b40725
commit fc89df4deb
2 changed files with 13 additions and 2 deletions

View File

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

View File

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