change(main/{apksigner,d8,libc++,ndk-multilib,ndk-sysroot}): enable TERMUX_PKG_ON_DEVICE_BUILD_NOT_SUPPORTED as per d502e748

This commit is contained in:
Maxython 2023-01-03 19:59:54 +05:00 committed by agnostic-apollo
parent d502e7489d
commit 25f6891edc
5 changed files with 5 additions and 20 deletions

View File

@ -8,13 +8,9 @@ TERMUX_PKG_DEPENDS="openjdk-17"
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_PLATFORM_INDEPENDENT=true
TERMUX_PKG_SKIP_SRC_EXTRACT=true
TERMUX_PKG_ON_DEVICE_BUILD_NOT_SUPPORTED=true
termux_step_pre_configure() {
# Requires Android SDK, not available on device
if $TERMUX_ON_DEVICE_BUILD; then
termux_error_exit "Package '$TERMUX_PKG_NAME' is not available for on-device builds."
fi
# Version guard
if [ "${TERMUX_PKG_VERSION#*:}" != "${TERMUX_ANDROID_BUILD_TOOLS_VERSION}" ]; then
termux_error_exit "Version mismatch between TERMUX_PKG_VERSION and TERMUX_ANDROID_BUILD_TOOLS_VERSION."

View File

@ -8,13 +8,9 @@ TERMUX_PKG_DEPENDS="openjdk-17"
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_PLATFORM_INDEPENDENT=true
TERMUX_PKG_SKIP_SRC_EXTRACT=true
TERMUX_PKG_ON_DEVICE_BUILD_NOT_SUPPORTED=true
termux_step_pre_configure() {
# Requires Android SDK, not available on device
if $TERMUX_ON_DEVICE_BUILD; then
termux_error_exit "Package '$TERMUX_PKG_NAME' is not available for on-device builds."
fi
# Version guard
if [ "${TERMUX_PKG_VERSION#*:}" != "${TERMUX_ANDROID_BUILD_TOOLS_VERSION}" ]; then
termux_error_exit "Version mismatch between TERMUX_PKG_VERSION and TERMUX_ANDROID_BUILD_TOOLS_VERSION."

View File

@ -5,10 +5,8 @@ TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=$TERMUX_NDK_VERSION
TERMUX_PKG_SKIP_SRC_EXTRACT=true
TERMUX_PKG_ESSENTIAL=true
TERMUX_PKG_ON_DEVICE_BUILD_NOT_SUPPORTED=true
termux_step_post_make_install() {
if $TERMUX_ON_DEVICE_BUILD; then
termux_error_exit "Package '$TERMUX_PKG_NAME' is not available for on-device builds."
fi
cp "$TERMUX_STANDALONE_TOOLCHAIN/sysroot/usr/lib/${TERMUX_HOST_PLATFORM}/libc++_shared.so" $TERMUX_PREFIX/lib
}

View File

@ -6,6 +6,7 @@ TERMUX_PKG_VERSION=$TERMUX_NDK_VERSION
TERMUX_PKG_SKIP_SRC_EXTRACT=true
TERMUX_PKG_PLATFORM_INDEPENDENT=true
TERMUX_PKG_NO_STATICSPLIT=true
TERMUX_PKG_ON_DEVICE_BUILD_NOT_SUPPORTED=true
prepare_libs() {
local ARCH="$1"
@ -47,9 +48,6 @@ add_cross_compiler_rt() {
}
termux_step_extract_into_massagedir() {
if $TERMUX_ON_DEVICE_BUILD; then
termux_error_exit "Package '$TERMUX_PKG_NAME' is not available for on-device builds."
fi
prepare_libs "arm" "arm-linux-androideabi"
prepare_libs "arm64" "aarch64-linux-android"
prepare_libs "x86" "i686-linux-android"

View File

@ -10,12 +10,9 @@ TERMUX_PKG_SKIP_SRC_EXTRACT=true
TERMUX_PKG_CONFLICTS="libutil-dev, libgcc, libandroid-support-dev"
TERMUX_PKG_REPLACES="libutil-dev, libgcc, libandroid-support-dev, ndk-stl"
TERMUX_PKG_NO_STATICSPLIT=true
TERMUX_PKG_ON_DEVICE_BUILD_NOT_SUPPORTED=true
termux_step_extract_into_massagedir() {
if $TERMUX_ON_DEVICE_BUILD; then
termux_error_exit "Package '$TERMUX_PKG_NAME' is not available for on-device builds."
fi
mkdir -p $TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/lib \
$TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/include