From ce71538a9569d4fc7e67d0737e566791fe89bb65 Mon Sep 17 00:00:00 2001 From: Robert Kirkman Date: Thu, 31 Oct 2024 14:41:05 -0500 Subject: [PATCH] fix(main/predict): prevent opportunistic inclusion of asoundlib.h Fixes #22048 --- packages/predict/build.sh | 1 + packages/predict/disable-alsa.patch | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 packages/predict/disable-alsa.patch diff --git a/packages/predict/build.sh b/packages/predict/build.sh index d9a4f41d679921..fe48e3e9c50140 100644 --- a/packages/predict/build.sh +++ b/packages/predict/build.sh @@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="A Satellite Tracking/Orbital Prediction Program" TERMUX_PKG_LICENSE="GPL-2.0" TERMUX_PKG_MAINTAINER="@termux" TERMUX_PKG_VERSION=2.3.1 +TERMUX_PKG_REVISION=1 TERMUX_PKG_SRCURL=https://www.qsl.net/kd2bd/predict-${TERMUX_PKG_VERSION}-termux.tar.gz TERMUX_PKG_SHA256=6eecccb21117e6ae57941659ac5d1d5f8cf99103ec8448e4fd8c076620bbd77b TERMUX_PKG_DEPENDS="ncurses, ncurses-ui-libs,play-audio,wget" diff --git a/packages/predict/disable-alsa.patch b/packages/predict/disable-alsa.patch new file mode 100644 index 00000000000000..13a27abcfaef48 --- /dev/null +++ b/packages/predict/disable-alsa.patch @@ -0,0 +1,26 @@ +I don't think that the upstream developer should copy and paste this patch +directly into their code if they see it. I think they should move around some +of their code blocks in a different way in order to make future release archives +not have this problem, but writing the patch for the current version of this +package with only 2 lines of changes keeps the patch file small. + +--- a/predict.c ++++ b/predict.c +@@ -38,7 +38,7 @@ + #include "predict.h" + + #if defined __has_include +- #if __has_include() ++ #if __has_include() && !defined(__ANDROID__) + #include + #elif defined (__ANDROID__) + char wavestring[1024]; +@@ -269,7 +269,7 @@ tle_t tle; + /* "Vocalizer" functions for Linux/Unix */ + + #if defined __has_include +- #if __has_include() ++ #if __has_include() && !defined(__ANDROID__) + + unsigned long buffer2long(int indx) + {