[96667] trunk/dports/python/py-sip

michaelld at macports.org michaelld at macports.org
Thu Aug 16 17:44:04 PDT 2012


Revision: 96667
          https://trac.macports.org/changeset/96667
Author:   michaelld at macports.org
Date:     2012-08-16 17:44:04 -0700 (Thu, 16 Aug 2012)
Log Message:
-----------
py-sip:

* fixes ticket #34742, adding compatibility for the new SDK location in XCode 4.3 and newer.

* split Qt info into lib and framework, and use each when appropriate; allows for PyQt4 to work for qt4-mac +framework or as libraries.

Modified Paths:
--------------
    trunk/dports/python/py-sip/Portfile
    trunk/dports/python/py-sip/files/patch-siputils.py.diff

Added Paths:
-----------
    trunk/dports/python/py-sip/files/patch-specs_macx-g++.diff

Modified: trunk/dports/python/py-sip/Portfile
===================================================================
--- trunk/dports/python/py-sip/Portfile	2012-08-17 00:43:09 UTC (rev 96666)
+++ trunk/dports/python/py-sip/Portfile	2012-08-17 00:44:04 UTC (rev 96667)
@@ -6,7 +6,7 @@
 
 name                py-sip
 version             4.13.2
-revision            0
+revision            1
 python.versions     24 25 26 27 31 32
 python.default_version 24
 categories          python devel
@@ -36,21 +36,22 @@
 
     checksums           rmd160  24a8e7c4bd36382594ea3f11317eb0f10e4e56ea \
                         sha256  4bc3f5353c75918e1c8499ec1474e7b3392c30513ea6d7a6334f88b88271eebf
-    patchfiles          patch-siputils.py.diff
+    patchfiles          patch-siputils.py.diff \
+                        patch-specs_macx-g++.diff
 
     use_configure       yes
     pre-configure {
         # Ensure correct compilers are used
-        reinplace "s| cc\$| ${configure.cc}|" \
+        reinplace "s|@CC@|${configure.cc}|" \
             ${worksrcpath}/specs/macx-g++
-        reinplace "s| c++\$| ${configure.cxx}|" \
+        reinplace "s|@CXX@|${configure.cxx}|" \
             ${worksrcpath}/specs/macx-g++
     }
 
     post-configure {
-# fix sip bin name
-       reinplace "s|bin/sip|bin/sip-${python.branch}|g" \
-         ${worksrcpath}/sipconfig.py
+        # fix sip bin name
+        reinplace "s|bin/sip|bin/sip-${python.branch}|g" \
+            ${worksrcpath}/sipconfig.py
     }
 
     configure.cmd       ${python.bin} configure.py
@@ -77,11 +78,18 @@
         configure.post_args-append  CXXFLAGS="${configure.universal_cxxflags}"
     }
 
+    if {[vercmp ${xcodeversion} 4.3] < 0} {
+        set sdk_dir ${developer_dir}/SDKs
+    } else {
+        set sdk_dir ${developer_dir}/Platforms/MacOSX.platform/Developer/SDKs
+    }
+
     switch ${os.major} {
-        8   { configure.args-append   "--sdk=${developer_dir}/SDKs/MacOSX10.4u.sdk" }
-        9   { configure.args-append   "--sdk=${developer_dir}/SDKs/MacOSX10.5.sdk" }
-        10  { configure.args-append   "--sdk=${developer_dir}/SDKs/MacOSX10.6.sdk" }
-        11  { configure.args-append   "--sdk=${developer_dir}/SDKs/MacOSX10.7.sdk" }
+        8   { configure.args-append   "--sdk=${sdk_dir}/MacOSX10.4u.sdk" }
+        9   { configure.args-append   "--sdk=${sdk_dir}/MacOSX10.5.sdk" }
+        10  { configure.args-append   "--sdk=${sdk_dir}/MacOSX10.6.sdk" }
+        11  { configure.args-append   "--sdk=${sdk_dir}/MacOSX10.7.sdk" }
+        12  { configure.args-append   "--sdk=${sdk_dir}/MacOSX10.8.sdk" }
     }
 
     build.cmd           make

Modified: trunk/dports/python/py-sip/files/patch-siputils.py.diff
===================================================================
--- trunk/dports/python/py-sip/files/patch-siputils.py.diff	2012-08-17 00:43:09 UTC (rev 96666)
+++ trunk/dports/python/py-sip/files/patch-siputils.py.diff	2012-08-17 00:44:04 UTC (rev 96667)
@@ -1,6 +1,44 @@
---- siputils.py.orig	2012-01-12 15:29:07.000000000 +0100
-+++ siputils.py	2012-01-12 15:34:31.000000000 +0100
-@@ -1462,8 +1462,8 @@
+--- siputils.py.orig	2012-08-16 15:48:37.000000000 -0400
++++ siputils.py	2012-08-16 15:48:52.000000000 -0400
+@@ -297,7 +297,7 @@
+             # These require special handling as they are (potentially) a set of
+             # space separated values rather than a single value that might
+             # contain spaces.
+-            if m in ("DEFINES", "CONFIG") or m[:6] in ("INCDIR", "LIBDIR"):
++            if m in ("DEFINES", "CONFIG") or m[:6] in ("INCDIR", "LIBDIR") or m[:12] in ("FRAMEWORKDIR"):
+                 val = val.split()
+ 
+             # We also want to treat lists of libraries in the same way so that
+@@ -601,6 +601,10 @@
+             libdir.extend(libdir_qt)
+             rpaths.extend(libdir_qt)
+ 
++            frameworkdir_qt = self.optional_list("FRAMEWORKDIR_QT")
++            libdir.extend(frameworkdir_qt)
++            rpaths.extend(frameworkdir_qt)
++
+             if self.config.qt_version >= 0x040000:
+                 # Try and read QT_LIBINFIX from qconfig.pri.
+                 qconfig = os.path.join(mkspecs, "qconfig.pri")
+@@ -715,7 +719,7 @@
+                             if mod == "QtAssistant" and self.config.qt_version < 0x040202:
+                                 mod = "QtAssistantClient"
+ 
+-                            incdir.append(os.path.join(libdir_qt[0], mod + ".framework", "Headers"))
++                            incdir.append(os.path.join(frameworkdir_qt[0], mod + ".framework", "Headers"))
+                         else:
+                             incdir.append(os.path.join(qtincdir[0], mod))
+ 
+@@ -883,7 +887,7 @@
+         if self.generator in ("MSVC", "MSVC.NET", "MSBUILD", "BMAKE"):
+             prl_name = os.path.join(self.config.qt_lib_dir, clib + ".prl")
+         elif sys.platform == "darwin" and framework:
+-            prl_name = os.path.join(self.config.qt_lib_dir, clib + ".framework", clib + ".prl")
++            prl_name = os.path.join(self.config.qt_framework_dir, clib + ".framework", clib + ".prl")
+         else:
+             prl_name = os.path.join(self.config.qt_lib_dir, "lib" + clib + ".prl")
+ 
+@@ -1462,8 +1466,8 @@
              # 'real_prefix' exists if virtualenv is being used.
              dl = getattr(sys, 'real_prefix', sys.exec_prefix).split(os.sep)
  
@@ -11,7 +49,7 @@
  
              self.LFLAGS.append("-undefined dynamic_lookup")
  
-@@ -2360,6 +2360,42 @@
+@@ -2360,6 +2364,42 @@
                  lhs = line[:assstart].strip()
                  rhs = line[assend + 1:].strip()
  

Added: trunk/dports/python/py-sip/files/patch-specs_macx-g++.diff
===================================================================
--- trunk/dports/python/py-sip/files/patch-specs_macx-g++.diff	                        (rev 0)
+++ trunk/dports/python/py-sip/files/patch-specs_macx-g++.diff	2012-08-17 00:44:04 UTC (rev 96667)
@@ -0,0 +1,28 @@
+--- specs/macx-g++.orig	2012-08-16 14:56:34.000000000 -0400
++++ specs/macx-g++	2012-08-16 14:59:56.000000000 -0400
+@@ -11,7 +11,7 @@
+ QMAKE_INCREMENTAL_STYLE = sublibs
+ QMAKE_COMPILER_DEFINES  += __APPLE__ __GNUC__
+ 
+-QMAKE_CC		= cc
++QMAKE_CC		= @CC@
+ QMAKE_LEX		= flex
+ QMAKE_LEXFLAGS		=
+ QMAKE_YACC		= yacc
+@@ -33,7 +33,7 @@
+ QMAKE_CFLAGS_PPC        = -arch ppc
+ QMAKE_CFLAGS_X86        = -arch i386
+ 
+-QMAKE_CXX		= c++
++QMAKE_CXX		= @CXX@
+ QMAKE_CXXFLAGS		= $$QMAKE_CFLAGS
+ QMAKE_CXXFLAGS_DEPS	= $$QMAKE_CFLAGS_DEPS
+ QMAKE_CXXFLAGS_WARN_ON	= $$QMAKE_CFLAGS_WARN_ON
+@@ -49,6 +49,7 @@
+ QMAKE_LIBDIR		=
+ QMAKE_INCDIR_QT		= $$[QT_INSTALL_HEADERS]
+ QMAKE_LIBDIR_QT		= $$[QT_INSTALL_LIBS]
++QMAKE_FRAMEWORKDIR_QT	= $$[QT_INSTALL_FRAMEWORKS]
+ QMAKE_INCDIR_OPENGL	= /System/Library/Frameworks/OpenGL.framework/Headers \
+ 	/System/Library/Frameworks/AGL.framework/Headers/
+ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120816/a15b33d4/attachment.html>


More information about the macports-changes mailing list