[99744] trunk/dports/graphics/libQGLViewer

vince at macports.org vince at macports.org
Thu Nov 15 12:05:08 PST 2012


Revision: 99744
          https://trac.macports.org/changeset/99744
Author:   vince at macports.org
Date:     2012-11-15 12:05:07 -0800 (Thu, 15 Nov 2012)
Log Message:
-----------
Patch for universal build (add universal flags to all .pro files)

Modified Paths:
--------------
    trunk/dports/graphics/libQGLViewer/Portfile

Added Paths:
-----------
    trunk/dports/graphics/libQGLViewer/files/universal.sh

Modified: trunk/dports/graphics/libQGLViewer/Portfile
===================================================================
--- trunk/dports/graphics/libQGLViewer/Portfile	2012-11-15 20:01:38 UTC (rev 99743)
+++ trunk/dports/graphics/libQGLViewer/Portfile	2012-11-15 20:05:07 UTC (rev 99744)
@@ -37,6 +37,8 @@
     patchfiles-append           patch-contribs.pro.diff
 }
 
+variant universal {}
+
 variant x11 {}
 
 if {![variant_isset x11]} {
@@ -50,6 +52,13 @@
 
 post-patch {
     reinplace "s|@@QT_PLUGINS_DIR@@|${qt_plugins_dir}|g" ${worksrcpath}/designerPlugin/designerPlugin.pro
+
+	if {[variant_isset universal]} {
+		file copy ${filespath}/universal.sh ${worksrcpath}
+		reinplace "s|@@@WRKSRCPATH@@@|${worksrcpath}|" ${worksrcpath}/universal.sh
+		reinplace "s|@@@ARCHS@@@|${configure.universal_cxxflags}|" ${worksrcpath}/universal.sh
+		system 'chmod +x ${worksrcpath}/universal.sh && ${worksrcpath}/universal.sh'
+	}
 }
 
 configure.pre_args              PREFIX=${prefix} \

Added: trunk/dports/graphics/libQGLViewer/files/universal.sh
===================================================================
--- trunk/dports/graphics/libQGLViewer/files/universal.sh	                        (rev 0)
+++ trunk/dports/graphics/libQGLViewer/files/universal.sh	2012-11-15 20:05:07 UTC (rev 99744)
@@ -0,0 +1,10 @@
+#!/bin/sh
+for file in `find @@@WRKSRCPATH@@@ -name '*.pro'`; do
+	cat << EOT > ${file}.tmp
+QMAKE_CFLAGS_RELEASE += @@@ARCHS@@@
+QMAKE_CXXFLAGS_RELEASE += @@@ARCHS@@@
+QMAKE_LFLAGS_RELEASE += @@@ARCHS@@@
+EOT
+	cat ${file} >> ${file}.tmp
+	mv ${file}.tmp ${file}
+done


Property changes on: trunk/dports/graphics/libQGLViewer/files/universal.sh
___________________________________________________________________
Added: svn:executable
   + *
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20121115/de9e0d84/attachment.html>


More information about the macports-changes mailing list