From 8d90dd47175333366be9ae6eed7f2d1350c47740 Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Fri, 26 Aug 2016 18:50:24 -0400 Subject: [PATCH] mpv: Enable openal output and fix quoting issue --- packages/mpv/build.sh | 8 +++++--- packages/mpv/main.c.patch | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 packages/mpv/main.c.patch diff --git a/packages/mpv/build.sh b/packages/mpv/build.sh index 9140e9c3e..e75f11117 100644 --- a/packages/mpv/build.sh +++ b/packages/mpv/build.sh @@ -7,9 +7,10 @@ TERMUX_PKG_HOMEPAGE=https://mpv.io/ TERMUX_PKG_DESCRIPTION="Command-line media player" TERMUX_PKG_VERSION=0.19.0 +TERMUX_PKG_BUILD_REVISION=1 TERMUX_PKG_SRCURL=https://github.com/mpv-player/mpv/archive/v${TERMUX_PKG_VERSION}.tar.gz TERMUX_PKG_FOLDERNAME=mpv-${TERMUX_PKG_VERSION} -TERMUX_PKG_DEPENDS="ffmpeg" +TERMUX_PKG_DEPENDS="ffmpeg, openal-soft" termux_step_make_install () { cd $TERMUX_PKG_SRCDIR @@ -25,7 +26,8 @@ termux_step_make_install () { --disable-gl \ --disable-jpeg \ --disable-lcms2 \ - --disable-libass + --disable-libass \ + --enable-openal ./waf install @@ -36,6 +38,6 @@ termux_step_make_install () { local SYSTEM_LIBFOLDER=lib64 if [ $TERMUX_ARCH_BITS = 32 ]; then SYSTEM_LIBFOLDER=lib; fi echo "#!/bin/sh" > $TERMUX_PREFIX/bin/mpv - echo "LD_LIBRARY_PATH=/system/$SYSTEM_LIBFOLDER:$TERMUX_PREFIX/lib $TERMUX_PREFIX/libexec/mpv \$@" >> $TERMUX_PREFIX/bin/mpv + echo "LD_LIBRARY_PATH=/system/$SYSTEM_LIBFOLDER:$TERMUX_PREFIX/lib $TERMUX_PREFIX/libexec/mpv \"\$@\"" >> $TERMUX_PREFIX/bin/mpv chmod +x $TERMUX_PREFIX/bin/mpv } diff --git a/packages/mpv/main.c.patch b/packages/mpv/main.c.patch new file mode 100644 index 000000000..9ca0f741e --- /dev/null +++ b/packages/mpv/main.c.patch @@ -0,0 +1,18 @@ +We don't need a warning every time. + +diff -u -r ../mpv-0.19.0/player/main.c ./player/main.c +--- ../mpv-0.19.0/player/main.c 2016-08-15 10:10:59.000000000 -0400 ++++ ./player/main.c 2016-08-26 18:40:46.624646426 -0400 +@@ -455,10 +455,12 @@ + } + #endif + ++#ifndef __ANDROID__ + #if !HAVE_LIBASS + MP_WARN(mpctx, "Compiled without libass.\n"); + MP_WARN(mpctx, "There will be no OSD and no text subtitles.\n"); + #endif ++#endif + + mpctx->osd = osd_create(mpctx->global); +