Browse Source
* New package: libsndfile-1.0.27 * Bring back disabled package alsa-lib * Bring back disabled package alsa-utils * New disabled package: alsa-plugins-1.1.1 * New package: libpulseaudio-10.0, subpackage pulseaudioandroid-5
Alain Kalker
8 years ago
committed by
Fredrik Fornwall
15 changed files with 255 additions and 0 deletions
@ -0,0 +1,11 @@ |
|||
--- ./src/conf/alsa.conf.orig 2016-12-20 14:43:20.000000000 +0000
|
|||
+++ ./src/conf/alsa.conf 2017-03-06 22:51:47.242150837 +0000
|
|||
@@ -15,7 +15,7 @@
|
|||
"/alsa.conf.d/" |
|||
] |
|||
} |
|||
- "/etc/asound.conf"
|
|||
+ "@TERMUX_PREFIX@/etc/asound.conf"
|
|||
"~/.asoundrc" |
|||
] |
|||
errors false |
@ -0,0 +1,17 @@ |
|||
# patches taken from https://github.com/michaelwu/alsa-lib |
|||
TERMUX_PKG_HOMEPAGE=http://www.alsa-project.org |
|||
TERMUX_PKG_VERSION=1.1.3 |
|||
# TERMUX_PKG_DEPENDS="libandroid-shmem, python2" |
|||
TERMUX_PKG_DEPENDS="libandroid-shmem" |
|||
TERMUX_PKG_SRCURL=ftp://ftp.alsa-project.org/pub/lib/alsa-lib-$TERMUX_PKG_VERSION.tar.bz2 |
|||
TERMUX_PKG_SHA256=71282502184c592c1a008e256c22ed0ba5728ca65e05273ceb480c70f515969c |
|||
# TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--with-pythonlibs=\"-lpython2.7\" --with-pythonincludes=-I/$TERMUX_PREFIX/include/python2.7" |
|||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--disable-python" |
|||
|
|||
termux_step_pre_configure () { |
|||
#LDFLAGS="$LDFLAGS -landroid-shmem" |
|||
#_files='src/pcm/pcm_dsnoop.c src/pcm/pcm_mmap.c src/pcm/pcm_shm.c src/pcm/pcm_dmix.c src/pcm/pcm_dshare.c src/pcm/pcm_direct.c src/shmarea.c src/control/control_shm.c aserver/aserver.c' |
|||
#for _file in $_files; do sed -i 's%#include <sys/shm.h>%#include <shmem/shm.h>%' "$TERMUX_PKG_SRCDIR/$_file"; done |
|||
#export ac_cv_header_sys_shm_h='no' |
|||
CPPFLAGS="$CPPFLAGS -DTERMUX_SHMEM_STUBS -DTERMUX_SEMOPS_STUBS" |
|||
} |
@ -0,0 +1,17 @@ |
|||
--- ./src/pcm/pcm_direct.c 2016-08-02 23:18:38.000000000 +0530
|
|||
+++ ./src/pcm/pcm_direct.c 2016-12-02 23:19:30.771819040 +0530
|
|||
@@ -44,12 +44,14 @@
|
|||
* |
|||
*/ |
|||
|
|||
+#if !defined(ANDROID) && !defined(__ANDROID__)
|
|||
union semun { |
|||
int val; /* Value for SETVAL */ |
|||
struct semid_ds *buf; /* Buffer for IPC_STAT, IPC_SET */ |
|||
unsigned short *array; /* Array for GETALL, SETALL */ |
|||
struct seminfo *__buf; /* Buffer for IPC_INFO (Linux specific) */ |
|||
}; |
|||
+#endif
|
|||
|
|||
/* |
|||
* FIXME: |
@ -0,0 +1,20 @@ |
|||
--- ./src/pcm/pcm_mmap.c 2016-08-02 23:18:38.000000000 +0530
|
|||
+++ /home/vishal/AndroidDev/alsa/src/pcm/pcm_mmap.c 2016-12-03 00:06:36.620336924 +0530
|
|||
@@ -344,7 +344,7 @@
|
|||
i->addr = ptr; |
|||
break; |
|||
case SND_PCM_AREA_SHM: |
|||
-#ifdef HAVE_SYS_SHM_H
|
|||
+#if 0
|
|||
if (i->u.shm.shmid < 0) { |
|||
int id; |
|||
/* FIXME: safer permission? */ |
|||
@@ -474,7 +474,7 @@
|
|||
errno = 0; |
|||
break; |
|||
case SND_PCM_AREA_SHM: |
|||
-#ifdef HAVE_SYS_SHM_H
|
|||
+#if 0
|
|||
if (i->u.shm.area) { |
|||
snd_shm_area_destroy(i->u.shm.area); |
|||
i->u.shm.area = NULL; |
@ -0,0 +1,24 @@ |
|||
diff -ruN ./src/conf.c /home/vishal/AndroidDev/alsa/src/conf.c
|
|||
--- ./src/conf.c 2016-08-02 23:18:38.000000000 +0530
|
|||
+++ /home/vishal/AndroidDev/alsa/src/conf.c 2016-12-02 23:42:04.689785910 +0530
|
|||
@@ -3558,7 +3558,7 @@
|
|||
int n; |
|||
|
|||
#ifndef DOC_HIDDEN |
|||
-#if defined(_GNU_SOURCE) && !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__sun)
|
|||
+#if defined(_GNU_SOURCE) && !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__sun) && !defined(__ANDROID__) && !defined(ANDROID)
|
|||
#define SORTFUNC versionsort |
|||
#else |
|||
#define SORTFUNC alphasort |
|||
diff -ruN ./src/ucm/parser.c /home/vishal/AndroidDev/alsa/src/ucm/parser.c
|
|||
--- ./src/ucm/parser.c 2016-08-02 23:18:38.000000000 +0530
|
|||
+++ /home/vishal/AndroidDev/alsa/src/ucm/parser.c 2016-12-02 23:42:17.406370931 +0530
|
|||
@@ -1274,7 +1274,7 @@
|
|||
"%s", env ? env : ALSA_USE_CASE_DIR); |
|||
filename[MAX_FILE-1] = '\0'; |
|||
|
|||
-#if defined(_GNU_SOURCE) && !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__sun)
|
|||
+#if defined(_GNU_SOURCE) && !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__sun) && !defined(__ANDROID__) && !defined(ANDROID)
|
|||
#define SORTFUNC versionsort |
|||
#else |
|||
#define SORTFUNC alphasort |
@ -0,0 +1,16 @@ |
|||
# Use pulseaudio by default |
|||
pcm.!default { |
|||
type pulse |
|||
fallback "sysdefault" |
|||
hint { |
|||
show on |
|||
description "Default ALSA Output (currently PulseAudio Sound Server)" |
|||
} |
|||
} |
|||
|
|||
ctl.!default { |
|||
type pulse |
|||
fallback "sysdefault" |
|||
} |
|||
|
|||
# vim:set ft=alsaconf: |
@ -0,0 +1,10 @@ |
|||
TERMUX_PKG_HOMEPAGE=http://www.alsa-project.org |
|||
TERMUX_PKG_VERSION=1.1.1 |
|||
TERMUX_PKG_SRCURL=ftp://ftp.alsa-project.org/pub/plugins/alsa-plugins-$TERMUX_PKG_VERSION.tar.bz2 |
|||
TERMUX_PKG_SHA256=8ea4d1e082c36528a896a2581e5eb62d4dc2683238e353050d0d624e65f901f1 |
|||
TERMUX_PKG_DEPENDS="alsa-lib, pulseaudio" |
|||
TERMUX_PKG_EXTRA_MAKE_ARGS='SUBDIRS=pulse' |
|||
|
|||
termux_step_post_make_install () { |
|||
cp $TERMUX_PKG_BUILDER_DIR/asound.conf $TERMUX_PREFIX/etc |
|||
} |
@ -0,0 +1,10 @@ |
|||
TERMUX_PKG_HOMEPAGE=http://www.alsa-project.org |
|||
TERMUX_PKG_VERSION=1.1.3 |
|||
TERMUX_PKG_SRCURL=ftp://ftp.alsa-project.org/pub/utils/alsa-utils-$TERMUX_PKG_VERSION.tar.bz2 |
|||
TERMUX_PKG_SHA256=127217a54eea0f9a49700a2f239a2d4f5384aa094d68df04a8eb80132eb6167c |
|||
TERMUX_PKG_DEPENDS="alsa-lib, ncurses" |
|||
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" |
|||
} |
@ -0,0 +1,27 @@ |
|||
--- ./configure 2016-08-02 22:44:23.000000000 +0530
|
|||
+++ ../configure 2016-12-03 23:06:46.641370754 +0530
|
|||
@@ -7123,7 +7123,7 @@
|
|||
LDFLAGS="$LDFLAGS $ALSA_LIBS" |
|||
fi |
|||
|
|||
-ALSA_LIBS="$ALSA_LIBS -lasound -lm -ldl -lpthread"
|
|||
+ALSA_LIBS="$ALSA_LIBS -lasound -lm -ldl"
|
|||
LIBS="$ALSA_LIBS $LIBS" |
|||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ALSA_LIBS" >&5 |
|||
$as_echo "$ALSA_LIBS" >&6; } |
|||
@@ -7741,7 +7741,6 @@
|
|||
$as_echo_n "(cached) " >&6 |
|||
else |
|||
ac_check_lib_save_LIBS=$LIBS |
|||
-LIBS="-lpthread $LIBS"
|
|||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
|||
/* end confdefs.h. */ |
|||
|
|||
@@ -7776,7 +7775,6 @@
|
|||
#define HAVE_LIBPTHREAD 1 |
|||
_ACEOF |
|||
|
|||
- LIBS="-lpthread $LIBS"
|
|||
|
|||
else |
|||
as_fn_error $? "Error: need PTHREAD library" "$LINENO" 5 |
@ -0,0 +1,11 @@ |
|||
--- ./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__ */ |
@ -0,0 +1,26 @@ |
|||
TERMUX_PKG_HOMEPAGE=http://www.freedesktop.org/wiki/Software/PulseAudio |
|||
TERMUX_PKG_DESCRIPTION="A featureful, general-purpose sound server - shared libraries" |
|||
TERMUX_PKG_VERSION=10.0 |
|||
TERMUX_PKG_SRCURL=https://www.freedesktop.org/software/pulseaudio/releases/pulseaudio-${TERMUX_PKG_VERSION}.tar.xz |
|||
TERMUX_PKG_SHA256=a3186824de9f0d2095ded5d0d0db0405dc73133983c2fbb37291547e37462f57 |
|||
TERMUX_PKG_DEPENDS="libltdl, libsndfile" |
|||
TERMUX_PKG_INCLUDE_IN_DEVPACKAGE="share/vala" |
|||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--disable-neon-opt --disable-alsa --disable-esound --disable-glib2 --disable-openssl --without-caps --with-database=simple" |
|||
TERMUX_PKG_CONFFILES="etc/pulse/client.conf etc/pulse/daemon.conf etc/pulse/dafault.pa etc/pulse/system.pa" |
|||
|
|||
termux_step_pre_configure () { |
|||
LDFLAGS+=" -llog" |
|||
} |
|||
|
|||
termux_step_post_make_install () { |
|||
# Some binaries link against these: |
|||
cd $TERMUX_PREFIX/lib |
|||
for lib in pulseaudio/lib*.so* pulse-${TERMUX_PKG_VERSION}/modules/lib*.so*; do |
|||
ln -s -f $lib `basename $lib` |
|||
done |
|||
|
|||
# Pulseaudio fails to start when it cannot detect any sound hardware |
|||
# so disable hardware detection. |
|||
sed -i $TERMUX_PREFIX/etc/pulse/default.pa \ |
|||
-e '/^load-module module-detect$/s/^/#/' |
|||
} |
@ -0,0 +1,28 @@ |
|||
diff --git a/src/pulsecore/iochannel.c b/src/pulsecore/iochannel.c
|
|||
index 8ace297ff..897337522 100644
|
|||
--- a/src/pulsecore/iochannel.c
|
|||
+++ b/src/pulsecore/iochannel.c
|
|||
@@ -355,7 +355,7 @@ ssize_t pa_iochannel_write_with_fds(pa_iochannel*io, const void*data, size_t l,
|
|||
struct iovec iov; |
|||
union { |
|||
struct cmsghdr hdr; |
|||
- uint8_t data[CMSG_SPACE(sizeof(int) * nfd)];
|
|||
+ uint8_t data[CMSG_SPACE(sizeof(int) * MAX_ANCIL_DATA_FDS)];
|
|||
} cmsg; |
|||
|
|||
pa_assert(io); |
|||
@@ -382,7 +382,13 @@ ssize_t pa_iochannel_write_with_fds(pa_iochannel*io, const void*data, size_t l,
|
|||
mh.msg_iov = &iov; |
|||
mh.msg_iovlen = 1; |
|||
mh.msg_control = &cmsg; |
|||
- mh.msg_controllen = sizeof(cmsg);
|
|||
+
|
|||
+ /* If we followed the example on the cmsg man page, we'd use
|
|||
+ * sizeof(cmsg.data) here, but if nfd < MAX_ANCIL_DATA_FDS, then the data
|
|||
+ * buffer is larger than needed, and the kernel doesn't like it if we set
|
|||
+ * msg_controllen to a larger than necessary value. The commit message for
|
|||
+ * commit 451d1d6762 contains a longer explanation. */
|
|||
+ mh.msg_controllen = CMSG_SPACE(sizeof(int) * nfd);
|
|||
|
|||
if ((r = sendmsg(io->ofd, &mh, MSG_NOSIGNAL)) >= 0) { |
|||
io->writable = io->hungup = false; |
@ -0,0 +1,3 @@ |
|||
TERMUX_SUBPKG_INCLUDE="bin/ etc/ lib/libcli.so* lib/libprotocol-*.so* lib/librtp.so* lib/pulse-${TERMUX_PKG_VERSION}/ share/" |
|||
TERMUX_SUBPKG_DESCRIPTION="A featureful, general-purpose sound server" |
|||
TERMUX_SUBPKG_DEPENDS="libpulseaudio" |
@ -0,0 +1,29 @@ |
|||
--- src/src/pulsecore/core-util.c.orig 2017-01-13 03:02:18.000000000 +0000
|
|||
+++ src/src/pulsecore/core-util.c 2017-03-06 22:31:51.321911880 +0000
|
|||
@@ -1812,7 +1812,7 @@
|
|||
* users, too. Since we need POSIX locking and UNIX sockets in |
|||
* this directory, we try XDG_RUNTIME_DIR first, and if that isn't |
|||
* set create a directory in $HOME and link it to a random subdir |
|||
- * in /tmp, if it was not explicitly configured. */
|
|||
+ * in @TERMUX_PREFIX@/tmp, if it was not explicitly configured. */
|
|||
|
|||
m = pa_in_system_mode() ? 0755U : 0700U; |
|||
|
|||
@@ -1885,7 +1885,7 @@
|
|||
|
|||
#ifdef HAVE_SYMLINK |
|||
/* Hmm, so the runtime directory didn't exist yet, so let's |
|||
- * create one in /tmp and symlink that to it */
|
|||
+ * create one in @TERMUX_PREFIX@/tmp and symlink that to it */
|
|||
|
|||
if (make_random_dir_and_link(0700, k) < 0) { |
|||
|
|||
@@ -3429,7 +3429,7 @@
|
|||
pa_is_path_absolute(t)) |
|||
return t; |
|||
|
|||
- return "/tmp";
|
|||
+ return "@TERMUX_PREFIX@/tmp";
|
|||
} |
|||
|
|||
int pa_open_cloexec(const char *fn, int flags, mode_t mode) { |
@ -0,0 +1,6 @@ |
|||
TERMUX_PKG_HOMEPAGE=http://www.mega-nerd.com/libsndfile |
|||
TERMUX_PKG_VERSION=1.0.27 |
|||
TERMUX_PKG_SRCURL=http://www.mega-nerd.com/libsndfile/files/libsndfile-$TERMUX_PKG_VERSION.tar.gz |
|||
TERMUX_PKG_SHA256=a391952f27f4a92ceb2b4c06493ac107896ed6c76be9a613a4731f076d30fac0 |
|||
TERMUX_PKG_DEPENDS="libflac, libvorbis" |
|||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--disable-sqlite --disable-alsa" |
Loading…
Reference in new issue