# $Id$ PortSystem 1.0 name MPlayer version 1.0rc1 revision try3 categories multimedia maintainers ecronin@gizmolabs.org \ openmaintainer@macports.org description The Unix movie player long_description \ MPlayer can play most standard video formats out of the box and almost \ all others with the help of external codecs. MPlayer currently works \ best from the command line, but visual feedback for many functions is \ available from its onscreen status display (OSD), which is also used for \ displaying subtitles. MPlayer also has a GUI with skin support and \ several unofficial alternative graphical frontends are available. platforms darwin homepage http://www.mplayerhq.hu/ master_sites ftp://ftp1.mplayerhq.hu/MPlayer/releases/ \ http://www2.mplayerhq.hu/MPlayer/releases/ \ ftp://ftp2.mplayerhq.hu/MPlayer/releases/ \ ftp://ftp5.mplayerhq.hu/MPlayer/releases/ \ ftp://ftp.fu-berlin.de/unix/X11/multimedia/MPlayer/releases/ \ http://www1.mplayerhq.hu/MPlayer/releases/ \ http://www.people.virginia.edu/~drf8f/MPlayer/releases/ \ http://www1.mplayerhq.hu/MPlayer/releases/codecs/:codecs \ http://www2.mplayerhq.hu/MPlayer/releases/codecs/:codecs patch_sites http://www.mplayerhq.hu/MPlayer/patches/ patchfiles asmrules_fix_20061231.diff \ cddb_fix_20070605.diff use_bzip2 yes checksums ${distname}${extract.suffix} \ md5 18c05d88e22c3b815a43ca8d7152ccdc \ sha1 a450c0b0749c343a8496ba7810363c9d46dfa73c \ rmd160 8cea02e832aec5d9e090829d61d0f131dcc177a2 \ asmrules_fix_20061231.diff \ md5 f0b71c38b1207c1d604be091876ac051 \ sha1 84412f4bd85d64a92586ca4db7e8585d16cd1acd \ rmd160 370877b45b314c9deb2d89739f8067a4a77c0844 \ cddb_fix_20070605.diff \ md5 bd8a233ea31c6686a956387ad28c5c5c \ sha1 4ed701ae65ede2f3510668be85d1efb093dc1f3c \ rmd160 0bf83ef398927ef28b5bf4287f1a1e9bb3bd4454 livecheck.check regex livecheck.url http://www1.mplayerhq.hu/MPlayer/releases/ livecheck.regex MPlayer-(1.0rc\[0-9\]+)\.tar\.bz2 depends_lib port:jpeg port:lame port:libiconv port:libmad \ port:libogg port:libpng port:libungif \ port:libvorbis port:lzo2 port:ncurses port:zlib depends_build port:pkgconfig post-patch { reinplace "s|-llzo|-llzo2|g" ${worksrcpath}/configure reinplace "s|#include |#include \\\n#include |g"\ ${worksrcpath}/libmpcodecs/vd_lzo.c } # MPlayer's ./configure REALLY does not want you to use ENV for this configure.cflags {} configure.cxxflags {} configure.cppflags {} configure.ldflags {} configure.args \ --with-extraincdir=${prefix}/include/lzo:${prefix}/include \ --with-extralibdir=${prefix}/lib:${prefix}/lib/samba3 \ --datadir=${prefix}/share/${name} \ --confdir=${prefix}/etc/${name} \ --mandir=${prefix}/share/man \ --enable-png --enable-jpeg \ --enable-liblzo --enable-libvorbis \ --enable-mad --enable-mpdvdkit \ --disable-faad-external --enable-largefiles # MPlayer autodetects many support libs. To prevent undeclared # dependencies, explicitly disable everything optional first. # Later, let autodetect do its magic not explicit --enable configure.args-append \ --disable-smb --disable-live --disable-dvdnav \ --disable-dvdread \ --disable-cdparanoia --disable-freetype \ --disable-fontconfig --disable-unrarlib \ --disable-fribidi --disable-enca \ --disable-libcdio --disable-xvid \ --disable-x264 --disable-nut --disable-libfame \ --disable-speex --disable-theora --disable-faac \ --disable-ladspa --disable-libdv --disable-toolame \ --disable-twolame --disable-xmms --disable-libdts \ --disable-musepack --disable-sdl --disable-aa \ --disable-caca --disable-x11 --disable-arts \ --disable-esd post-destroot { xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${name} eval file copy [glob ${worksrcpath}/DOCS/*] \ ${destroot}${prefix}/share/doc/${name} xinstall -d -m 0755 ${destroot}${prefix}/etc/${name} foreach etcfile {codecs.conf dvb-menu.conf example.conf \ input.conf menu.conf} { xinstall -m 0644 ${worksrcpath}/etc/${etcfile} \ ${destroot}${prefix}/etc/${name}/${etcfile} } } ##### Mplayer features variant man_all_lang \ description {Install all possible languages for man pages} { configure.args-append --language=all } # Bundle all the font deps into one onscreen display variant # configure doesn't fully build up necessary flags when --enable-fontconfig # is used, so use autodetect instead variant osd \ description {Enable onscreen display and font support} { depends_lib-append port:fontconfig port:freetype configure.args-delete --disable-fontconfig configure.args-delete --disable-freetype configure.args-append --enable-freetype --enable-menu } variant fribidi \ description {Enable FriBidi Unicode support} { depends_lib-append port:fribidi configure.args-delete --disable-fribidi #configure.args-append --enable-fribidi } ##### Inputs variant nodvd \ description {Disable DVD and DeCSS support} { configure.args-delete --enable-mpdvdkit configure.args-append --disable-mpdvdkit } variant smb \ description {Enable smb:// network support} { depends_lib-append port:samba3 configure.args-delete --disable-smb configure.args-append --enable-smb } ## Broken as of 10/25/06 (version issue?) #variant cdparanoia # description {Enable CDDA support} { # depends_lib-append port:cdparanoia # configure.args-delete --disable-cdparanoia # #configure.args-append --enable-dvdread #} ##### External codecs variant theora \ description {Enable OggTheora support} { depends_lib-append port:libtheora configure.args-delete --disable-theora configure.args-append --enable-theora } variant xvid \ description {Enable XviD encoding} { depends_lib-append port:XviD configure.args-delete --disable-xvid configure.args-append --enable-xvid } ## Needs 20070316 snapshot of x264 or later variant x264 \ description {Enable H.264 encoding} { depends_lib-append port:x264 configure.args-delete --disable-x264 configure.args-append --enable-x264 # upstream ./configure broken, fixed in mplayer-svn. post-patch { reinplace "s|if test \"\$_x264\" = yes ; then|if test \"\$_x264\" = yes ; then\\\n _ld_x264=-lx264|g" \ ${worksrcpath}/configure } } # binary_codecs replaced 'variant real' variant real requires binary_codecs \ description {Deprecated: use binary_codecs instead} {} variant binary_codecs \ description {Enable platform-specific binary codecs} { if {[variant_isset darwin_powerpc]} { global mplayercodecs mplayercodecsfile set mplayercodecs rp9codecs-macosx-20041107.pkg set mplayercodecsfile ${mplayercodecs}.zip distfiles-append ${mplayercodecsfile}:codecs checksums-append ${mplayercodecsfile} \ md5 788cf4940280fd787c0a2141d88ce3c7 \ sha1 18abd6d0424c4682815a13b34695d37d2fda2a73 \ rmd160 c6f49012633bbb84ffa405b8881dc90605d26fc6 extract.only ${distname}${extract.suffix} depends_build-append bin:unzip:unzip post-extract { cd ${worksrcpath} system "unzip -q ${distpath}/${mplayercodecsfile}" } configure.args-append --with-codecsdir=${prefix}/share/${name}/codecs post-destroot { xinstall -m 755 -d ${destroot}${prefix}/share/${name}/codecs cd ${destroot}${prefix}/share/${name}/codecs system "gunzip -c \ ${worksrcpath}/${mplayercodecs}/Contents/Archive.pax.gz | pax -r" } } if {[variant_isset darwin_i386]} { global mplayercodecs mplayercodecsfile set mplayercodecs "Essential Codecs Package (Intel).pkg" set mplayercodecsfile essential-macosx-x86-20060611.zip distfiles-append ${mplayercodecsfile}:codecs checksums-append ${mplayercodecsfile} \ md5 1e409d500336a8318cbe2a67bbf9d9ca \ sha1 4f8fee483b6c227d8cb774d2d30e1ef36a43e04a \ rmd160 87beaa40263deb0d0b9166f24d6f9dd686f594fd extract.only ${distname}${extract.suffix} depends_lib-append bin:unzip:unzip post-extract { cd ${worksrcpath} system "unzip -q ${distpath}/${mplayercodecsfile}" } configure.args-append --with-codecsdir=${prefix}/share/${name}/codecs post-destroot { xinstall -m 755 -d ${destroot}${prefix}/share/${name}/codecs cd ${destroot}${prefix}/share/${name}/codecs system "gunzip -c \ \"${worksrcpath}/${mplayercodecs}/Contents/Archive.pax.gz\" | pax -r" } } } variant speex \ description {Enable Speex playback} { depends_lib-append port:speex-devel configure.args-delete --disable-speex #configure.args-append --enable-speex } variant faac \ description {Enable AAC encoding} { depends_lib-append port:faac configure.args-delete --disable-faac } variant dv \ description {Enable DV encoding} { depends_lib-append port:libdv configure.args-delete --disable-libdv } variant twolame \ description {Enable MPEG Audio Layer 2 encoding} { depends_lib-append port:twolame configure.args-delete --disable-twolame } variant dts \ description {Enable non-passthrough DTS playback} { depends_lib-append port:libdts configure.args-delete --disable-libdts } ##### Outputs variant sdl \ description {Enable SDL video output} { depends_lib-append port:libsdl configure.args-delete --disable-sdl } variant aa \ description {Enable animated ASCII art video output} { depends_lib-append port:aalib configure.args-delete --disable-aa } variant caca \ description {Enable animated ASCII art video output} { depends_lib-append port:libcaca configure.args-delete --disable-caca } variant x11 { depends_lib-append lib:libX11.6:XFree86 configure.args-delete --disable-x11 configure.env-append PKG_CONFIG_PATH=${prefix}/lib/pkgconfig:${x11prefix}/lib/pkgconfig } variant arts \ description {Enable aRts audio output} { depends_lib-append port:arts configure.args-delete --disable-arts } variant esd \ description {Enable EsounD audio output} { depends_lib-append port:esound configure.args-delete --disable-esd } platform macosx { configure.args-append --enable-macosx --enable-macosx-finder-support \ --enable-macosx-bundle --enable-qtx } platform darwin { post-patch { reinplace "s|\$\(CC\) \$\(CFLAGS\) -o|\$\(LD\) \$\(CFLAGS\) -o|g" \ ${worksrcpath}/Makefile reinplace "s|-isysroot /Developer/SDKs/MacOSX10.4u.sdk||g" \ ${worksrcpath}/configure } build.env LD=cc } platform darwin 8 { # Need to force use of c++ for linking when Xcode 2.2 is used since some # bits of libstdc++ are needed during linking build.env LD=c++ } platform darwin i386 { configure.args-append --disable-win32 --disable-mp3lib } platform darwin powerpc {}