: "${TERMUX_ANDROID_HOME:="/data/data/com.termux/files/home"}"
: "${TERMUX_DEBUG:=""}"
: "${TERMUX_PKG_API_LEVEL:="21"}"
- : "${TERMUX_ANDROID_BUILD_TOOLS_VERSION:="25.0.3"}"
+ : "${TERMUX_ANDROID_BUILD_TOOLS_VERSION:="26.0.1"}"
: "${TERMUX_NDK_VERSION:="15.2"}"
if [ "x86_64" = "$TERMUX_ARCH" ] || [ "aarch64" = "$TERMUX_ARCH" ]; then
# to avoid stuff like arm-linux-androideabi-ld there to conflict with ones from
# the standalone toolchain.
TERMUX_DX=$ANDROID_HOME/build-tools/$TERMUX_ANDROID_BUILD_TOOLS_VERSION/dx
- TERMUX_JACK=$ANDROID_HOME/build-tools/$TERMUX_ANDROID_BUILD_TOOLS_VERSION/jack.jar
- TERMUX_JILL=$ANDROID_HOME/build-tools/$TERMUX_ANDROID_BUILD_TOOLS_VERSION/jill.jar
TERMUX_COMMON_CACHEDIR="$TERMUX_TOPDIR/_cache"
TERMUX_DEBDIR="$TERMUX_SCRIPTDIR/debs"
TERMUX_STANDALONE_TOOLCHAIN="$TERMUX_TOPDIR/_lib/${TERMUX_NDK_VERSION}-${TERMUX_ARCH}-${TERMUX_PKG_API_LEVEL}"
# Bump the below version if a change is made in toolchain setup to ensure
# that everyone gets an updated toolchain:
- TERMUX_STANDALONE_TOOLCHAIN+="-v11"
+ TERMUX_STANDALONE_TOOLCHAIN+="-v12"
if [ -n "${TERMUX_PKG_BLACKLISTED_ARCHES:=""}" ] && [ "$TERMUX_PKG_BLACKLISTED_ARCHES" != "${TERMUX_PKG_BLACKLISTED_ARCHES/$TERMUX_ARCH/}" ]; then
echo "Skipping building $TERMUX_PKG_NAME for arch $TERMUX_ARCH"
# elf.h: Taken from glibc since the elf.h in the NDK is lacking.
# sysexits.h: Header-only and used by a few programs.
# ifaddrs.h: Added in android-24 unified headers, use a inline implementation for now.
- cp "$TERMUX_SCRIPTDIR"/ndk-patches/{elf.h,sysexits.h,ifaddrs.h} usr/include
+ cp "$TERMUX_SCRIPTDIR"/ndk-patches/{elf.h,sysexits.h,ifaddrs.h,libintl.h} usr/include
# Remove <sys/shm.h> from the NDK in favour of that from the libandroid-shmem.
# Also remove <sys/sem.h> as it doesn't work for non-root.