0
0
Fork 0
haikuports/media-video/mplayer/mplayer-1.4.0.recipe

215 lines
7.1 KiB
Bash

SUMMARY="A movie player which runs on many systems"
DESCRIPTION="It plays most MPEG/VOB, AVI, Ogg/OGM, VIVO, ASF/WMA/WMV, \
QT/MOV/MP4, RealMedia, Matroska, NUT, NuppelVideo, FLI, YUV4MPEG, FILM, \
RoQ, PVA files, supported by many native, XAnim, and Win32 DLL codecs. \
You can watch VideoCD, SVCD, DVD, 3ivx, DivX 3/4/5, WMV and even H.264 movies.
Another great feature of MPlayer is the wide range of supported output \
drivers. It works with X11, Xv, DGA, OpenGL, SVGAlib, fbdev, AAlib, DirectFB, \
but you can use GGI, SDL (and this way all their drivers), VESA (on every \
VESA compatible card, even without X11!) and some low level card-specific \
drivers (for Matrox, 3Dfx and ATI), too! Most of them support software or \
hardware scaling, so you can enjoy movies in fullscreen. MPlayer supports \
displaying through some hardware MPEG decoder boards, such as the Siemens \
DVB, DXR2 and DXR3/Hollywood+.
MPlayer has an onscreen display (OSD) for status information, nice big \
antialiased shaded subtitles and visual feedback for keyboard controls. \
European/ISO 8859-1,2 (Hungarian, English, Czech, etc), Cyrillic and Korean \
fonts are supported along with 12 subtitle formats (MicroDVD, SubRip, OGM, \
SubViewer, Sami, VPlayer, RT, SSA, AQTitle, JACOsub, PJS and our own: MPsub). \
DVD subtitles (SPU streams, VOBsub and Closed Captions) are supported as well."
HOMEPAGE="http://www.mplayerhq.hu/"
COPYRIGHT="2001-2019 The MPlayer Team"
LICENSE="GNU LGPL v2.1"
REVISION="13"
SOURCE_URI="http://www.mplayerhq.hu/MPlayer/releases/MPlayer-1.4.tar.xz"
CHECKSUM_SHA256="82596ed558478d28248c7bc3828eb09e6948c099bbd76bb7ee745a0e3275b548"
SOURCE_DIR="MPlayer-1.4"
PATCHES="mplayer_x86-$portVersion.patchset"
ADDITIONAL_FILES="mplayer.rdef.in"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="!x86"
# On x86_gcc2 we don't want to install the commands in bin/<arch>/, but in bin/.
commandSuffix=$secondaryArchSuffix
commandBinDir=$binDir
if [ "$targetArchitecture" = x86_gcc2 ]; then
commandSuffix=
commandBinDir=$prefix/bin
fi
PROVIDES="
mplayer$secondaryArchSuffix = $portVersion
cmd:mencoder$commandSuffix
cmd:mplayer$commandSuffix
"
REQUIRES="
haiku$secondaryArchSuffix
cdrtools$secondaryArchSuffix
lib:libavcodec$secondaryArchSuffix
lib:libavformat$secondaryArchSuffix
lib:libavutil$secondaryArchSuffix
lib:liba52$secondaryArchSuffix
lib:libbz2$secondaryArchSuffix
lib:libcaca$secondaryArchSuffix
lib:libcdio$secondaryArchSuffix
lib:libcdio_paranoia$secondaryArchSuffix
lib:libdca$secondaryArchSuffix
lib:libdv$secondaryArchSuffix
lib:libdvdcss$secondaryArchSuffix
lib:libdvdnav$secondaryArchSuffix
lib:libdvdread$secondaryArchSuffix
lib:libenca$secondaryArchSuffix
lib:libfaac$secondaryArchSuffix
lib:libfaad$secondaryArchSuffix
lib:libfontconfig$secondaryArchSuffix
lib:libfreetype$secondaryArchSuffix
lib:libfribidi$secondaryArchSuffix
lib:libgif$secondaryArchSuffix
lib:libgnutls$secondaryArchSuffix
lib:libiconv$secondaryArchSuffix
lib:libjpeg$secondaryArchSuffix
lib:liblzo2$secondaryArchSuffix
lib:libmad$secondaryArchSuffix
lib:libmng$secondaryArchSuffix
lib:libmp3lame$secondaryArchSuffix
# lib:libmpcdec$secondaryArchSuffix
lib:libmpeg2$secondaryArchSuffix
lib:libmpg123$secondaryArchSuffix
lib:libncursesw$secondaryArchSuffix
lib:libogg$secondaryArchSuffix
# lib:libopenal$secondaryArchSuffix
# lib:libopenjp2$secondaryArchSuffix
lib:libopus$secondaryArchSuffix
lib:libpng16$secondaryArchSuffix
# lib:libschroedinger_1.0$secondaryArchSuffix
# lib:libsdl$secondaryArchSuffix
lib:libsmbclient$secondaryArchSuffix
lib:libspeex$secondaryArchSuffix
# lib:libssl$secondaryArchSuffix
lib:libswscale$secondaryArchSuffix
lib:libswresample$secondaryArchSuffix
lib:libtheoradec$secondaryArchSuffix
lib:libtwolame$secondaryArchSuffix
lib:libvorbis$secondaryArchSuffix
lib:libvorbisenc$secondaryArchSuffix
# lib:libvpx$secondaryArchSuffix
lib:libx264$secondaryArchSuffix
lib:libz$secondaryArchSuffix
# lib:live555$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libavcodec$secondaryArchSuffix
devel:libavformat$secondaryArchSuffix
devel:libavutil$secondaryArchSuffix
devel:liba52$secondaryArchSuffix
devel:libbz2$secondaryArchSuffix
devel:libcaca$secondaryArchSuffix
devel:libcddb$secondaryArchSuffix
devel:libcdio$secondaryArchSuffix >= 19
devel:libcdio_paranoia$secondaryArchSuffix
devel:libdca$secondaryArchSuffix
devel:libdv$secondaryArchSuffix
devel:libdvdcss$secondaryArchSuffix
devel:libdvdnav$secondaryArchSuffix
devel:libdvdread$secondaryArchSuffix
devel:libenca$secondaryArchSuffix
devel:libfaac$secondaryArchSuffix
devel:libfaad$secondaryArchSuffix
devel:libflac$secondaryArchSuffix
devel:libfontconfig$secondaryArchSuffix
devel:libfreetype$secondaryArchSuffix
devel:libfribidi$secondaryArchSuffix
devel:libgif$secondaryArchSuffix
devel:libgnutls$secondaryArchSuffix
devel:libiconv$secondaryArchSuffix
devel:libjpeg$secondaryArchSuffix
devel:liblzo2$secondaryArchSuffix
devel:libmad$secondaryArchSuffix
devel:libmng$secondaryArchSuffix
devel:libmp3lame$secondaryArchSuffix
# devel:libmpcdec$secondaryArchSuffix
devel:libmpeg2$secondaryArchSuffix
devel:libmpg123$secondaryArchSuffix
devel:libncursesw$secondaryArchSuffix
devel:libogg$secondaryArchSuffix
# devel:libopenal$secondaryArchSuffix
# devel:libopenjp2$secondaryArchSuffix
devel:libopus$secondaryArchSuffix
devel:libparanoia$secondaryArchSuffix
devel:libpng16$secondaryArchSuffix
# devel:libschroedinger_1.0$secondaryArchSuffix
# devel:libsdl$secondaryArchSuffix
devel:libsmbclient$secondaryArchSuffix
devel:libspeex$secondaryArchSuffix
# devel:libssl$secondaryArchSuffix
devel:libswscale$secondaryArchSuffix
devel:libswresample$secondaryArchSuffix
devel:libtheoradec$secondaryArchSuffix
devel:libtwolame$secondaryArchSuffix
devel:libvorbis$secondaryArchSuffix
devel:libvorbisenc$secondaryArchSuffix
# devel:libvpx$secondaryArchSuffix
devel:libx264$secondaryArchSuffix
devel:libz$secondaryArchSuffix
# devel:live555$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:gcc$secondaryArchSuffix
cmd:libtoolize$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
# cmd:xslt_config$secondaryArchSuffix
cmd:yasm
"
defineDebugInfoPackage mplayer$secondaryArchSuffix \
"$commandBinDir"/mencoder \
"$commandBinDir"/mplayer
BUILD()
{
export CFLAGS="-D_BSD_SOURCE"
export LDFLAGS="-lnetwork -lbsd"
libtoolize --force --copy --install
chmod +x configure help/*.sh *.sh #mplayer doesn't provides configure.ac/in
configure \
--prefix=$prefix \
--bindir=$commandBinDir \
--datadir=$dataDir \
--confdir=$settingsDir/mplayer \
--mandir=$manDir \
--disable-ffmpeg_a \
--disable-sdl \
--enable-dvdread --extra-libs="-ldvdcss -ldvdnav -ldvdread" \
--enable-haiku \
--enable-menu \
--enable-runtime-cpudetection \
--enable-smb
make $jobArgs
}
INSTALL()
{
make install
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
local MINOR="`echo "$portVersion" | cut -d. -f3`"
sed \
-e "s|@MAJOR@|$MAJOR|" \
-e "s|@MIDDLE@|$MIDDLE|" \
-e "s|@MINOR@|$MINOR|" \
$portDir/additional-files/mplayer.rdef.in > mplayer.rdef
addResourcesToBinaries mplayer.rdef $commandBinDir/mplayer
mimeset -f $commandBinDir/mplayer
}