# $Id: Portfile,v 1.12 2005/10/12 07:21:27 blb Exp $ PortSystem 1.0 name MPlayer version 1.0pre7try2 categories multimedia maintainers blb@pobox.com 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 http://www1.mplayerhq.hu/MPlayer/releases/ \ http://www2.mplayerhq.hu/MPlayer/releases/ \ http://ftp3.mplayerhq.hu/MPlayer/releases/ \ http://ftp5.mplayerhq.hu/MPlayer/releases/ \ http://www1.mplayerhq.hu/MPlayer/releases/codecs/:codecs \ http://www2.mplayerhq.hu/MPlayer/releases/codecs/:codecs use_bzip2 yes checksums ${distname}${extract.suffix} md5 \ aaca4fd327176c1afb463f0f047ef6f4 depends_lib lib:libpng:libpng lib:libjpeg:jpeg lib:liblzo:lzo \ lib:libvorbis:libvorbis lib:libmad:libmad \ lib:libmp3lame:lame patchfiles patch-configure patch-libavcodec_ppc_dsputil_ppc.h \ patch-libmpdemux_frequencies.h pre-configure { reinplace "s|^#define USE_MP3LIB|/\*#define USE_MP3LIB\*/|" \ ${worksrcpath}/configure } configure.args --with-extraincdir=${prefix}/include \ --with-extralibdir=${prefix}/lib \ --datadir=${prefix}/share/${name} \ --confdir=${prefix}/etc/${name} \ --mandir=${prefix}/share/man \ --enable-inet6 --enable-png --enable-jpeg \ --enable-liblzo --enable-qtx --enable-vorbis \ --enable-mad --enable-mencoder \ --disable-sdl --disable-x11 --disable-freetype \ --disable-fontconfig --disable-gif --disable-arts \ --disable-esd --disable-fribidi --disable-theora post-destroot { file mkdir ${destroot}${prefix}/share/doc/${name} eval file copy [glob ${worksrcpath}/DOCS/*] \ ${destroot}${prefix}/share/doc/${name} } variant real { global mplayerRP8 mplayerRP9 mplayerRP8file mplayerRP9file set mplayerRP8 rp8codecs-ppc-20050115 set mplayerRP9 rp9codecs-macosx-20041107.pkg set mplayerRP8file ${mplayerRP8}.tar.bz2 set mplayerRP9file ${mplayerRP9}.zip distfiles-append ${mplayerRP8file}:codecs ${mplayerRP9file}:codecs checksums-append ${mplayerRP8file} \ md5 4cc9a6270f9aa834b4fef49d71b9faf9 \ sha1 12ce04765bdf96e6ad386de1ef637b471d947796 \ ${mplayerRP9file} \ md5 788cf4940280fd787c0a2141d88ce3c7 \ sha1 18abd6d0424c4682815a13b34695d37d2fda2a73 extract.only ${distname}${extract.suffix} post-extract { cd ${worksrcpath} system "bunzip2 -c ${distpath}/${mplayerRP8file} | tar xf -" system "unzip -q ${distpath}/${mplayerRP9file}" } configure.args-append --with-reallibdir=${prefix}/share/${name}/codecs post-destroot { xinstall -m 755 -d ${destroot}${prefix}/share/${name}/codecs eval file copy [glob ${worksrcpath}/${mplayerRP8}/*] \ ${destroot}${prefix}/share/${name}/codecs cd ${destroot}${prefix}/share/${name}/codecs system "gunzip -c \ ${worksrcpath}/${mplayerRP9}/Contents/Archive.pax.gz | pax -r" } } variant x11 { ui_msg "Note, if you are running Mac OS X, you may find the sdl variant" ui_msg "a faster choice" depends_lib-append lib:libX11.6:XFree86 lib:libfreetype:freetype \ lib:libfontconfig:fontconfig configure.args-delete --disable-x11 --disable-freetype \ --disable-fontconfig configure.args-append --enable-x11 --enable-freetype --enable-fontconfig configure.env-append PKG_CONFIG_PATH=${x11prefix}/lib/pkgconfig } variant sdl { depends_lib-append lib:libSDL:libsdl configure.args-delete --disable-sdl configure.args-append --enable-sdl } variant fontconfig { depends_lib-append port:fontconfig configure.args-delete --disable-fontconfig configure.args-append --enable-fontconfig } variant freetype { depends_lib-append lib:libfreetype:freetype configure.args-delete --disable-freetype configure.args-append --enable-freetype } # configure doesn't pick up the right -l flag if we --enable-gif, so # we let it autodetect this variant gif { depends_lib-append lib:libungif:libungif configure.args-delete --disable-gif } variant arts { depends_lib-append lib:libartsc:arts configure.args-delete --disable-arts configure.args-append --enable-arts } variant esd { depends_lib-append lib:libesd:esound configure.args-delete --disable-esd configure.args-append --enable-esd } variant fribidi { depends_lib-append lib:libfribidi:fribidi configure.args-delete --disable-fribidi configure.args-append --enable-fribidi } variant theora { depends_lib-append lib:libtheora:libtheora configure.args-delete --disable-theora configure.args-append --enable-theora } # Install all possible languages for man pages variant man_all_lang { configure.args-append --language=all } # GUI variant needs additional download of a skin #variant gui { # depends_lib-append lib:libgtk.1:gtk # configure.args-append --enable-gui #} platform darwin { patchfiles-append patch-libvo_gtf.c patch-libmpeg2_cpu_state.c }