From 3fa8029645b2f601f7478ef3b4192d97ec17b5ef Mon Sep 17 00:00:00 2001 From: termux-pacman-bot Date: Tue, 14 Oct 2025 16:41:13 +0000 Subject: [PATCH] fix(main/cmus): fix build with NDK r28c - https://github.com/termux/termux-packages/commit/0970a2f2d89f64acd7a3fc94845d298bee010cc6 patches Termux's `time.h`, but unfortunately, that patch is not compatible with the `-D__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__` argument internally used by `cmus`, so copying the vanilla `time.h` from its backup folder and using it specifically for only `cmus` is necessary. --- packages/cmus/build.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/cmus/build.sh b/packages/cmus/build.sh index d99c5dfd5e..251b376e9d 100644 --- a/packages/cmus/build.sh +++ b/packages/cmus/build.sh @@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Small, fast and powerful console music player" TERMUX_PKG_LICENSE="GPL-2.0" TERMUX_PKG_MAINTAINER="@termux" TERMUX_PKG_VERSION="2.12.0" -TERMUX_PKG_REVISION="4" +TERMUX_PKG_REVISION="5" TERMUX_PKG_DEPENDS="ffmpeg, libandroid-support, libflac, libiconv, libmad, libmodplug, libvorbis, libwavpack, ncurses, opusfile, pulseaudio, alsa-lib" TERMUX_PKG_SRCURL=https://github.com/cmus/cmus/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz TERMUX_PKG_SHA256=44b96cd5f84b0d84c33097c48454232d5e6a19cd33b9b6503ba9c13b6686bfc7 @@ -27,6 +27,14 @@ termux_step_pre_configure() { mkdir -p "${_libdir}" cp "$TERMUX_STANDALONE_TOOLCHAIN/sysroot/usr/lib/$TERMUX_HOST_PLATFORM/26/libaaudio.so" "${_libdir}" LDFLAGS+=" -L${_libdir}" + # this commit https://github.com/termux/termux-packages/commit/0970a2f2d89f64acd7a3fc94845d298bee010cc6 , + # which was necessary to compile coreutils with NDK 27, + # is, on the other hand, when combined with NDK r28c, + # incompatible with '-D__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__ -Werror=unguarded-availability,' + # which is used internally by the cmus package, + # so the vanilla header must be used for cmus in order to pass its termux_step_post_massage() successfully. + cp "$HOME/lib/android-ndk-r$TERMUX_NDK_VERSION/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/time.h" "${_libdir}" + CFLAGS+=" -I${_libdir}/" fi LD=$CC