Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new packages: JACK Audio Connection Kit and alsa-lib #20544

Merged
merged 5 commits into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions packages/alsa-lib/0001-path.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
diff --git a/src/conf/alsa.conf b/src/conf/alsa.conf
index e65bf2c..22e0730 100644
--- a/src/conf/alsa.conf
+++ b/src/conf/alsa.conf
@@ -8,10 +8,9 @@
{
func load
files [
- "/var/lib/alsa/conf.d"
- "/usr/etc/alsa/conf.d"
- "/etc/alsa/conf.d"
- "/etc/asound.conf|||/usr/etc/asound.conf"
+ "@TERMUX_PREFIX@/var/lib/alsa/conf.d"
+ "@TERMUX_PREFIX@/etc/alsa/conf.d"
+ "@TERMUX_PREFIX@/etc/asound.conf"
"~/.asoundrc"
{
@func concat
@@ -65,7 +64,7 @@ cards.@hooks [
file {
@func concat
strings [
- "/var/lib/alsa/card"
+ "@TERMUX_ALSA@/var/lib/alsa/card"
{ @func private_integer }
".conf.d"
]
24 changes: 24 additions & 0 deletions packages/alsa-lib/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
TERMUX_PKG_HOMEPAGE=https://www.alsa-project.org
TERMUX_PKG_DESCRIPTION="The Advanced Linux Sound Architecture (ALSA) - library"
TERMUX_PKG_LICENSE="LGPL-2.1"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="1.2.11"
TERMUX_PKG_SRCURL="https://github.com/alsa-project/alsa-lib/archive/refs/tags/v$TERMUX_PKG_VERSION.tar.gz"
TERMUX_PKG_SHA256=12216f0730d6dde3ded6a2a5388bc0009ad07f5c65972bd89aac9a76f8f085a4
TERMUX_PKG_DEPENDS="libandroid-sysv-semaphore, libandroid-shmem"
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
--disable-static
--with-versioned=no
--with-tmpdir=$TERMUX_PREFIX/tmp
"

termux_step_pre_configure() {
# pcm interface uses sysv semaphore which is broken on Android 14+ (issue #20514)
# Nonetheless, it is still enabled because:
# 1. probably never called because Android has no /dev/snd/pcm* device
# 2. still required for other packages in compile time, e.g. pipewire-alsa
# -landroid-shmem is for depending packages in compile time
LDFLAGS+=" -landroid-sysv-semaphore -landroid-shmem"
autoreconf -fi
}
22 changes: 22 additions & 0 deletions packages/alsa-utils/build.sh
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this reinstates support for alsa-utils I have removed it from disabled-packages in 7a1f71a.

Please check that volume_mapping.c.patch is not still applicable to the reinstated version.

--- ./alsamixer/volume_mapping.c 2016-08-02 22:39:45.000000000 +0530
+++ ../volume_mapping.c 2016-12-03 23:15:26.390744307 +0530
@@ -37,7 +37,7 @@
#include <stdbool.h>
#include "volume_mapping.h"
-#ifdef __UCLIBC__
+#if defined(__UCLIBC__) || defined(__ANDROID__)
/* 10^x = 10^(log e^x) = (e^x)^log10 = e^(x * log 10) */
#define exp10(x) (exp((x) * log(10)))
#endif /* __UCLIBC__ */

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no #define exp10(x) and no use of exp10 in the current version of alsa-utils.

Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
TERMUX_PKG_HOMEPAGE=https://www.alsa-project.org
TERMUX_PKG_DESCRIPTION="The Advanced Linux Sound Architecture (ALSA) - utils"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="1.2.11"
TERMUX_PKG_SRCURL="https://github.com/alsa-project/alsa-utils/archive/refs/tags/v$TERMUX_PKG_VERSION.tar.gz"
TERMUX_PKG_SHA256=978961153fa8ca4c783c93767e7054d0dc1fb42ef6f1008040ca71363d0f4d35
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_DEPENDS="ncurses"
TERMUX_PKG_BUILD_DEPENDS="alsa-lib"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
--with-udev-rules-dir=$TERMUX_PREFIX/lib/udev/rules.d
--with-asound-state-dir=$TERMUX_PREFIX/var/lib/alsa
--disable-bat
--disable-rst2man
"

termux_step_pre_configure() {
LDFLAGS+=" -llog"
export ACLOCAL_PATH="${TERMUX_PREFIX}/share/aclocal"
autoreconf -fi
}
8 changes: 8 additions & 0 deletions packages/jack-example-tools/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
TERMUX_PKG_HOMEPAGE=https://jackaudio.org/
TERMUX_PKG_DESCRIPTION="Official JACK example clients and tools"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_LICENSE="GPL-2.0, GPL-3.0"
TERMUX_PKG_VERSION=4
TERMUX_PKG_SRCURL=https://github.com/jackaudio/jack-example-tools/archive/refs/tags/$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=2b1e0dc3cb3b5bfb0423f0aeb21eb611437cf71ee0ace2ca199f05f02705f174
TERMUX_PKG_DEPENDS="alsa-lib, jack, libsamplerate, libsndfile"
11 changes: 11 additions & 0 deletions packages/jack/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
TERMUX_PKG_HOMEPAGE=https://github.com/termux/termux-packages
TERMUX_PKG_DESCRIPTION="A metapackage that provides JACK Audio Connection Kit"
TERMUX_PKG_LICENSE="Public Domain"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=0.0.1
TERMUX_PKG_AUTO_UPDATE=false
# TERMUX_PKG_DEPENDS="jack2 | pipewire-jack"
TERMUX_PKG_DEPENDS="jack2"
TERMUX_PKG_PLATFORM_INDEPENDENT=true
TERMUX_PKG_SKIP_SRC_EXTRACT=true
TERMUX_PKG_METAPACKAGE=true
Loading