2016-08-23 21:48:58 +02:00
|
|
|
TERMUX_PKG_HOMEPAGE=https://mpv.io/
|
|
|
|
TERMUX_PKG_DESCRIPTION="Command-line media player"
|
2016-11-22 22:11:27 +01:00
|
|
|
TERMUX_PKG_VERSION=0.22.0
|
2016-11-30 18:47:03 +01:00
|
|
|
TERMUX_PKG_BUILD_REVISION=2
|
2016-08-23 21:48:58 +02:00
|
|
|
TERMUX_PKG_SRCURL=https://github.com/mpv-player/mpv/archive/v${TERMUX_PKG_VERSION}.tar.gz
|
2016-11-22 22:11:27 +01:00
|
|
|
TERMUX_PKG_SHA256=c0f9ac8f0e37a391d19007b333ef8787c2f45d75a0d4401c0098cde52c5082f6
|
2016-08-23 21:48:58 +02:00
|
|
|
TERMUX_PKG_FOLDERNAME=mpv-${TERMUX_PKG_VERSION}
|
2016-11-22 22:11:27 +01:00
|
|
|
TERMUX_PKG_DEPENDS="ffmpeg, openal-soft"
|
2016-08-23 21:48:58 +02:00
|
|
|
|
|
|
|
termux_step_make_install () {
|
|
|
|
cd $TERMUX_PKG_SRCDIR
|
|
|
|
|
|
|
|
./bootstrap.py
|
|
|
|
|
|
|
|
./waf configure \
|
|
|
|
--prefix=$TERMUX_PREFIX \
|
|
|
|
--disable-gl \
|
|
|
|
--disable-jpeg \
|
|
|
|
--disable-lcms2 \
|
2016-08-27 00:50:24 +02:00
|
|
|
--disable-libass \
|
2016-10-30 15:35:40 +01:00
|
|
|
--disable-lua \
|
2016-10-30 15:22:47 +01:00
|
|
|
--enable-openal \
|
2016-11-22 22:11:27 +01:00
|
|
|
--disable-caca
|
2016-08-23 21:48:58 +02:00
|
|
|
|
|
|
|
./waf install
|
2016-08-26 11:49:20 +02:00
|
|
|
|
2016-08-27 18:15:46 +02:00
|
|
|
# Use opensles audio out be default:
|
|
|
|
mkdir -p $TERMUX_PREFIX/etc/mpv
|
|
|
|
echo "ao=opensles" > $TERMUX_PREFIX/etc/mpv/mpv.conf
|
|
|
|
|
2016-08-26 11:49:20 +02:00
|
|
|
# Try to work around OpenSL ES library clashes:
|
2016-09-04 00:45:08 +02:00
|
|
|
# Linking against libOpenSLES causes indirect linkage against
|
|
|
|
# libskia.so, which links against the platform libjpeg.so and
|
|
|
|
# libpng.so, which are not compatible with the Termux ones.
|
|
|
|
#
|
|
|
|
# On Android N also liblzma seems to conflict.
|
2016-08-26 11:49:20 +02:00
|
|
|
mkdir -p $TERMUX_PREFIX/libexec
|
|
|
|
mv $TERMUX_PREFIX/bin/mpv $TERMUX_PREFIX/libexec
|
|
|
|
|
|
|
|
local SYSTEM_LIBFOLDER=lib64
|
|
|
|
if [ $TERMUX_ARCH_BITS = 32 ]; then SYSTEM_LIBFOLDER=lib; fi
|
|
|
|
echo "#!/bin/sh" > $TERMUX_PREFIX/bin/mpv
|
2016-11-24 00:47:13 +01:00
|
|
|
# /system/vendor/lib(64) needed for libqc-opt.so on
|
|
|
|
# a xperia z5 c, reported by BrainDamage on #termux.
|
|
|
|
echo "LD_LIBRARY_PATH=/system/$SYSTEM_LIBFOLDER:/system/vendor/$SYSTEM_LIBFOLDER:$TERMUX_PREFIX/lib $TERMUX_PREFIX/libexec/mpv \"\$@\"" >> $TERMUX_PREFIX/bin/mpv
|
2016-08-26 11:49:20 +02:00
|
|
|
chmod +x $TERMUX_PREFIX/bin/mpv
|
2016-08-23 21:48:58 +02:00
|
|
|
}
|