[69875] trunk/dports/python/py-ctypes

ryandesign at macports.org ryandesign at macports.org
Mon Jul 19 11:34:43 PDT 2010


Revision: 69875
          http://trac.macports.org/changeset/69875
Author:   ryandesign at macports.org
Date:     2010-07-19 11:34:39 -0700 (Mon, 19 Jul 2010)
Log Message:
-----------
py-ctypes: fix compile failures on Snow Leopard (#25148, #22418)

Modified Paths:
--------------
    trunk/dports/python/py-ctypes/Portfile

Added Paths:
-----------
    trunk/dports/python/py-ctypes/files/
    trunk/dports/python/py-ctypes/files/patch-setup.py.diff

Modified: trunk/dports/python/py-ctypes/Portfile
===================================================================
--- trunk/dports/python/py-ctypes/Portfile	2010-07-19 16:42:51 UTC (rev 69874)
+++ trunk/dports/python/py-ctypes/Portfile	2010-07-19 18:34:39 UTC (rev 69875)
@@ -5,6 +5,7 @@
 
 name			py-ctypes
 version			1.0.2
+revision		1
 categories		python
 platforms		darwin
 maintainers		nomaintainer
@@ -23,10 +24,18 @@
 
 distname		ctypes-${version}
 
+depends_build-append	port:pkgconfig
+
 depends_lib-append	port:libffi
 
-build.env	CC=${configure.cc} CPP=${configure.cpp}
+patchfiles		patch-setup.py.diff
 
+build.env		CC=${configure.cc} CPP=${configure.cpp} CFLAGS="-D_DARWIN_C_SOURCE"
+
+pre-build {
+	build.env-append	CPPFLAGS="[exec ${prefix}/bin/pkg-config libffi --cflags]"
+}
+
 test.run		yes
 test.cmd		${build.cmd}
 test.target		test

Added: trunk/dports/python/py-ctypes/files/patch-setup.py.diff
===================================================================
--- trunk/dports/python/py-ctypes/files/patch-setup.py.diff	                        (rev 0)
+++ trunk/dports/python/py-ctypes/files/patch-setup.py.diff	2010-07-19 18:34:39 UTC (rev 69875)
@@ -0,0 +1,11 @@
+--- setup.py.orig	2007-05-15 12:53:16.000000000 -0500
++++ setup.py	2010-06-27 18:11:26.000000000 -0500
+@@ -125,8 +125,6 @@
+ 
+     # First configure a libffi library, then build the _ctypes extension.
+     def build_extensions(self):
+-        self.configure_libffi()
+-
+         # Add .S (preprocessed assembly) to C compiler source extensions.
+         self.compiler.src_extensions.append('.S')
+         if sys.platform == "win32":
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100719/ac9fa7e4/attachment.html>


More information about the macports-changes mailing list