[91814] trunk/dports/python/py-wxpython

jwa at macports.org jwa at macports.org
Wed Apr 11 03:41:51 PDT 2012


Revision: 91814
          https://trac.macports.org/changeset/91814
Author:   jwa at macports.org
Date:     2012-04-11 03:41:48 -0700 (Wed, 11 Apr 2012)
Log Message:
-----------
rearrange patching to be more simple and understandable

Modified Paths:
--------------
    trunk/dports/python/py-wxpython/Portfile
    trunk/dports/python/py-wxpython/files/patch-config.py.diff

Removed Paths:
-------------
    trunk/dports/python/py-wxpython/files/patch-config.py.diff.in

Modified: trunk/dports/python/py-wxpython/Portfile
===================================================================
--- trunk/dports/python/py-wxpython/Portfile	2012-04-11 08:55:05 UTC (rev 91813)
+++ trunk/dports/python/py-wxpython/Portfile	2012-04-11 10:41:48 UTC (rev 91814)
@@ -37,24 +37,19 @@
 
 extract.post_args	"| tar -xf - ${worksrcdir} ${distname}/docs"
 
+patchfiles		patch-config.py.diff
+
 universal_variant	no
 
 build.env		UNICODE="1" WXPORT="mac" PATH="${prefix}/lib/wx-devel/bin:$env(PATH)"
 
 destroot.env	UNICODE="1" WXPORT="mac" PATH="${prefix}/lib/wx-devel/bin:$env(PATH)"
 
-pre-fetch {
-    touch ${portpath}/files/patch-config.py.diff
-}
-
-pre-patch {
-    delete ${portpath}/files/patch-config.py.diff
-    copy ${portpath}/files/patch-config.py.diff.in \
-        ${portpath}/files/patch-config.py.diff
+post-patch {
     if {[vercmp $xcodeversion 4.3] >= 0} {
-        reinplace "s;@developer_dir@;${developer_dir}/Platforms/MacOSX.platform/Developer;" ${portpath}/files/patch-config.py.diff
+        reinplace "s;@developer_dir@;${developer_dir}/Platforms/MacOSX.platform/Developer;" ${worksrcpath}/config.py
     } else {
-        reinplace "s;@developer_dir@;${developer_dir};" ${portpath}/files/patch-config.py.diff
+        reinplace "s;@developer_dir@;${developer_dir};" ${worksrcpath}/config.py
     }
 }
 
@@ -64,9 +59,8 @@
         CXX=${configure.cxx} \
         CPP=${configure.cpp}
     destroot.env-append	CC=${configure.cc} \
-            CXX=${configure.cxx} \
-            CPP=${configure.cpp}
-    patchfiles		patch-config.py.diff
+        CXX=${configure.cxx} \
+        CPP=${configure.cpp}
 }
 
 if {$subport != $name} {

Modified: trunk/dports/python/py-wxpython/files/patch-config.py.diff
===================================================================
--- trunk/dports/python/py-wxpython/files/patch-config.py.diff	2012-04-11 08:55:05 UTC (rev 91813)
+++ trunk/dports/python/py-wxpython/files/patch-config.py.diff	2012-04-11 10:41:48 UTC (rev 91814)
@@ -1,4 +1,4 @@
---- config.py~	2012-04-08 18:41:21.000000000 +0300
+--- config.py	2012-04-08 18:41:21.000000000 +0300
 +++ config.py	2012-04-08 18:44:32.000000000 +0300
 @@ -1031,19 +1031,8 @@
          GENDIR = 'mac'
@@ -18,7 +18,7 @@
 -            os.environ["CC"]  = "gcc-4.0"
 -            os.environ["CPP"] = "cpp-4.0"
 +        cflags.append("-isysroot")
-+        cflags.append("/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk")
++        cflags.append("@developer_dir@/SDKs/MacOSX10.6.sdk")
  
      else:
          # Set flags for other Unix type platforms

Deleted: trunk/dports/python/py-wxpython/files/patch-config.py.diff.in
===================================================================
--- trunk/dports/python/py-wxpython/files/patch-config.py.diff.in	2012-04-11 08:55:05 UTC (rev 91813)
+++ trunk/dports/python/py-wxpython/files/patch-config.py.diff.in	2012-04-11 10:41:48 UTC (rev 91814)
@@ -1,24 +0,0 @@
---- config.py~	2012-04-08 18:41:21.000000000 +0300
-+++ config.py	2012-04-08 18:44:32.000000000 +0300
-@@ -1031,19 +1031,8 @@
-         GENDIR = 'mac'
-         libs = ['stdc++']
-         NO_SCRIPTS = 1
--        if not ARCH == "":
--            cflags.append("-arch")
--            cflags.append(ARCH)
--            lflags.append("-arch")
--            lflags.append(ARCH)
--            #if ARCH == "ppc":
--            #    cflags.append("-isysroot")
--            #    cflags.append("/Developer/SDKs/MacOSX10.3.9.sdk")
--
--        if not os.environ.get('CC') or not os.environ.get('CXX'):
--            os.environ["CXX"] = "g++-4.0"
--            os.environ["CC"]  = "gcc-4.0"
--            os.environ["CPP"] = "cpp-4.0"
-+        cflags.append("-isysroot")
-+        cflags.append("@developer_dir@/SDKs/MacOSX10.6.sdk")
- 
-     else:
-         # Set flags for other Unix type platforms
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120411/0a7e0fdf/attachment.html>


More information about the macports-changes mailing list