[79745] trunk/dports/multimedia/mplayer-devel
jeremyhu at macports.org
jeremyhu at macports.org
Fri Jun 24 13:14:43 PDT 2011
Revision: 79745
http://trac.macports.org/changeset/79745
Author: jeremyhu at macports.org
Date: 2011-06-24 13:14:42 -0700 (Fri, 24 Jun 2011)
Log Message:
-----------
mplayer-devel: Workaround some llvm-gcc and LTO bugs to enable llvm-gcc on darwin11
Since this would also need a revbump, just bump us to the latest revisions
of mplayer and ffmpeg as well.
Modified Paths:
--------------
trunk/dports/multimedia/mplayer-devel/Portfile
Added Paths:
-----------
trunk/dports/multimedia/mplayer-devel/files/configure.clang.patch
trunk/dports/multimedia/mplayer-devel/files/llvm-gcc-workaround.patch
Modified: trunk/dports/multimedia/mplayer-devel/Portfile
===================================================================
--- trunk/dports/multimedia/mplayer-devel/Portfile 2011-06-24 18:50:51 UTC (rev 79744)
+++ trunk/dports/multimedia/mplayer-devel/Portfile 2011-06-24 20:14:42 UTC (rev 79745)
@@ -5,13 +5,13 @@
PortSystem 1.0
name mplayer-devel
-version 33714
+version 33720
categories multimedia
maintainers acho openmaintainer
platforms darwin
set dvdnav_ver 1228
-set ffmpeg_ver ffc6c8a4305d25db8a5af72389a2453b17f43646
+set ffmpeg_ver 5aa8b270db2b88f136ef518b4bdf2b5dfff4a77b
description The MPlayer movie player built from SVN.
long_description ${description} It plays most MPEG/VOB, AVI, Ogg/OGM, \
@@ -40,18 +40,12 @@
system "svn export -r${version} --ignore-externals svn://svn.mplayerhq.hu/mplayer/trunk ${worksrcpath}/"
system "svn export -r${dvdnav_ver} svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdnav/src ${worksrcpath}/libdvdnav/"
system "svn export -r${dvdnav_ver} svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread/src ${worksrcpath}/libdvdread4/"
- system "git clone --depth 1 git://git.videolan.org/ffmpeg.git ${worksrcpath}/ffmpeg"
+
+ # 1000 should be deep enough to find out checkout
+ system "git clone --depth 1000 git://git.videolan.org/ffmpeg.git ${worksrcpath}/ffmpeg"
system "cd ${worksrcpath}/ffmpeg && git checkout -f ${ffmpeg_ver}"
}
-platform darwin 11 {
- configure.compiler gcc-4.2
- #post-patch {
- # # MPlayer does not play well with llvm-gcc's link time optimization
- # reinplace "s:-O4:-O4 -fno-lto:" ${worksrcpath}/configure
- #}
-}
-
# Do not use the following environment variables, otherwise the build phase
# will fail.
configure.cflags {}
@@ -90,7 +84,8 @@
--disable-libschroedinger-lavc --disable-liba52 \
--disable-gif
-patchfiles configure.x11.patch
+# configure.clang.patch: http://bugzilla.mplayerhq.hu/show_bug.cgi?id=1939
+patchfiles configure.x11.patch configure.clang.patch
post-destroot {
xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${name}
@@ -269,25 +264,32 @@
variant debug description {Compile with debugging symbols} {
configure.args-append --enable-debug=gdb3 --disable-altivec
- #post-patch {
- # reinplace "s:-O2:-O0:g" ${worksrcpath}/configure
- #}
}
+platform darwin 9 {
+ configure.args-delete --extra-cflags="-I${prefix}/include/lzo -I${prefix}/include"
+ configure.args-append --extra-cflags="-fomit-frame-pointer -I${prefix}/include/lzo -I${prefix}/include"
+}
+
+platform darwin 11 {
+ # BUILD FIX TODO:
+ # clang fails to build due to some bad inline asm
+ # https://ffmpeg.org/trac/ffmpeg/ticket/303
+ # configure.compiler clang
+
+ # llvm-gcc-4.2 fails to build vf_fspp.c properly with -O2 and above
+ patchfiles-append llvm-gcc-workaround.patch
+
+ post-patch {
+ # link time optimization fails to find references for ff_mlp_firorder*
+ # For some reason -O4 -fno-lto doesn't work as well, so just use -O3
+ reinplace "s:-O4:-O3:" ${worksrcpath}/configure
+ }
+}
+
platform darwin {
if { ${configure.build_arch} == "x86_64" } {
configure.args-append --target=${configure.build_arch}-Darwin
}
build.env LD=${configure.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=${configure.cxx}
-}
-
-platform darwin 9 {
- configure.args-delete --extra-cflags="-I${prefix}/include/lzo -I${prefix}/include"
- configure.args-append --extra-cflags="-fomit-frame-pointer -I${prefix}/include/lzo -I${prefix}/include"
-}
Added: trunk/dports/multimedia/mplayer-devel/files/configure.clang.patch
===================================================================
--- trunk/dports/multimedia/mplayer-devel/files/configure.clang.patch (rev 0)
+++ trunk/dports/multimedia/mplayer-devel/files/configure.clang.patch 2011-06-24 20:14:42 UTC (rev 79745)
@@ -0,0 +1,12 @@
+--- configure.orig 2011-06-24 11:52:31.000000000 -0700
++++ configure 2011-06-24 11:53:10.000000000 -0700
+@@ -1661,8 +1661,7 @@ else
+ echores "$cc_version"
+ break
+ fi
+- cc_name_tmp=$($_cc -v 2>&1 | head -n 1 | cut -d ' ' -f 1)
+- if test "$cc_name_tmp" = "clang"; then
++ if $_cc -v 2>&1 | grep -q "clang"; then
+ echocheck "$_cc version"
+ cc_vendor=clang
+ cc_version=$($_cc -dumpversion 2>&1)
Added: trunk/dports/multimedia/mplayer-devel/files/llvm-gcc-workaround.patch
===================================================================
--- trunk/dports/multimedia/mplayer-devel/files/llvm-gcc-workaround.patch (rev 0)
+++ trunk/dports/multimedia/mplayer-devel/files/llvm-gcc-workaround.patch 2011-06-24 20:14:42 UTC (rev 79745)
@@ -0,0 +1,11 @@
+--- ffmpeg/libavutil/mem.h.orig 2011-06-24 12:09:36.000000000 -0700
++++ ffmpeg/libavutil/mem.h 2011-06-24 12:10:06.000000000 -0700
+@@ -41,7 +41,7 @@
+ static const t __attribute__((aligned(n))) v
+ #elif defined(__GNUC__)
+ #define DECLARE_ALIGNED(n,t,v) t __attribute__ ((aligned (n))) v
+- #define DECLARE_ASM_CONST(n,t,v) static const t av_used __attribute__ ((aligned (n))) v
++ #define DECLARE_ASM_CONST(n,t,v) __private_extern__ const t av_used __attribute__ ((aligned (n))) v
+ #elif defined(_MSC_VER)
+ #define DECLARE_ALIGNED(n,t,v) __declspec(align(n)) t v
+ #define DECLARE_ASM_CONST(n,t,v) __declspec(align(n)) static const t v
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110624/4e34f851/attachment.html>
More information about the macports-changes
mailing list