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"
|
2019-01-21 13:53:58 +01:00
|
|
|
TERMUX_PKG_LICENSE="GPL-2.0"
|
2018-07-23 00:21:12 +02:00
|
|
|
TERMUX_PKG_VERSION=12.2
|
2019-07-30 00:39:00 +02:00
|
|
|
TERMUX_PKG_REVISION=21
|
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
|
2019-01-25 01:58:51 +01:00
|
|
|
TERMUX_PKG_DEPENDS="libltdl, libsndfile, libandroid-glob, libsoxr, speexdsp"
|
2019-07-20 10:42:33 +02:00
|
|
|
TERMUX_PKG_BREAKS="libpulseaudio-dev"
|
|
|
|
TERMUX_PKG_REPLACES="libpulseaudio-dev"
|
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
|
2018-08-15 03:55:39 +02:00
|
|
|
ax_cv_PTHREAD_PRIO_INHERIT=no
|
|
|
|
ac_cv_func_posix_madvise=no"
|
2017-03-13 22:51:36 +01:00
|
|
|
|
2019-02-08 10:37:29 +01:00
|
|
|
termux_step_pre_configure() {
|
2018-11-28 00:57:56 +01:00
|
|
|
# Avoid aclocal-1.15 dependency:
|
|
|
|
NOCONFIGURE=1 ./bootstrap.sh
|
|
|
|
|
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
|
|
|
|
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
|
|
|
}
|
|
|
|
|
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
|
|
|
}
|