[37583] trunk/dports/python
saispo at macports.org
saispo at macports.org
Sat Jun 14 02:28:03 PDT 2008
Revision: 37583
http://trac.macosforge.org/projects/macports/changeset/37583
Author: saispo at macports.org
Date: 2008-06-14 02:28:01 -0700 (Sat, 14 Jun 2008)
Log Message:
-----------
Build sip for Python 2.5
Added Paths:
-----------
trunk/dports/python/py25-sip/
trunk/dports/python/py25-sip/Portfile
trunk/dports/python/py25-sip/files/
trunk/dports/python/py25-sip/files/patch-siputils.py.diff
Added: trunk/dports/python/py25-sip/Portfile
===================================================================
--- trunk/dports/python/py25-sip/Portfile (rev 0)
+++ trunk/dports/python/py25-sip/Portfile 2008-06-14 09:28:01 UTC (rev 37583)
@@ -0,0 +1,50 @@
+# $Id: Portfile 37146 2008-05-27 19:27:23Z erickt at macports.org $
+
+PortSystem 1.0
+
+name py25-sip
+version 4.7.6
+categories python devel
+maintainers saispo at macports.org
+description create Python bindings for C and C++ libraries
+long_description SIP is a tool that makes it very easy to create \
+ Python bindings for C and C++ libraries. \
+ It was originally developed to create PyQt, \
+ the Python bindings for the Qt toolkit, \
+ but can be used to create bindings for any \
+ C or C++ library.
+
+homepage http://www.riverbankcomputing.co.uk/sip/
+master_sites http://www.riverbankcomputing.com/static/Downloads/sip4/ \
+ http://gentoo.mirrors.easynews.com/linux/gentoo/distfiles/ \
+ http://gentoo.osuosl.org/distfiles/ \
+ http://www.gtlib.gatech.edu/pub/gentoo/distfiles/
+
+distname sip-${version}
+checksums md5 f49e93046fe438a8fb4c2ed481aa3951 \
+ sha1 8ae089513744c394e502e258b428780260e39cda \
+ rmd160 bc3b9668afc9f3c4e475ccd9a89d1b270ad5d0ba
+dist_subdir python
+
+depends_lib port:python25
+
+patchfiles patch-siputils.py.diff
+
+configure.cmd ${prefix}/bin/python2.5 configure.py
+configure.pre_args -d ${prefix}/lib/python2.5/site-packages \
+ -e ${prefix}/include/python2.5 \
+ -v ${prefix}/share/sip \
+ -p macx-g++
+configure.post_args LFLAGS="-F${prefix}/Library/Frameworks -L${prefix}/lib"
+
+test.run yes
+test.cmd cd siplib && ${prefix}/bin/python2.5 -c 'import sip'
+
+post-destroot {
+ xinstall -m 755 -d ${destroot}${prefix}/share/doc
+ file copy ${worksrcpath}/doc ${destroot}${prefix}/share/doc/${name}
+ xinstall -m 644 -W ${worksrcpath} LICENSE NEWS README TODO \
+ ${destroot}${prefix}/share/doc/${name}
+ system "${prefix}/bin/python2.5 ${prefix}/lib/python2.5/compileall.py ${destroot}${prefix}"
+ system "${prefix}/bin/python2.5 -O ${prefix}/lib/python2.5/compileall.py ${destroot}${prefix}"
+}
Added: trunk/dports/python/py25-sip/files/patch-siputils.py.diff
===================================================================
--- trunk/dports/python/py25-sip/files/patch-siputils.py.diff (rev 0)
+++ trunk/dports/python/py25-sip/files/patch-siputils.py.diff 2008-06-14 09:28:01 UTC (rev 37583)
@@ -0,0 +1,19 @@
+--- siputils.py.org.py 2006-11-04 14:09:43.000000000 -0800
++++ siputils.py 2006-11-06 20:23:11.000000000 -0800
+@@ -1302,11 +1302,11 @@
+ # This allows Apple's Python to be used even if a later python.org
+ # version is also installed.
+ dl = string.split(sys.exec_prefix, os.sep)
+- try:
+- dl = dl[:dl.index("Python.framework")]
+- except ValueError:
+- error("SIP requires Python to be built as a framework")
+- self.LFLAGS.append("-F%s" % string.join(dl, os.sep))
++ # try:
++ # dl = dl[:dl.index("Python.framework")]
++ # except ValueError:
++ # error("SIP requires Python to be built as a framework")
++ # self.LFLAGS.append("-F%s" % string.join(dl, os.sep))
+ self.LFLAGS.append("-framework Python")
+
+ Makefile.finalise(self)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080614/8c8645f3/attachment.htm
More information about the macports-changes
mailing list