From c4840d1c8b7e5d97c04747ce3ae11d1bbd471fdb Mon Sep 17 00:00:00 2001 From: Tee KOBAYASHI Date: Thu, 23 Dec 2021 13:59:08 +0900 Subject: [PATCH] new package: spek --- x11-packages/spek/build.sh | 33 +++++++++++++++++++ .../spek/src-spek-preferences.cc.patch | 25 ++++++++++++++ .../spek/src-spek-preferences.h.patch | 11 +++++++ 3 files changed, 69 insertions(+) create mode 100644 x11-packages/spek/build.sh create mode 100644 x11-packages/spek/src-spek-preferences.cc.patch create mode 100644 x11-packages/spek/src-spek-preferences.h.patch diff --git a/x11-packages/spek/build.sh b/x11-packages/spek/build.sh new file mode 100644 index 000000000..ab05b10af --- /dev/null +++ b/x11-packages/spek/build.sh @@ -0,0 +1,33 @@ +TERMUX_PKG_HOMEPAGE=http://spek.cc/ +TERMUX_PKG_DESCRIPTION="An acoustic spectrum analyser" +TERMUX_PKG_LICENSE="GPL-3.0" +TERMUX_PKG_MAINTAINER="@termux" +TERMUX_PKG_VERSION=0.8.3_p20181228 +_COMMIT=f071c2956176ad53c7c8059e5c00e694ded31ded +TERMUX_PKG_SRCURL=https://github.com/alexkay/spek.git +TERMUX_PKG_GIT_BRANCH=master +TERMUX_PKG_DEPENDS="ffmpeg, wxwidgets" +TERMUX_PKG_EXTRA_CONFIGURE_ARGS="ac_cv_path_WX_CONFIG_PATH=$TERMUX_PREFIX/bin/wx-config" + +termux_step_post_get_source() { + git fetch --unshallow + git checkout $_COMMIT +} + +termux_step_pre_configure() { + AUTOPOINT='intltoolize --automake --copy' \ + autoreconf -fi --include=$TERMUX_PREFIX/share/aclocal + + _NEED_DUMMY_LIBPTHREAD_A= + _LIBPTHREAD_A=$TERMUX_PREFIX/lib/libpthread.a + if [ ! -e $_LIBPTHREAD_A ]; then + _NEED_DUMMY_LIBPTHREAD_A=true + echo '!' > $_LIBPTHREAD_A + fi +} + +termux_step_post_make_install() { + if [ $_NEED_DUMMY_LIBPTHREAD_A ]; then + rm -f $_LIBPTHREAD_A + fi +} diff --git a/x11-packages/spek/src-spek-preferences.cc.patch b/x11-packages/spek/src-spek-preferences.cc.patch new file mode 100644 index 000000000..a9a10e029 --- /dev/null +++ b/x11-packages/spek/src-spek-preferences.cc.patch @@ -0,0 +1,25 @@ +--- a/src/spek-preferences.cc ++++ b/src/spek-preferences.cc +@@ -12,6 +12,7 @@ + + void SpekPreferences::init() + { ++#if wxUSE_INTL + if (this->locale) { + delete this->locale; + } +@@ -27,9 +28,14 @@ + } + this->locale->Init(lang); + this->locale->AddCatalog(GETTEXT_PACKAGE); ++#endif + } + ++#if wxUSE_INTL + SpekPreferences::SpekPreferences() : locale(NULL) ++#else ++SpekPreferences::SpekPreferences() ++#endif + { + wxString path = spek_platform_config_path("spek"); + this->config = new wxFileConfig( diff --git a/x11-packages/spek/src-spek-preferences.h.patch b/x11-packages/spek/src-spek-preferences.h.patch new file mode 100644 index 000000000..5fe6cf9ba --- /dev/null +++ b/x11-packages/spek/src-spek-preferences.h.patch @@ -0,0 +1,11 @@ +--- a/src/spek-preferences.h ++++ b/src/spek-preferences.h +@@ -21,6 +21,8 @@ + SpekPreferences(const SpekPreferences&); + void operator=(const SpekPreferences&); + ++#if wxUSE_INTL + wxLocale *locale; ++#endif + wxFileConfig *config; + };