new package: spek

This commit is contained in:
Tee KOBAYASHI 2021-12-23 13:59:08 +09:00 committed by Yaksh Bariya
parent 3d29dc6a48
commit c4840d1c8b
No known key found for this signature in database
GPG Key ID: F7486BA7D3D27581
3 changed files with 69 additions and 0 deletions

View File

@ -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 '!<arch>' > $_LIBPTHREAD_A
fi
}
termux_step_post_make_install() {
if [ $_NEED_DUMMY_LIBPTHREAD_A ]; then
rm -f $_LIBPTHREAD_A
fi
}

View File

@ -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(

View File

@ -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;
};