Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions build-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,8 @@ source "$TERMUX_SCRIPTDIR/scripts/build/termux_step_handle_host_build.sh"
source "$TERMUX_SCRIPTDIR/scripts/build/termux_step_host_build.sh"

# Setup a standalone Android NDK toolchain. Called from termux_step_setup_toolchain.
# shellcheck source=scripts/build/toolchain/termux_setup_toolchain_28c.sh
source "$TERMUX_SCRIPTDIR/scripts/build/toolchain/termux_setup_toolchain_28c.sh"
# shellcheck source=scripts/build/toolchain/termux_setup_toolchain_29.sh
source "$TERMUX_SCRIPTDIR/scripts/build/toolchain/termux_setup_toolchain_29.sh"

# Setup a standalone Android NDK 23c toolchain. Called from termux_step_setup_toolchain.
# shellcheck source=scripts/build/toolchain/termux_setup_toolchain_23c.sh
Expand Down
10 changes: 0 additions & 10 deletions ndk-patches/28c/c++-v1-module.modulemap.patch

This file was deleted.

27 changes: 0 additions & 27 deletions ndk-patches/28c/c++-v1-stdlib.h.patch

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion packages/libandroid-stub/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ TERMUX_PKG_LICENSE="NCSA"
TERMUX_PKG_MAINTAINER="@termux"
# Version should be equal to TERMUX_NDK_{VERSION_NUM,REVISION} in
# scripts/properties.sh
TERMUX_PKG_VERSION=28c
TERMUX_PKG_VERSION=29
TERMUX_PKG_AUTO_UPDATE=false
TERMUX_PKG_CONFLICTS="libandroid"
TERMUX_PKG_REPLACES="libandroid"
Expand Down
2 changes: 1 addition & 1 deletion packages/libc++/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ TERMUX_PKG_LICENSE="NCSA"
TERMUX_PKG_MAINTAINER="@termux"
# Version should be equal to TERMUX_NDK_{VERSION_NUM,REVISION} in
# scripts/properties.sh
TERMUX_PKG_VERSION=28c
TERMUX_PKG_VERSION=29
TERMUX_PKG_SRCURL=https://dl.google.com/android/repository/android-ndk-r${TERMUX_PKG_VERSION}-linux.zip
TERMUX_PKG_SHA256=59c2f6dc96743b5daf5d1626684640b20a6bd2b1d85b13156b90333741bad5cc
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The TERMUX_PKG_SHA256 and some other content in these build.sh files is outdated/broken and doesn't currently work if TERMUX_ON_DEVICE_BUILD is true.

I have a PR here which fixes that,

however, the reason I didn't merge my PR yet is because,

I wanted some more feedback from the two users who are currently known to be actually affected by the errors the outdated build.sh content causes, about what priorities they have so I could try to orient any further changes towards their needs, but unfortunately neither of them have responded yet, in their issues:

Do you think I should go ahead and merge that PR before you merge this one, or would you want to copy the changes from it to this PR, or should I continue to hold off from merging it?

Other than any hypothetical requests that the users haven't asked for yet, the changes are ready.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think I should go ahead and merge that PR before you merge this one, or would you want to copy the changes from it to this PR, or should I continue to hold off from merging it?

Do what you think is best / easiest for you - this PR can be adapted later on if necessary!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I will merge my PR in 24 hours, and then this PR can be rebased on it and I'll also test building this PR on-device after the rebase to make sure that its changes which work for NDK r28c also work for NDK r29.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have merged my PR now, which has caused this PR to have merge conflicts, but I hope it's not too much trouble to rebase this now.

TERMUX_PKG_AUTO_UPDATE=false
Expand Down
3 changes: 1 addition & 2 deletions packages/ndk-multilib/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ TERMUX_PKG_LICENSE="NCSA"
TERMUX_PKG_MAINTAINER="@termux"
# Version should be equal to TERMUX_NDK_{VERSION_NUM,REVISION} in
# scripts/properties.sh
TERMUX_PKG_VERSION=28c
TERMUX_PKG_REVISION=2
TERMUX_PKG_VERSION=29
TERMUX_PKG_SRCURL=https://dl.google.com/android/repository/android-ndk-r${TERMUX_PKG_VERSION}-linux.zip
TERMUX_PKG_SHA256=59c2f6dc96743b5daf5d1626684640b20a6bd2b1d85b13156b90333741bad5cc
TERMUX_PKG_AUTO_UPDATE=false
Expand Down
8 changes: 4 additions & 4 deletions packages/ndk-sysroot/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ TERMUX_PKG_LICENSE="NCSA"
TERMUX_PKG_MAINTAINER="@termux"
# Version should be equal to TERMUX_NDK_{VERSION_NUM,REVISION} in
# scripts/properties.sh
TERMUX_PKG_VERSION=28c
TERMUX_PKG_VERSION=29
TERMUX_PKG_SRCURL=https://dl.google.com/android/repository/android-ndk-r${TERMUX_PKG_VERSION}-linux.zip
TERMUX_PKG_SHA256=59c2f6dc96743b5daf5d1626684640b20a6bd2b1d85b13156b90333741bad5cc
TERMUX_PKG_AUTO_UPDATE=false
Expand Down Expand Up @@ -89,10 +89,10 @@ termux_step_make_install() {
NDK_ARCH=$TERMUX_ARCH
test $NDK_ARCH == 'i686' && NDK_ARCH='i386'

# clang 13 requires libunwind on Android.
cp toolchains/llvm/prebuilt/linux-x86_64/lib/clang/19/lib/linux/$NDK_ARCH/libatomic.a \
# clang requires libunwind on Android.
cp toolchains/llvm/prebuilt/linux-x86_64/lib/clang/21/lib/linux/$NDK_ARCH/libatomic.a \
$TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/lib
cp toolchains/llvm/prebuilt/linux-x86_64/lib/clang/19/lib/linux/$NDK_ARCH/libunwind.a \
cp toolchains/llvm/prebuilt/linux-x86_64/lib/clang/21/lib/linux/$NDK_ARCH/libunwind.a \
$TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/lib

# librt and libpthread are built into libc on android, so setup them as symlinks
Expand Down
3 changes: 1 addition & 2 deletions packages/vulkan-loader-android/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ TERMUX_PKG_LICENSE="NCSA"
TERMUX_PKG_MAINTAINER="@termux"
# Version should be equal to TERMUX_NDK_{VERSION_NUM,REVISION} in
# scripts/properties.sh
TERMUX_PKG_VERSION=28c
TERMUX_PKG_REVISION=1
TERMUX_PKG_VERSION=29
TERMUX_PKG_SRCURL=https://dl.google.com/android/repository/android-ndk-r${TERMUX_PKG_VERSION}-linux.zip
TERMUX_PKG_SHA256=59c2f6dc96743b5daf5d1626684640b20a6bd2b1d85b13156b90333741bad5cc
TERMUX_PKG_AUTO_UPDATE=false
Expand Down
6 changes: 3 additions & 3 deletions scripts/build/termux_step_setup_toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ termux_step_setup_toolchain() {
# Bump TERMUX_STANDALONE_TOOLCHAIN if a change is made in
# toolchain setup to ensure that everyone gets an updated
# toolchain
if [ "${TERMUX_NDK_VERSION}" = "28c" ]; then
TERMUX_STANDALONE_TOOLCHAIN+="-v2"
termux_setup_toolchain_28c
if [ "${TERMUX_NDK_VERSION}" = "29" ]; then
TERMUX_STANDALONE_TOOLCHAIN+="-v1"
termux_setup_toolchain_29
elif [ "${TERMUX_NDK_VERSION}" = 23c ]; then
TERMUX_STANDALONE_TOOLCHAIN+="-v8"
termux_setup_toolchain_23c
Expand Down
2 changes: 1 addition & 1 deletion scripts/build/termux_step_setup_variables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ termux_step_setup_variables() {

if [ "$TERMUX_PACKAGE_LIBRARY" = "bionic" ]; then
if [ "$TERMUX_ON_DEVICE_BUILD" = "false" ] && [ ! -d "$NDK" ]; then
termux_error_exit 'NDK not pointing at a directory!'
termux_error_exit "NDK ($NDK) not pointing at a directory!"
fi

if [ "$TERMUX_ON_DEVICE_BUILD" = "false" ] && ! grep -s -q "Pkg.Revision = $TERMUX_NDK_VERSION_NUM" "$NDK/source.properties"; then
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
termux_setup_toolchain_28c() {
termux_setup_toolchain_29() {
export CFLAGS=""
export CPPFLAGS=""
export LDFLAGS="-L${TERMUX__PREFIX__LIB_DIR}"
Expand Down
4 changes: 2 additions & 2 deletions scripts/properties.sh
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,8 @@ TERMUX_ANDROID_BUILD_TOOLS_VERSION=33.0.1
# change TERMUX_PKG_VERSION (and remove TERMUX_PKG_REVISION if necessary) in:
# apksigner, d8
# and trigger rebuild of them
: "${TERMUX_NDK_VERSION_NUM:="28"}"
: "${TERMUX_NDK_REVISION:="c"}"
: "${TERMUX_NDK_VERSION_NUM:="29"}"
: "${TERMUX_NDK_REVISION:=""}"
TERMUX_NDK_VERSION="${TERMUX_NDK_VERSION_NUM}${TERMUX_NDK_REVISION}"
# when changing the above:
# update version and hashsum in packages
Expand Down
4 changes: 2 additions & 2 deletions scripts/setup-android-sdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ set -e -u

ANDROID_SDK_FILE=commandlinetools-linux-${TERMUX_SDK_REVISION}_latest.zip
ANDROID_SDK_SHA256=0bebf59339eaa534f4217f8aa0972d14dc49e7207be225511073c661ae01da0a
if [ "$TERMUX_NDK_VERSION" = "28c" ]; then
if [ "$TERMUX_NDK_VERSION" = "29" ]; then
ANDROID_NDK_FILE=android-ndk-r${TERMUX_NDK_VERSION}-linux.zip
ANDROID_NDK_SHA256=dfb20d396df28ca02a8c708314b814a4d961dc9074f9a161932746f815aa552f
ANDROID_NDK_SHA256=4abbbcdc842f3d4879206e9695d52709603e52dd68d3c1fff04b3b5e7a308ecf
elif [ "$TERMUX_NDK_VERSION" = 23c ]; then
ANDROID_NDK_FILE=android-ndk-r${TERMUX_NDK_VERSION}-linux.zip
ANDROID_NDK_SHA256=6ce94604b77d28113ecd588d425363624a5228d9662450c48d2e4053f8039242
Expand Down