[75824] trunk/dports/multimedia/mpgtx

ryandesign at macports.org ryandesign at macports.org
Wed Feb 9 13:38:50 PST 2011


Revision: 75824
          http://trac.macports.org/changeset/75824
Author:   ryandesign at macports.org
Date:     2011-02-09 13:38:50 -0800 (Wed, 09 Feb 2011)
Log Message:
-----------
mpgtx: clean up this mess! In the process, support build_arch and universal (#28331) and ensure we're UsingTheRightCompiler

Modified Paths:
--------------
    trunk/dports/multimedia/mpgtx/Portfile

Added Paths:
-----------
    trunk/dports/multimedia/mpgtx/files/
    trunk/dports/multimedia/mpgtx/files/patch-bsd.diff
    trunk/dports/multimedia/mpgtx/files/patch-configure.diff

Modified: trunk/dports/multimedia/mpgtx/Portfile
===================================================================
--- trunk/dports/multimedia/mpgtx/Portfile	2011-02-09 21:01:35 UTC (rev 75823)
+++ trunk/dports/multimedia/mpgtx/Portfile	2011-02-09 21:38:50 UTC (rev 75824)
@@ -28,22 +28,38 @@
                     sha1    58b3d18b6dac968e8dd969a7b33c8a8fc31569cd \
                     rmd160  f39704aef3e2b325d77f48817ecb883ea6a2a029
 
-configure.args      --parachute \
-                    --manprefix=${prefix}/share
+patchfiles          patch-configure.diff
 
-post-configure {
-    reinplace "s|${prefix}|${destroot}${prefix}|g" \
-        ${worksrcpath}/Makefile
-    reinplace "s|/usr/local|${destroot}${prefix}/share|g" \
-        ${worksrcpath}/Makefile
-    reinplace "s|cpflags=d|cpflags=R|" \
-        ${worksrcpath}/Makefile
+post-patch {
+    if {[variant_isset universal]} {
+        set archflags ${configure.universal_cflags}
+    } else {
+        set archflags ${configure.cc_archflags}
+    }
+    reinplace "s|@CXX@|${configure.cxx}|g" ${worksrcpath}/configure
+    reinplace "s|@OPTFLAGS@|${configure.optflags}|g" ${worksrcpath}/configure
+    reinplace "s|@CFLAGS@|${configure.cflags} ${archflags}|g" ${worksrcpath}/configure
+    reinplace "s|@LDFLAGS@|${configure.ldflags} ${archflags}|g" ${worksrcpath}/configure
 }
 
-build.target        {}
+configure.pre_args  --prefix=${destroot}${prefix}
 
+configure.args      --parachute \
+                    --manprefix=${destroot}${prefix}/share
+
+configure.universal_args-delete --disable-dependency-tracking
+
+build.target
+
 post-destroot {
-    file mkdir ${destroot}${prefix}/share/doc/${name}
-    file copy ${worksrcpath}/AUTHORS ${worksrcpath}/README \
+    xinstall -d ${destroot}${prefix}/share/doc/${name}
+    xinstall -m 644 -W ${worksrcpath} AUTHORS README \
         ${destroot}${prefix}/share/doc/${name}
 }
+
+platform darwin {
+    patchfiles-append patch-bsd.diff
+}
+platform freebsd {
+    patchfiles-append patch-bsd.diff
+}

Added: trunk/dports/multimedia/mpgtx/files/patch-bsd.diff
===================================================================
--- trunk/dports/multimedia/mpgtx/files/patch-bsd.diff	                        (rev 0)
+++ trunk/dports/multimedia/mpgtx/files/patch-bsd.diff	2011-02-09 21:38:50 UTC (rev 75824)
@@ -0,0 +1,12 @@
+BSD cp doesn't support "-d" to preserve symlinks, but "-R" does the same.
+--- configure.orig	2005-01-02 15:19:23.000000000 -0600
++++ configure	2011-02-09 15:34:24.000000000 -0600
+@@ -29,7 +29,7 @@
+ LFS="yes"
+ 
+ # cp flags
+-cpflags="d"
++cpflags="R"
+ 
+ # some stuff for MacOSX -----------------------------
+ HOSTNAME=`./config.guess`

Added: trunk/dports/multimedia/mpgtx/files/patch-configure.diff
===================================================================
--- trunk/dports/multimedia/mpgtx/files/patch-configure.diff	                        (rev 0)
+++ trunk/dports/multimedia/mpgtx/files/patch-configure.diff	2011-02-09 21:38:50 UTC (rev 75824)
@@ -0,0 +1,24 @@
+--- configure.orig	2005-01-02 15:19:23.000000000 -0600
++++ configure	2011-02-09 15:34:24.000000000 -0600
+@@ -9,17 +9,17 @@
+ prefix="/usr/local"
+ manprefix='$(PREFIX)'
+ #compiler flags
+-CC="g++"
+-common_cflags="-Wall"
++CC="@CXX@"
++common_cflags="-Wall @CFLAGS@"
+ devel_cflags="-g -Werror -fno-builtin"
+-optimization_cflags="-O3"
++optimization_cflags="@OPTFLAGS@"
+ release_cflags=$optimization_cflags
+ OFLAGS="-ansi"
+ cflags=$common_cflags
+ 
+ #linker flags
+ 
+-lflags=""
++lflags="@LDFLAGS@"
+ 
+ #state vars
+ debug="no"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110209/12d0c751/attachment.html>


More information about the macports-changes mailing list