TMPFILE=`mktemp $TERMUX_PKG_TMPDIR/download.$TERMUX_PKG_NAME.XXXXXXXXX`
echo "Downloading ${URL}"
- for i in 1 2 3 4 5 6; do
+ TRYMAX=6
+ for try in $(seq 1 $TRYMAX); do
if curl -L --fail --retry 2 -o "$TMPFILE" "$URL"; then
if [ $# = 3 ]; then
# Optional checksum argument:
mv "$TMPFILE" "$DESTINATION"
return
else
- echo "Download of $1 failed (attempt $i/3)" 1>&2
+ echo "Download of $1 failed (attempt $try/$TRYMAX)" 1>&2
sleep 45
fi
done
exit 1
}
-# Get fresh versions of config.sub and config.guess
-for f in config.sub config.guess; do
- if [ ! -f $TERMUX_COMMON_CACHEDIR/$f ]; then
- termux_download "http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=${f};hb=HEAD" $TERMUX_COMMON_CACHEDIR/$f
- fi
-done
-
# Have a debian-binary file ready for deb packaging:
test ! -f $TERMUX_COMMON_CACHEDIR/debian-binary && echo "2.0" > $TERMUX_COMMON_CACHEDIR/debian-binary
# The host tuple that may be given to --host configure flag, but normally autodetected so not needed explicitly
-TERMUX_HOST_TUPLE=`sh $TERMUX_COMMON_CACHEDIR/config.guess`
+TERMUX_HOST_TUPLE=`sh $TERMUX_SCRIPTDIR/scripts/config.guess`
# Make $TERMUX_PREFIX/bin/sh executable on the builder, so that build script can assume that it works
# on both builder and host later on:
g++ -std=c++11 -Wall -Wextra -pedantic -Os $TERMUX_ELF_CLEANER_SRC -o $TERMUX_ELF_CLEANER
fi
-# Keep track of when build started so we can see what files have been created
-export TERMUX_BUILD_TS_FILE=$TERMUX_PKG_TMPDIR/timestamp_$TERMUX_PKG_NAME
-sleep 1 # Sleep so that any generated files above (such as zlib.c and $PREFIX/bin/sh)
- #get older timestamp then TERMUX_BUILD_TS_FILE
-rm -f $TERMUX_BUILD_TS_FILE && touch $TERMUX_BUILD_TS_FILE
-
# Run just after sourcing $TERMUX_PKG_BUILDER_SCRIPT
termux_step_extract_package () {
if [ -z "${TERMUX_PKG_SRCURL:=""}" ]; then
patch --silent -p1
done
- find . -name config.sub -exec chmod u+w '{}' \; -exec cp $TERMUX_COMMON_CACHEDIR/config.sub '{}' \;
- find . -name config.guess -exec chmod u+w '{}' \; -exec cp $TERMUX_COMMON_CACHEDIR/config.guess '{}' \;
+ find . -name config.sub -exec chmod u+w '{}' \; -exec cp $TERMUX_SCRIPTDIR/scripts/config.sub '{}' \;
+ find . -name config.guess -exec chmod u+w '{}' \; -exec cp $TERMUX_SCRIPTDIR/scripts/config.guess '{}' \;
}
termux_step_pre_configure () {
exit 1
fi
- local TERMUX_GO_VERSION=go1.7
+ local TERMUX_GO_VERSION=go1.7.1
local TERMUX_GO_PLATFORM=linux-amd64
test `uname` = "Darwin" && TERMUX_GO_PLATFORM=darwin-amd64
_TERMUX_NDK_TOOLCHAIN_NAME="$TERMUX_HOST_PLATFORM"
fi
- if [ "$TERMUX_PKG_CLANG" = "" ]; then
+ if [ "$TERMUX_PKG_CLANG" = "no" ]; then
_TERMUX_TOOLCHAIN="${_TERMUX_NDK_TOOLCHAIN_NAME}-4.9"
else
_TERMUX_TOOLCHAIN="${_TERMUX_NDK_TOOLCHAIN_NAME}-clang"
HERE
fi
+# Keep track of when build started so we can see what files have been created.
+# We start by sleeping so that any generated files above (such as zlib.pc) get
+# an older timestamp than the TERMUX_BUILD_TS_FILE.
+sleep 1
+TERMUX_BUILD_TS_FILE=$TERMUX_PKG_TMPDIR/timestamp_$TERMUX_PKG_NAME
+touch $TERMUX_BUILD_TS_FILE
# Start by extracting the package src into $TERMUX_PKG_SRCURL:
termux_step_extract_package