2017-04-17 22:23:21 +02:00
|
|
|
TERMUX_PKG_HOMEPAGE=https://www.freedesktop.org/wiki/Software/PulseAudio
|
2017-03-13 22:51:36 +01:00
|
|
|
TERMUX_PKG_DESCRIPTION="A featureful, general-purpose sound server - shared libraries"
|
2018-07-23 00:21:12 +02:00
|
|
|
TERMUX_PKG_VERSION=12.2
|
2018-09-23 10:35:25 +02:00
|
|
|
TERMUX_PKG_REVISION=8
|
2018-07-23 00:21:12 +02:00
|
|
|
TERMUX_PKG_SHA256=809668ffc296043779c984f53461c2b3987a45b7a25eb2f0a1d11d9f23ba4055
|
2017-03-13 22:51:36 +01:00
|
|
|
TERMUX_PKG_SRCURL=https://www.freedesktop.org/software/pulseaudio/releases/pulseaudio-${TERMUX_PKG_VERSION}.tar.xz
|
2018-02-01 22:24:34 +01:00
|
|
|
TERMUX_PKG_DEPENDS="libltdl, libsndfile, libandroid-glob, libsoxr"
|
2017-09-12 02:05:33 +02:00
|
|
|
TERMUX_PKG_BUILD_DEPENDS="libtool"
|
2017-03-13 22:51:36 +01:00
|
|
|
TERMUX_PKG_INCLUDE_IN_DEVPACKAGE="share/vala"
|
2017-11-11 13:00:08 +01:00
|
|
|
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--disable-neon-opt
|
|
|
|
--disable-alsa
|
|
|
|
--disable-esound
|
|
|
|
--disable-glib2
|
|
|
|
--disable-openssl
|
|
|
|
--without-caps
|
|
|
|
--with-database=simple
|
2018-02-01 22:24:34 +01:00
|
|
|
--disable-memfd
|
2018-06-21 23:33:11 +02:00
|
|
|
--disable-gsettings
|
2018-05-27 14:55:20 +02:00
|
|
|
--bindir=$TERMUX_PREFIX/libexec
|
2018-08-15 03:55:39 +02:00
|
|
|
ax_cv_PTHREAD_PRIO_INHERIT=no
|
|
|
|
ac_cv_func_posix_madvise=no"
|
2017-12-29 00:52:17 +01:00
|
|
|
TERMUX_PKG_CONFFILES="etc/pulse/client.conf etc/pulse/daemon.conf etc/pulse/default.pa etc/pulse/system.pa"
|
2017-03-13 22:51:36 +01:00
|
|
|
|
|
|
|
termux_step_pre_configure () {
|
2018-08-21 00:25:06 +02:00
|
|
|
# Our aaudio sink module needs libaaudio.so from a later android api version:
|
|
|
|
local _NDK_ARCHNAME=$TERMUX_ARCH
|
|
|
|
if [ "$TERMUX_ARCH" = "aarch64" ]; then
|
|
|
|
_NDK_ARCHNAME=arm64
|
|
|
|
elif [ "$TERMUX_ARCH" = "i686" ]; then
|
|
|
|
_NDK_ARCHNAME=x86
|
|
|
|
fi
|
|
|
|
mkdir $TERMUX_PKG_TMPDIR/libaaudio
|
|
|
|
cp $NDK/platforms/android-26/arch-$_NDK_ARCHNAME/usr/lib*/libaaudio.so \
|
|
|
|
$TERMUX_PKG_TMPDIR/libaaudio/
|
|
|
|
LDFLAGS+=" -L$TERMUX_PKG_TMPDIR/libaaudio/"
|
|
|
|
|
2017-12-29 00:52:17 +01:00
|
|
|
mkdir $TERMUX_PKG_SRCDIR/src/modules/sles
|
|
|
|
cp $TERMUX_PKG_BUILDER_DIR/module-sles-sink.c $TERMUX_PKG_SRCDIR/src/modules/sles
|
2018-08-15 03:54:04 +02:00
|
|
|
mkdir $TERMUX_PKG_SRCDIR/src/modules/aaudio
|
|
|
|
cp $TERMUX_PKG_BUILDER_DIR/module-aaudio-sink.c $TERMUX_PKG_SRCDIR/src/modules/aaudio
|
2018-08-21 00:25:06 +02:00
|
|
|
|
2017-12-29 00:52:17 +01:00
|
|
|
intltoolize --automake --copy --force
|
2018-08-21 00:25:06 +02:00
|
|
|
|
2017-12-29 00:52:17 +01:00
|
|
|
LDFLAGS+=" -llog -landroid-glob"
|
2017-03-13 22:51:36 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
termux_step_post_make_install () {
|
2017-12-29 00:52:17 +01:00
|
|
|
# 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
|
2018-08-05 09:03:51 +02:00
|
|
|
|
2017-12-29 00:52:17 +01:00
|
|
|
# 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/^/#/'
|
|
|
|
echo "load-module module-sles-sink" >> $TERMUX_PREFIX/etc/pulse/default.pa
|
2018-08-15 03:54:04 +02:00
|
|
|
echo "#load-module module-aaudio-sink" >> $TERMUX_PREFIX/etc/pulse/default.pa
|
2017-03-13 22:51:36 +01:00
|
|
|
|
2018-08-05 09:03:51 +02:00
|
|
|
if [ "$TERMUX_ARCH_BITS" = 32 ]; then
|
|
|
|
SYSTEM_LIB=lib
|
|
|
|
else
|
|
|
|
SYSTEM_LIB=lib64
|
|
|
|
fi
|
|
|
|
|
|
|
|
cd $TERMUX_PREFIX/libexec
|
|
|
|
for bin in pacat pacmd pactl pasuspender pulseaudio; do
|
2018-02-01 22:24:34 +01:00
|
|
|
rm -f ../bin/$bin
|
2018-08-05 09:03:51 +02:00
|
|
|
echo "#!$TERMUX_PREFIX/bin/sh" >> ../bin/$bin
|
|
|
|
echo "LD_LIBRARY_PATH=/system/$SYSTEM_LIB:/system/vendor/$SYSTEM_LIB:$TERMUX_PREFIX/lib exec $TERMUX_PREFIX/libexec/$bin \"\$@\"" >> ../bin/$bin
|
|
|
|
chmod +x ../bin/$bin
|
2017-12-29 00:52:17 +01:00
|
|
|
done
|
2017-03-13 22:51:36 +01:00
|
|
|
}
|