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-06-21 22:31:58 +02:00
|
|
|
TERMUX_PKG_VERSION=12.0
|
|
|
|
TERMUX_PKG_SHA256=6e422dbdc9fd11c0cb6af869e5eda73dc24a8be3c14725440edd51ce6b464444
|
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
|
|
|
|
ax_cv_PTHREAD_PRIO_INHERIT=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 () {
|
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
|
|
|
|
intltoolize --automake --copy --force
|
|
|
|
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
|
|
|
|
if [ $TERMUX_ARCH_BITS = "32" ]; then
|
|
|
|
SYSTEM_LIB=lib
|
|
|
|
else
|
|
|
|
SYSTEM_LIB=lib64
|
|
|
|
fi
|
|
|
|
# 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-02-01 22:24:34 +01:00
|
|
|
cd $TERMUX_PREFIX/libexec
|
2017-03-13 22:51:36 +01:00
|
|
|
|
2017-12-29 00:52:17 +01:00
|
|
|
for bin in esdcompat pacat pacmd pactl pasuspender pulseaudio; do
|
2018-02-01 22:24:34 +01:00
|
|
|
rm -f ../bin/$bin
|
2017-12-29 00:52:17 +01:00
|
|
|
local PA_LIBS="" lib
|
|
|
|
for lib in android-glob pulse pulsecommon-11.1 pulsecore-11.1; do
|
|
|
|
if [ -n "$PA_LIBS" ]; then PA_LIBS+=":"; fi
|
|
|
|
PA_LIBS+="$TERMUX_PREFIX/lib/lib${lib}.so"
|
|
|
|
done
|
2018-02-01 22:24:34 +01:00
|
|
|
echo "#!$TERMUX_PREFIX/bin/sh" >> $TERMUX_PREFIX/bin/$bin
|
2017-12-29 00:52:17 +01:00
|
|
|
echo "export LD_PRELOAD=$PA_LIBS" >> $TERMUX_PREFIX/bin/$bin
|
2018-02-01 22:24:34 +01:00
|
|
|
echo "LD_LIBRARY_PATH=/system/$SYSTEM_LIB:/system/vendor/$SYSTEM_LIB:$TERMUX_PREFIX/lib exec $TERMUX_PREFIX/libexec/$bin \$@" >> $TERMUX_PREFIX/bin/$bin
|
|
|
|
chmod +x $TERMUX_PREFIX/bin/$bin
|
2017-12-29 00:52:17 +01:00
|
|
|
done
|
2017-03-13 22:51:36 +01:00
|
|
|
}
|