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"
|
2020-12-20 14:16:34 +01:00
|
|
|
TERMUX_PKG_MAINTAINER="@termux"
|
2020-07-17 14:17:02 +02:00
|
|
|
TERMUX_PKG_SRCURL=https://github.com/pulseaudio/pulseaudio.git
|
2021-01-17 21:31:02 +01:00
|
|
|
TERMUX_PKG_VERSION=14.2
|
2021-05-22 14:17:52 +02:00
|
|
|
TERMUX_PKG_REVISION=4
|
2021-01-18 08:25:29 +01:00
|
|
|
TERMUX_PKG_DEPENDS="libltdl, libsndfile, libandroid-glob, libsoxr, speexdsp, libwebrtc-audio-processing"
|
2019-10-07 15:27:31 +02:00
|
|
|
TERMUX_PKG_BREAKS="libpulseaudio-dev, libpulseaudio"
|
|
|
|
TERMUX_PKG_REPLACES="libpulseaudio-dev, libpulseaudio"
|
2021-05-22 14:17:52 +02:00
|
|
|
# glib is only a runtime dependency of pulseaudio-glib subpackage
|
|
|
|
TERMUX_PKG_BUILD_DEPENDS="libtool, glib"
|
2017-11-11 13:00:08 +01:00
|
|
|
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--disable-neon-opt
|
|
|
|
--disable-alsa
|
|
|
|
--disable-esound
|
2019-01-27 10:56:51 +01:00
|
|
|
--disable-x11
|
|
|
|
--disable-gtk3
|
2017-11-11 13:00:08 +01:00
|
|
|
--disable-openssl
|
2021-05-22 14:17:52 +02:00
|
|
|
--enable-glib2
|
2017-11-11 13:00:08 +01:00
|
|
|
--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
|
|
|
|
2020-07-17 14:17:02 +02:00
|
|
|
termux_step_post_get_source() {
|
2020-04-26 13:26:50 +02:00
|
|
|
NOCONFIGURE=1 ./bootstrap.sh
|
|
|
|
}
|
|
|
|
|
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-12-30 01:05:41 +01:00
|
|
|
export LIBS="-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
|
|
|
}
|