Files
haikuports/media-video/mpv/mpv-0.29.1.recipe
2019-07-12 15:02:55 +02:00

144 lines
4.0 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="4"
SOURCE_URI="https://github.com/mpv-player/mpv/archive/v$portVersion.tar.gz"
CHECKSUM_SHA256="f9f9d461d1990f9728660b4ccb0e8cb5dce29ccaa6af567bec481b79291ca623"
SOURCE_FILENAME="mpv-$portVersion.tar.gz"
wafVersion="2.0.11"
SOURCE_URI_2="https://waf.io/waf-$wafVersion#noarchive"
CHECKSUM_SHA256_2="25807bc064dce3fe66eab5977ed5730f3b59af981c028a0dc4f889cd64b80928"
SOURCE_FILENAME_2="waf-$wafVersion"
PATCHES="mpv-$portVersion.patchset"
ARCHITECTURES="!x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
GLOBAL_WRITABLE_FILES="settings/mpv/encoding-profiles.conf keep-old"
PROVIDES="
mpv$secondaryArchSuffix = $portVersion
cmd:mpv$secondaryArchSuffix = $portVersion compat >= 0.29
lib:libmpv$secondaryArchSuffix = 1.101.0 compat >= 1
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libass$secondaryArchSuffix
lib:libavcodec$secondaryArchSuffix
lib:libavfilter$secondaryArchSuffix
lib:libavformat$secondaryArchSuffix
lib:libavutil$secondaryArchSuffix
lib:libbluray$secondaryArchSuffix
lib:libcdio$secondaryArchSuffix
lib:libcdio_paranoia$secondaryArchSuffix
lib:libdvdnav$secondaryArchSuffix
lib:libdvdread$secondaryArchSuffix
lib:libiconv$secondaryArchSuffix
lib:libjpeg$secondaryArchSuffix
lib:liblcms2$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 compat >= 0.29
devel:libmpv$secondaryArchSuffix = 1.101.0 compat >= 1
"
REQUIRES_devel="
haiku$secondaryArchSuffix
mpv$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
devel:libass$secondaryArchSuffix
devel:libavcodec$secondaryArchSuffix
devel:libavfilter$secondaryArchSuffix
devel:libavformat$secondaryArchSuffix
devel:libavutil$secondaryArchSuffix
devel:libbluray$secondaryArchSuffix
devel:libcdio_paranoia$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: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:pkg_config$secondaryArchSuffix
cmd:python
cmd:yasm
"
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-libsmbclient \
--disable-libavdevice \
--disable-openal \
--disable-libmpv-static \
--disable-static-build \
--enable-libmpv-shared \
--enable-sdl2 \
--enable-cdda \
--bindir=$binDir \
--confdir=$settingsDir/mpv \
--disable-gl \
--datadir=$dataDir \
--libdir=$libDir \
--includedir=$includeDir
waf build
}
INSTALL()
{
waf install
rm -rf $dataDir/applications
rm -rf $dataDir/icons
prepareInstalledDevelLibs libmpv
fixPkgconfig
# devel package
packageEntries devel $developDir
}