mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
191 lines
5.4 KiB
Bash
191 lines
5.4 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-2024 MPV Developers"
|
|
LICENSE="GNU GPL v2"
|
|
REVISION="3"
|
|
SOURCE_URI="https://github.com/mpv-player/mpv/archive/v$portVersion.tar.gz"
|
|
CHECKSUM_SHA256="86d9ef40b6058732f67b46d0bbda24a074fae860b3eaae05bab3145041303066"
|
|
SOURCE_FILENAME="mpv-$portVersion.tar.gz"
|
|
PATCHES="mpv-$portVersion.patchset"
|
|
ADDITIONAL_FILES="mpv.rdef.in"
|
|
|
|
ARCHITECTURES="all !x86_gcc2"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
GLOBAL_WRITABLE_FILES="settings/mpv/encoding-profiles.conf keep-old"
|
|
|
|
commandSuffix=$secondaryArchSuffix
|
|
commandBinDir=$binDir
|
|
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
|
commandSuffix=
|
|
commandBinDir=$prefix/bin
|
|
fi
|
|
|
|
portVersionCompat="$portVersion compat >= ${portVersion%.*}"
|
|
libVersion="2.3.0"
|
|
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
|
|
|
|
PROVIDES="
|
|
mpv$secondaryArchSuffix = $portVersion
|
|
cmd:mpv$commandSuffix = $portVersionCompat
|
|
lib:libmpv$secondaryArchSuffix = $libVersionCompat
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
lib:libass$secondaryArchSuffix
|
|
lib:libavcodec$secondaryArchSuffix
|
|
lib:libavdevice$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:libegl$secondaryArchSuffix
|
|
lib:libiconv$secondaryArchSuffix
|
|
lib:libjpeg$secondaryArchSuffix
|
|
lib:liblcms2$secondaryArchSuffix
|
|
lib:liblua$secondaryArchSuffix
|
|
lib:libopenal$secondaryArchSuffix
|
|
lib:libplacebo$secondaryArchSuffix
|
|
lib:librubberband$secondaryArchSuffix
|
|
lib:libswresample$secondaryArchSuffix
|
|
lib:libswscale$secondaryArchSuffix
|
|
lib:libuchardet$secondaryArchSuffix
|
|
lib:libvulkan$secondaryArchSuffix
|
|
lib:libz$secondaryArchSuffix
|
|
"
|
|
|
|
PROVIDES_devel="
|
|
mpv${secondaryArchSuffix}_devel = $portVersionCompat
|
|
devel:libmpv$secondaryArchSuffix = $libVersionCompat
|
|
"
|
|
REQUIRES_devel="
|
|
haiku$secondaryArchSuffix
|
|
mpv$secondaryArchSuffix == $portVersion base
|
|
ffmpeg5${secondaryArchSuffix}_devel
|
|
devel:libass$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:libEGL$secondaryArchSuffix
|
|
devel:libglib_2.0$secondaryArchSuffix
|
|
devel:libharfbuzz$secondaryArchSuffix
|
|
devel:libiconv$secondaryArchSuffix
|
|
devel:libjpeg$secondaryArchSuffix
|
|
devel:liblcms2$secondaryArchSuffix
|
|
devel:liblua$secondaryArchSuffix >= 5.2
|
|
devel:libopenal$secondaryArchSuffix
|
|
devel:libmpg123$secondaryArchSuffix
|
|
devel:libplacebo$secondaryArchSuffix
|
|
devel:librubberband$secondaryArchSuffix
|
|
devel:libuchardet$secondaryArchSuffix
|
|
devel:libvulkan$secondaryArchSuffix
|
|
devel:libz$secondaryArchSuffix
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
ffmpeg5${secondaryArchSuffix}_devel
|
|
devel:libass$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:liblua$secondaryArchSuffix >= 5.2
|
|
devel:libopenal$secondaryArchSuffix
|
|
devel:libmpg123$secondaryArchSuffix
|
|
devel:libplacebo$secondaryArchSuffix
|
|
devel:librubberband$secondaryArchSuffix
|
|
devel:libuchardet$secondaryArchSuffix
|
|
devel:libvulkan$secondaryArchSuffix
|
|
devel:libz$secondaryArchSuffix
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:gcc$secondaryArchSuffix
|
|
cmd:meson
|
|
cmd:ninja
|
|
cmd:perl
|
|
cmd:pkg_config$secondaryArchSuffix
|
|
cmd:python3
|
|
cmd:rst2man
|
|
cmd:yasm
|
|
"
|
|
|
|
BUILD()
|
|
{
|
|
LDFLAGS="-lnetwork -lbe" \
|
|
meson Build \
|
|
--buildtype=release \
|
|
--prefix="$prefix" \
|
|
--bindir="$binDir" \
|
|
--libdir="$libDir" \
|
|
--includedir="$includeDir" \
|
|
--datadir="$dataDir" \
|
|
--mandir="$manDir" \
|
|
-Dlibmpv=true \
|
|
-Dhaiku=enabled \
|
|
-Ddvdnav=enabled \
|
|
-Dlua=lua5.2 \
|
|
-Dopenal=enabled \
|
|
-Dvulkan=enabled \
|
|
--auto-features auto
|
|
|
|
ninja -C Build
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
ninja -C Build install
|
|
|
|
rm -rf $dataDir/applications
|
|
rm -rf $dataDir/icons
|
|
rm -rf $dataDir/metainfo
|
|
|
|
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
|
|
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
|
|
local MINOR="`echo "$portVersion" | cut -d. -f3`"
|
|
local SHORT_INFO="mpv"
|
|
local LONG_INFO="$SUMMARY"
|
|
sed \
|
|
-e "s|@MAJOR@|$MAJOR|" \
|
|
-e "s|@MIDDLE@|$MIDDLE|" \
|
|
-e "s|@MINOR@|$MINOR|" \
|
|
-e "s|@SHORT_INFO@|$SHORT_INFO|" \
|
|
-e "s|@LONG_INFO@|$LONG_INFO|" \
|
|
$portDir/additional-files/mpv.rdef.in > mpv.rdef
|
|
|
|
addResourcesToBinaries mpv.rdef $commandBinDir/mpv
|
|
mimeset -f $commandBinDir/mpv
|
|
|
|
prepareInstalledDevelLibs libmpv
|
|
|
|
fixPkgconfig
|
|
|
|
# devel package
|
|
packageEntries devel $developDir
|
|
}
|