2017-04-17 22:23:21 +02:00
|
|
|
TERMUX_PKG_HOMEPAGE=https://www.freedesktop.org/wiki/Software/PulseAudio
|
2019-10-07 15:27:31 +02:00
|
|
|
TERMUX_PKG_DESCRIPTION="A featureful, general-purpose sound server"
|
2019-01-21 13:53:58 +01:00
|
|
|
TERMUX_PKG_LICENSE="GPL-2.0"
|
2019-10-08 03:30:33 +02:00
|
|
|
TERMUX_PKG_VERSION=13.0
|
|
|
|
TERMUX_PKG_SHA256=961b23ca1acfd28f2bc87414c27bb40e12436efcf2158d29721b1e89f3f28057
|
2017-03-13 22:51:36 +01:00
|
|
|
TERMUX_PKG_SRCURL=https://www.freedesktop.org/software/pulseaudio/releases/pulseaudio-${TERMUX_PKG_VERSION}.tar.xz
|
2019-01-25 01:58:51 +01:00
|
|
|
TERMUX_PKG_DEPENDS="libltdl, libsndfile, libandroid-glob, libsoxr, speexdsp"
|
2019-10-07 15:27:31 +02:00
|
|
|
TERMUX_PKG_BREAKS="libpulseaudio-dev, libpulseaudio"
|
|
|
|
TERMUX_PKG_REPLACES="libpulseaudio-dev, libpulseaudio"
|
2017-09-12 02:05:33 +02:00
|
|
|
TERMUX_PKG_BUILD_DEPENDS="libtool"
|
2017-11-11 13:00:08 +01:00
|
|
|
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--disable-neon-opt
|
|
|
|
--disable-alsa
|
|
|
|
--disable-esound
|
|
|
|
--disable-glib2
|
2019-01-27 10:56:51 +01:00
|
|
|
--disable-x11
|
|
|
|
--disable-gtk3
|
2017-11-11 13:00:08 +01:00
|
|
|
--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
|
2019-10-08 04:41:40 +02:00
|
|
|
ax_cv_PTHREAD_PRIO_INHERIT=no"
|
2019-10-08 03:27:36 +02: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
|
|
|
|
2019-02-08 10:37:29 +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
|
2019-06-30 08:57:50 +02:00
|
|
|
cp $TERMUX_PKG_BUILDER_DIR/module-sles-source.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
|
|
|
|
2019-10-08 04:31:21 +02:00
|
|
|
export LIBS="-llog -landroid-glob"
|
2017-03-13 22:51:36 +01:00
|
|
|
}
|
|
|
|
|
2019-02-08 10:37:29 +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
|
2019-02-12 09:41:30 +01:00
|
|
|
ln -s -f $lib $(basename $lib)
|
2017-12-29 00:52:17 +01:00
|
|
|
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
|
|
|
}
|