new package: squeezelite

This commit is contained in:
Tee KOBAYASHI 2021-12-13 20:57:36 +09:00 committed by Leonid Pliushch
parent 283b6f0f14
commit e77ee26d73
2 changed files with 37 additions and 0 deletions

View File

@ -0,0 +1,24 @@
TERMUX_PKG_HOMEPAGE=https://ralph-irving.github.io/squeezelite.html
TERMUX_PKG_DESCRIPTION="A small headless Logitech Squeezebox emulator"
TERMUX_PKG_LICENSE="GPL-3.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=1.9.9
_COMMIT=370020f2dd572f0ab5464d8ef4e47ebf21b19468
TERMUX_PKG_SRCURL=https://github.com/ralph-irving/squeezelite.git
TERMUX_PKG_GIT_BRANCH=master
TERMUX_PKG_DEPENDS="libmad, mpg123, pulseaudio"
TERMUX_PKG_BUILD_IN_SRC=true
termux_step_post_get_source() {
git fetch --unshallow
git checkout $_COMMIT
}
termux_step_pre_configure() {
export OPTS="-DLINKALL -DNO_FAAD -DPULSEAUDIO"
export LDADD="-lm"
}
termux_step_make_install() {
install -Dm700 squeezelite $TERMUX_PREFIX/bin/
}

View File

@ -0,0 +1,13 @@
--- a/squeezelite.h
+++ b/squeezelite.h
@@ -316,6 +316,10 @@
typedef int32_t s32_t;
typedef int64_t s64_t;
+#if defined __ANDROID__ && __ANDROID__API__ < 28
+#define pthread_mutexattr_setprotocol(attr, protocol) (EINVAL)
+#endif
+
#define mutex_type pthread_mutex_t
#define mutex_create(m) pthread_mutex_init(&m, NULL)
#define mutex_create_p(m) pthread_mutexattr_t attr; pthread_mutexattr_init(&attr); pthread_mutexattr_setprotocol(&attr, PTHREAD_PRIO_INHERIT); pthread_mutex_init(&m, &attr); pthread_mutexattr_destroy(&attr)