mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-03 05:28:53 +02:00
mpv: add recipe and patch for version 0.8.2
* currently crashes while trying to display video due to bugs in SDL
This commit is contained in:
97
media-video/mpv/mpv-0.8.2.recipe
Normal file
97
media-video/mpv/mpv-0.8.2.recipe
Normal file
@@ -0,0 +1,97 @@
|
||||
SUMMARY="A free, open source, and cross-platform media player"
|
||||
DESCRIPTION="
|
||||
mpv is a media player based on MPlayer and mplayer2. It supports a wide \
|
||||
variety of video file formats, audio and video codecs, and subtitle types."
|
||||
HOMEPAGE="http://mpv.io"
|
||||
|
||||
REVISION="1"
|
||||
|
||||
SRC_URI="https://github.com/mpv-player/mpv/archive/v$portVersion.zip"
|
||||
CHECKSUM_SHA256="d2cf6f36fc1bf2bdfcd8cd4e94720c9debe62dcc503e1c056df803891ec66dc8"
|
||||
|
||||
ARCHITECTURES="x86 x86_64"
|
||||
if [ $effectiveTargetArchitecture != x86_gcc2 ]; then
|
||||
# x86_gcc2 is fine as primary target architecture as long as we're building
|
||||
# for a different secondary architecture.
|
||||
ARCHITECTURES="$ARCHITECTURES x86_gcc2"
|
||||
fi
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
mpv$secondaryArchSuffix = $portVersion
|
||||
cmd:mpv$secondaryArchSuffix
|
||||
"
|
||||
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libass$secondaryArchSuffix
|
||||
lib:libavdevice$secondaryArchSuffix >= 56
|
||||
lib:libavutil$secondaryArchSuffix >= 54
|
||||
lib:libavcodec$secondaryArchSuffix >= 56
|
||||
lib:libswscale$secondaryArchSuffix >= 3
|
||||
lib:libavfilter$secondaryArchSuffix >= 5
|
||||
lib:libbluray$secondaryArchSuffix
|
||||
lib:libdvdnav$secondaryArchSuffix
|
||||
lib:libdvdread$secondaryArchSuffix
|
||||
lib:libenca$secondaryArchSuffix
|
||||
lib:libiconv$secondaryArchSuffix
|
||||
lib:libjpeg$secondaryArchSuffix
|
||||
lib:libmpg123$secondaryArchSuffix
|
||||
lib:libsdl2$secondaryArchSuffix
|
||||
lib:libsdl2$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
devel:libass$secondaryArchSuffix
|
||||
devel:libavutil$secondaryArchSuffix >= 54
|
||||
devel:libbluray$secondaryArchSuffix
|
||||
devel:libdvdcss$secondaryArchSuffix
|
||||
devel:libdvdnav$secondaryArchSuffix
|
||||
devel:libdvdread$secondaryArchSuffix
|
||||
devel:libenca$secondaryArchSuffix
|
||||
devel:libfontconfig$secondaryArchSuffix
|
||||
devel:libfreetype$secondaryArchSuffix
|
||||
devel:libfribidi$secondaryArchSuffix
|
||||
devel:libgl$secondaryArchSuffix
|
||||
devel:libglib_2.0$secondaryArchSuffix
|
||||
devel:libharfbuzz$secondaryArchSuffix
|
||||
devel:libiconv$secondaryArchSuffix
|
||||
devel:libjpeg$secondaryArchSuffix
|
||||
devel:libmpg123$secondaryArchSuffix
|
||||
devel:libsdl2$secondaryArchSuffix
|
||||
# devel:libsmbclient$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_PREREQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:perl
|
||||
cmd:python
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
cmd:yasm
|
||||
"
|
||||
|
||||
SOURCE_DIR="mpv-$portVersion"
|
||||
|
||||
PATCHES="mpv_x86-0.8.2.patchset"
|
||||
|
||||
GLOBAL_WRITABLE_FILES="settings/encoding-profiles.conf"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
python bootstrap.py
|
||||
export LDFLAGS=-lnetwork
|
||||
waf configure --enable-sdl2 --bindir=$binDir --confdir=$settingsDir/mpv # --datadir=$dataDir
|
||||
waf build
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
waf install
|
||||
rm -rf $dataDir/mpv/applications
|
||||
}
|
||||
|
||||
LICENSE="GNU GPL v2"
|
||||
COPYRIGHT="2013-2015 MPV Developers"
|
||||
42
media-video/mpv/patches/mpv_x86-0.8.2.patchset
Normal file
42
media-video/mpv/patches/mpv_x86-0.8.2.patchset
Normal file
@@ -0,0 +1,42 @@
|
||||
From 5aab1c265b3d6d0339453bce590707fb2ba25a3d Mon Sep 17 00:00:00 2001
|
||||
From: Sergei Reznikov <diver@gelios.net>
|
||||
Date: Mon, 16 Mar 2015 20:44:40 +0300
|
||||
Subject: Haiku: comment out subprocess functions
|
||||
|
||||
* We lack spawn.h header so we can't use posix-spawn from subprocess-posix.c
|
||||
* subprocess-haiku.c probably needs to be implemented
|
||||
|
||||
diff --git a/player/command.c b/player/command.c
|
||||
index b89f7c0..71058c3 100644
|
||||
--- a/player/command.c
|
||||
+++ b/player/command.c
|
||||
@@ -4014,7 +4014,7 @@ static void overlay_uninit(struct MPContext *mpctx)
|
||||
overlay_remove(mpctx, id);
|
||||
osd_set_external2(mpctx->osd, NULL);
|
||||
}
|
||||
-
|
||||
+/*
|
||||
struct subprocess_args {
|
||||
struct mp_log *log;
|
||||
char **args;
|
||||
@@ -4047,7 +4047,7 @@ static void subprocess_detached(struct mp_log *log, char **args)
|
||||
if (pthread_create(&thread, NULL, run_subprocess, p))
|
||||
talloc_free(p);
|
||||
}
|
||||
-
|
||||
+*/
|
||||
struct cycle_counter {
|
||||
char **args;
|
||||
int counter;
|
||||
@@ -4631,7 +4631,7 @@ int run_command(MPContext *mpctx, mp_cmd_t *cmd)
|
||||
char *args[MP_CMD_MAX_ARGS + 1] = {0};
|
||||
for (int n = 0; n < cmd->nargs; n++)
|
||||
args[n] = cmd->args[n].v.s;
|
||||
- subprocess_detached(mpctx->log, args);
|
||||
+// subprocess_detached(mpctx->log, args);
|
||||
break;
|
||||
}
|
||||
|
||||
--
|
||||
2.2.2
|
||||
|
||||
Reference in New Issue
Block a user