[88549] trunk/dports/multimedia

cal at macports.org cal at macports.org
Tue Jan 3 19:17:25 PST 2012


Revision: 88549
          http://trac.macports.org/changeset/88549
Author:   cal at macports.org
Date:     2012-01-03 19:17:24 -0800 (Tue, 03 Jan 2012)
Log Message:
-----------
mplayer2: New port

Added Paths:
-----------
    trunk/dports/multimedia/mplayer2/
    trunk/dports/multimedia/mplayer2/Portfile
    trunk/dports/multimedia/mplayer2/files/
    trunk/dports/multimedia/mplayer2/files/clang-compatibility-mplayer-configure.patch

Added: trunk/dports/multimedia/mplayer2/Portfile
===================================================================
--- trunk/dports/multimedia/mplayer2/Portfile	                        (rev 0)
+++ trunk/dports/multimedia/mplayer2/Portfile	2012-01-04 03:17:24 UTC (rev 88549)
@@ -0,0 +1,135 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
+# $Id$
+
+PortSystem              1.0
+
+name                    mplayer2
+version                 2.0
+categories              multimedia
+platforms               darwin
+license                 Restrictive
+maintainers             cal openmaintainer
+description             mplayer2 is an advanced general-purpose video player. A fork of the original MPlayer project, it contains significant \
+                        further development and supports a number of features not available in other Unix players.
+long_description        ${description}
+
+homepage                http://www.mplayer2.org/
+master_sites            http://ftp.mplayer2.org/pub/release
+distname                ${name}-build-${version}
+use_xz                  yes
+
+checksums               rmd160  48193cf6a48e16cce7f74d8f0915e64dc4b7d1cd \
+                        sha256  e0a4dba087ba8c6a916d8bc9c7063bd2fd86d36bb08e31a2bd2d82e56b3c4058
+
+conflicts               mplayer mplayer-devel
+
+depends_build           port:yasm
+
+depends_lib             port:xorg-libXv \
+                        port:xorg-libXvMC \
+                        port:freetype \
+                        port:fontconfig \
+                        port:libdvdnav \
+                        port:libdvdread \
+                        port:libdvdcss \
+                        port:libcddb \
+                        port:fribidi \
+                        port:giflib \
+                        port:libpng \
+                        port:jpeg \
+                        port:openjpeg \
+                        port:libcdio \
+                        port:libdv \
+                        port:libvorbis \
+                        port:libtheora \
+                        port:faad2 \
+                        port:a52dec \
+                        path:lib/pkgconfig/sdl.pc:libsdl \
+                        port:dirac \
+                        port:schroedinger \
+                        port:lame \
+                        port:speex \
+                        port:libvpx \
+                        port:XviD \
+                        port:x264
+
+use_configure           no
+
+variant universal {}
+
+set mplayercflags      "--disable-smb \
+                        --enable-menu \
+                        --enable-macosx-finder \
+                        --enable-gif \
+                        --enable-png \
+                        --enable-mng \
+                        --enable-jpeg \
+                        --enable-libcdio \
+                        --enable-xvid \
+                        --enable-theora \
+                        --enable-faad \
+                        --enable-liba52 \
+                        --enable-sdl \
+                        --enable-xv \
+                        --enable-xvmc \
+                        --enable-corevideo \
+                        --enable-quartz \
+                        --enable-coreaudio \
+                        --enable-translation \
+                        --language=all"
+
+set ffmpegcflags       "--enable-libdirac \
+                        --enable-libschroedinger \
+                        --enable-libmp3lame \
+                        --enable-libopenjpeg \
+                        --enable-libspeex \
+                        --enable-libtheora \
+                        --enable-libvorbis \
+                        --enable-libvpx \
+                        --enable-libx264 \
+                        --enable-libxvid \
+                        --enable-libfaac \
+                        --enable-nonfree"
+
+if {${configure.compiler} == "clang"} {
+    patchfiles-append   clang-compatibility-mplayer-configure.patch
+}
+
+pre-build {
+    set commonconf  [open "${worksrcpath}/common_options" "a"]
+    set ffmpegconf  [open "${worksrcpath}/ffmpeg_options" "a"]
+    set mplayerconf [open "${worksrcpath}/mplayer_options" "a"]
+
+    puts $commonconf "--cc=${configure.cc}"
+    puts $commonconf "--extra-cflags=${configure.cflags} ${configure.cppflags} [get_canonical_archflags]"
+    puts $commonconf "--extra-ldflags=${configure.ldflags} [get_canonical_archflags]"
+
+    foreach option $mplayercflags {
+        puts $mplayerconf $option
+    }
+
+    foreach option $ffmpegcflags {
+        puts $ffmpegconf $option
+    }
+
+    puts $mplayerconf "--extra-ldflags=-lintl -lcdio_cdda -lcdio_paranoia -la52"
+    puts $mplayerconf "--prefix=${prefix}"
+
+    close $commonconf
+    close $ffmpegconf
+    close $mplayerconf
+
+    reinplace -E "s|'--cpu=host',||" ${worksrcpath}/script/ffmpeg-config
+}
+
+build.target            mplayer
+build.env-append        CC=${configure.cc} \
+                        CPP=${configure.cpp} \
+                        CFLAGS="${configure.optflags} [get_canonical_archflags]" \
+                        CPPFLAGS="${configure.cppflags}" \
+                        LDFLAGS="${configure.ldflags} [get_canonical_archflags]"
+
+variant samba description {Enable Samba support} {
+    depends_lib-append  port:samba3
+    configure.args-append --enable-smb
+}


Property changes on: trunk/dports/multimedia/mplayer2/Portfile
___________________________________________________________________
Added: svn:eol-style:native
   + 
Added: svn:keywords
   + Id

Added: trunk/dports/multimedia/mplayer2/files/clang-compatibility-mplayer-configure.patch
===================================================================
--- trunk/dports/multimedia/mplayer2/files/clang-compatibility-mplayer-configure.patch	                        (rev 0)
+++ trunk/dports/multimedia/mplayer2/files/clang-compatibility-mplayer-configure.patch	2012-01-04 03:17:24 UTC (rev 88549)
@@ -0,0 +1,11 @@
+--- mplayer/configure.orig	2012-01-04 03:18:30.000000000 +0100
++++ mplayer/configure	2012-01-04 03:18:36.000000000 +0100
+@@ -1458,7 +1458,7 @@
+       echores "$cc_version"
+       break
+     fi
+-    cc_name_tmp=$($_cc -v 2>&1 | head -n 1 | cut -d ' ' -f 1)
++    cc_name_tmp=$($_cc -v 2>&1 | head -n 1 | cut -d ' ' -f 2)
+     if test "$cc_name_tmp" = "clang"; then
+       echocheck "$_cc version"
+       cc_vendor=clang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120103/2d80cca2/attachment-0001.html>


More information about the macports-changes mailing list