[58495] trunk/dports/python/py25-pyqt4

macsforever2000 at macports.org macsforever2000 at macports.org
Tue Sep 29 12:53:03 PDT 2009


Revision: 58495
          http://trac.macports.org/changeset/58495
Author:   macsforever2000 at macports.org
Date:     2009-09-29 12:53:03 -0700 (Tue, 29 Sep 2009)
Log Message:
-----------
Changes to make portfile look like py26-pyqt4.

Modified Paths:
--------------
    trunk/dports/python/py25-pyqt4/Portfile
    trunk/dports/python/py25-pyqt4/files/patch-configure.py

Modified: trunk/dports/python/py25-pyqt4/Portfile
===================================================================
--- trunk/dports/python/py25-pyqt4/Portfile	2009-09-29 19:25:19 UTC (rev 58494)
+++ trunk/dports/python/py25-pyqt4/Portfile	2009-09-29 19:53:03 UTC (rev 58495)
@@ -5,8 +5,8 @@
 
 name		py25-pyqt4
 version		4.6
+categories	python devel
 platforms	macosx
-categories	python devel
 maintainers     saispo openmaintainer
 description	PyQt4 is a set of Python bindings for the Qt4 toolkit
 long_description \
@@ -18,6 +18,7 @@
 master_sites	http://www.riverbankcomputing.com/static/Downloads/PyQt4/ \
 		http://pyqwt.sourceforge.net/support/
 distname	PyQt-mac-gpl-${version}
+dist_subdir         python
 
 checksums           md5     35258016c30a80f97689e643fba4704b \
                     sha1    a77ecba115cb94002f6c6cd7dbcfb78e655561d4 \
@@ -25,10 +26,16 @@
 
 depends_lib	port:py25-sip port:qt4-mac
 
-#patchfiles	patch-configure.py
-
+set pyversion 2.5
 set qt_dir	${prefix}/libexec/qt4-mac
 
+# The patch file alters configure.py so that the qtdesigner plugin can link.
+# - it ensures that both LFLAGS are included and that the relevant version framework is linked
+patchfiles	patch-configure.py
+post-patch {
+    reinplace "s|@@MACPORTS_PYTHON_FRAMEWORK@@|${frameworks_dir}/Python.framework/Versions/${pyversion}/Python|" ${worksrcpath}/configure.py
+}
+
 pre-configure {
 	file copy -force ${qt_dir}/mkspecs/macx-g++/qmake.conf \
 		${worksrcpath}/qmake.conf
@@ -43,10 +50,16 @@
 configure.pre_args
 configure.post_args	LFLAGS="-F${prefix}/Library/Frameworks -L${prefix}/lib"
 
+build.target    all
+use_parallel_build yes
+
 test.run	yes
-test.cmd	cd qt && ${prefix}/bin/python2.5 -c 'import PyQt4'
+test.cmd	cd qt && ${prefix}/bin/python${pyversion} -c 'import PyQt4'
 
 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}    
+
 	xinstall -m 755 -d ${destroot}${prefix}/share/doc
 	file copy ${worksrcpath}/doc ${destroot}${prefix}/share/doc/${name}
 	file copy ${worksrcpath}/examples \

Modified: trunk/dports/python/py25-pyqt4/files/patch-configure.py
===================================================================
--- trunk/dports/python/py25-pyqt4/files/patch-configure.py	2009-09-29 19:25:19 UTC (rev 58494)
+++ trunk/dports/python/py25-pyqt4/files/patch-configure.py	2009-09-29 19:53:03 UTC (rev 58495)
@@ -1,22 +1,11 @@
---- configure.py.orig	2006-03-24 19:09:08.000000000 -0500
-+++ configure.py	2006-04-19 06:05:07.000000000 -0400
-@@ -253,6 +253,7 @@
-             0x030200: "Qt_3_1_2",
-             0x030300: "Qt_3_2_0",
-             0x030305: "Qt_3_3_0",
-+            0x030304: "Qt_3_3_4",
-             0x030306: "Qt_3_3_5",
-             0x040000: "Qt_3_3_6"
-         }
-@@ -1026,9 +1027,9 @@
-     """
-     # Get the name of the qmake configuration file to take the macros from.
-     if "QMAKESPEC" in os.environ.keys():
--        fname = os.path.join(qt_dir, "mkspecs", os.environ["QMAKESPEC"], "qmake.conf")
-+        fname = "qmake.conf"
-     else:
--        fname = os.path.join(qt_dir, "mkspecs", "default", "qmake.conf")
-+        fname = "qmake.conf"
- 
-         if not os.access(fname, os.F_OK):
-             sipconfig.error("Unable to find the default configuration file %s. You can use the QMAKESPEC environment variable to specify the correct platform instead of \"default\"." % fname)
+--- configure.py.orig	2009-07-15 01:37:10.000000000 +1200
++++ configure.py	2009-07-19 18:28:19.000000000 +1200
+@@ -840,7 +840,7 @@
+                 if sys.platform == "darwin":
+                     # We need to work out how to specify the right framework
+                     # version.
+-                    link = "-framework Python"
++                    link = "%s @@MACPORTS_PYTHON_FRAMEWORK@@" % sipcfg.build_macros().get('LFLAGS', '')
+                 elif ("--enable-shared" in ducfg.get("CONFIG_ARGS", "") and
+                       glob.glob("%s/lib/libpython%d.%d*" % (ducfg["exec_prefix"], py_major, py_minor))):
+                     lib_dir_flag = quote("-L%s/lib" % ducfg["exec_prefix"])
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090929/169a95a2/attachment.html>


More information about the macports-changes mailing list