[59285] trunk/dports/python/py26-pyqt4/Portfile
macsforever2000 at macports.org
macsforever2000 at macports.org
Mon Oct 12 20:44:12 PDT 2009
Revision: 59285
http://trac.macports.org/changeset/59285
Author: macsforever2000 at macports.org
Date: 2009-10-12 20:44:09 -0700 (Mon, 12 Oct 2009)
Log Message:
-----------
Add universal variant. (#21647)
Modified Paths:
--------------
trunk/dports/python/py26-pyqt4/Portfile
Modified: trunk/dports/python/py26-pyqt4/Portfile
===================================================================
--- trunk/dports/python/py26-pyqt4/Portfile 2009-10-13 03:27:46 UTC (rev 59284)
+++ trunk/dports/python/py26-pyqt4/Portfile 2009-10-13 03:44:09 UTC (rev 59285)
@@ -48,8 +48,41 @@
-g -q ${qt_dir}/bin/qmake \
--confirm-license"
configure.pre_args
-configure.post_args LFLAGS="-F${prefix}/Library/Frameworks -L${prefix}/lib"
+configure.post_args LFLAGS="-F${frameworks_dir} -L${prefix}/lib"
+variant universal {
+ configure.universal_args
+ configure.post_args LFLAGS="-F${frameworks_dir} -L${prefix}/lib \
+ ${configure.universal_ldflags}"
+ configure.post_args-append CFLAGS="${configure.universal_cflags}"
+ configure.post_args-append CXXFLAGS="${configure.universal_cxxflags}"
+
+}
+
+post-configure {
+ if {[variant_isset universal]} {
+ set conflags ""
+ foreach arch ${configure.universal_archs} {
+ if {${arch} == "i386"} {append conflags "x86 "} else {
+ if {${arch} == "ppc64"} {append conflags "ppc_64 "} else {
+ append conflags ${arch} " "
+ }
+ }
+ }
+
+ set profiles [exec find ${worksrcpath} -name "*.pro"]
+ foreach profile ${profiles} {
+ reinplace -E "s|^(CONFIG\[ \\t].*)|\\1 ${conflags}|" ${profile}
+
+ # Cures an isolated case
+ system "cd ${worksrcpath}/designer && \
+ ${qt_dir}/bin/qmake -spec ${qt_dir}/mkspecs/macx-g++ -macx \
+ -o Makefile python.pro"
+ }
+ }
+}
+
+
build.target all
use_parallel_build yes
@@ -58,7 +91,7 @@
post-destroot {
ln -s ${frameworks_dir}/Python.framework/Versions/${pyversion}/bin/pyrcc4 ${destroot}${prefix}/bin/pyrcc4-${pyversion}
- ln -s ${frameworks_dir}/Python.framework/Versions/${pyversion}/bin/pyuic4 ${destroot}${prefix}/bin/pyuic4-${pyversion}
+ ln -s ${frameworks_dir}/Python.framework/Versions/${pyversion}/bin/pyuic4 ${destroot}${prefix}/bin/pyuic4-${pyversion}
xinstall -m 755 -d ${destroot}${prefix}/share/doc
file copy ${worksrcpath}/doc ${destroot}${prefix}/share/doc/${name}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20091012/95dcaa8c/attachment.html>
More information about the macports-changes
mailing list