Files
haikuports/media-video/mpv/mpv-0.27.2.recipe
Augustin Cavalier df75b1d18f Bump revisions of all packages that depend on FFmpeg.
Using the tools script.
2018-07-02 18:50:08 -04:00

156 lines
4.3 KiB
Bash

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="https://mpv.io/"
COPYRIGHT="2013-2018 MPV Developers"
LICENSE="GNU GPL v2"
REVISION="2"
SOURCE_URI="https://github.com/mpv-player/mpv/archive/v$portVersion.tar.gz"
CHECKSUM_SHA256="2ad104d83fd3b2b9457716615acad57e479fd1537b8fc5e37bfe9065359b50be"
SOURCE_FILENAME="mpv-$portVersion.tar.gz"
SOURCE_FILENAME_2="waf-1.9.12"
SOURCE_URI_2="https://waf.io/$SOURCE_FILENAME_2#noarchive
http://www.freehackers.org/~tnagy/release/$SOURCE_FILENAME_2#noarchive"
CHECKSUM_SHA256_2="66f3983fcc6dc0d17393514b2b52063702004800428327db3597754dd05c3fbc"
ARCHITECTURES="!x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
commandSuffix=$secondaryArchSuffix
commandBinDir=$binDir
if [ "$targetArchitecture" = x86_gcc2 ]; then
commandSuffix=
commandBinDir=$prefix/bin
fi
libVersion="1.25.0"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
mpv$secondaryArchSuffix = $portVersion
cmd:mpv$commandSuffix
lib:libmpv$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libarchive$secondaryArchSuffix
lib:libass$secondaryArchSuffix
lib:libavcodec$secondaryArchSuffix
lib:libavdevice$secondaryArchSuffix
lib:libavformat$secondaryArchSuffix
lib:libavfilter$secondaryArchSuffix
lib:libavutil$secondaryArchSuffix
lib:libbluray$secondaryArchSuffix
lib:libdvdnav$secondaryArchSuffix
lib:libdvdread$secondaryArchSuffix
lib:libiconv$secondaryArchSuffix
lib:libjpeg$secondaryArchSuffix
lib:liblcms2$secondaryArchSuffix
lib:libopenal$secondaryArchSuffix
lib:librubberband$secondaryArchSuffix
lib:libSDL2_2.0$secondaryArchSuffix
lib:libsmbclient$secondaryArchSuffix
lib:libswresample$secondaryArchSuffix
lib:libswscale$secondaryArchSuffix
lib:libuchardet$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
PROVIDES_devel="
mpv${secondaryArchSuffix}_devel = $portVersion
devel:libmpv$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
mpv$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
devel:libarchive$secondaryArchSuffix
devel:libass$secondaryArchSuffix
devel:libavcodec$secondaryArchSuffix >= 57
devel:libavdevice$secondaryArchSuffix >= 57
devel:libavformat$secondaryArchSuffix >= 57
devel:libavfilter$secondaryArchSuffix
devel:libavutil$secondaryArchSuffix >= 55
devel:libbluray$secondaryArchSuffix
devel:libcdio$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:liblcms2$secondaryArchSuffix
devel:libmpg123$secondaryArchSuffix
devel:libopenal$secondaryArchSuffix
devel:librubberband$secondaryArchSuffix
devel:libSDL2_2.0$secondaryArchSuffix
devel:libsmbclient$secondaryArchSuffix
devel:libswresample$secondaryArchSuffix
devel:libswscale$secondaryArchSuffix
devel:libuchardet$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
haiku${secondaryArchSuffix}_devel
cmd:gcc$secondaryArchSuffix
cmd:perl
cmd:python
cmd:pkg_config$secondaryArchSuffix
cmd:yasm
"
GLOBAL_WRITABLE_FILES="settings/mpv/encoding-profiles.conf keep-old"
BUILD()
{
# Do not call "python bootstrap.py" as it (only) downloads waf.
# python bootstrap.py
# Instead, copy the archive from SOURCE_URI_2.
cp $sourceDir2/$SOURCE_FILENAME_2 waf
chmod +x waf
export LDFLAGS=-lnetwork
waf configure \
--enable-dvdread \
--enable-dvdnav \
--enable-libarchive \
--enable-libsmbclient \
--enable-openal \
--enable-sdl2 \
--disable-gl \
--enable-libmpv-shared \
--enable-libarchive \
--bindir=$commandBinDir \
--confdir=$sysconfDir/mpv \
--datadir=$dataDir \
--prefix=$prefix
waf build
}
INSTALL()
{
waf install
rm -rf $dataDir/applications
rm -rf $dataDir/icons
mkdir -p $includeDir
mv $prefix/include/* $includeDir
rmdir $prefix/include
prepareInstalledDevelLib libmpv
fixPkgconfig
packageEntries devel \
$developDir
}