termux-packages/packages/mpv/build.sh
Vishal Biswas cfa043f9b4 update packages (#766)
* file: update from 5.29 to 5.30

* ffmpeg: update from 3.2.2 to 3.2.4

* mpv: update from 0.23.0 to 0.24.0

also prevent opportunistic linking with x11

* grep: update from 2.28 to 3.0

* fish: update from 2.4.0 to 2.5.0

add tarball checksum
remove patches no longer needed
see https://github.com/fish-shell/fish-shell/pull/3585

* wget: update from 1.19 to 1.19.1
2017-02-12 21:01:54 +01:00

49 lines
1.6 KiB
Bash

TERMUX_PKG_HOMEPAGE=https://mpv.io/
TERMUX_PKG_DESCRIPTION="Command-line media player"
TERMUX_PKG_VERSION=0.24.0
TERMUX_PKG_SRCURL=https://github.com/mpv-player/mpv/archive/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=a41854fa0ac35b9c309ad692aaee67c8d4495c3546f11cb4cdd0a124195d3f15
TERMUX_PKG_FOLDERNAME=mpv-${TERMUX_PKG_VERSION}
TERMUX_PKG_DEPENDS="ffmpeg, openal-soft"
TERMUX_PKG_RM_AFTER_INSTALL="share/icons share/applications"
termux_step_make_install () {
cd $TERMUX_PKG_SRCDIR
./bootstrap.py
./waf configure \
--prefix=$TERMUX_PREFIX \
--disable-gl \
--disable-jpeg \
--disable-lcms2 \
--disable-libass \
--disable-lua \
--enable-openal \
--disable-caca \
--disable-x11
./waf install
# Use opensles audio out be default:
mkdir -p $TERMUX_PREFIX/etc/mpv
echo "ao=opensles" > $TERMUX_PREFIX/etc/mpv/mpv.conf
# Try to work around OpenSL ES library clashes:
# 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.
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
# /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
chmod +x $TERMUX_PREFIX/bin/mpv
}