[62007] trunk/dports/python
stromnov at macports.org
stromnov at macports.org
Sun Dec 27 10:17:46 PST 2009
Revision: 62007
http://trac.macports.org/changeset/62007
Author: stromnov at macports.org
Date: 2009-12-27 10:17:42 -0800 (Sun, 27 Dec 2009)
Log Message:
-----------
py26-rtree: New port.
Added Paths:
-----------
trunk/dports/python/py26-rtree/
trunk/dports/python/py26-rtree/Portfile
trunk/dports/python/py26-rtree/files/
trunk/dports/python/py26-rtree/files/patch-rtree_core.py.diff
trunk/dports/python/py26-rtree/files/patch-setup.cfg.diff
Added: trunk/dports/python/py26-rtree/Portfile
===================================================================
--- trunk/dports/python/py26-rtree/Portfile (rev 0)
+++ trunk/dports/python/py26-rtree/Portfile 2009-12-27 18:17:42 UTC (rev 62007)
@@ -0,0 +1,39 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
+# $Id$
+
+PortSystem 1.0
+PortGroup python26 1.0
+
+name py26-rtree
+version 0.5.0
+categories python devel
+platforms darwin
+maintainers stromnov openmaintainer
+
+description R-Tree spatial index for Python GIS
+
+long_description Rtree is a Python library that uses ctypes and an \
+ internally built C API to wrap libspatialindex and \
+ provide very flexible spatial indexing.
+
+homepage http://trac.gispython.org/lab/wiki/Rtree
+master_sites http://pypi.python.org/packages/source/R/Rtree/
+distname Rtree-${version}
+
+depends_lib-append port:spatialindex \
+ port:py26-setuptools
+
+checksums md5 fc9a23178bb031923a83fe213e6fdb25 \
+ sha1 79dbbdab0a8455d8940efb0df643d943a06227e6 \
+ rmd160 b056b105b61bb9bad1c4376fd13421c4a4ffc325
+
+patchfiles patch-setup.cfg.diff \
+ patch-rtree_core.py.diff
+
+post-patch {
+ reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/setup.cfg
+}
+
+livecheck.type regex
+livecheck.url ${master_sites}
+livecheck.regex "Rtree-(\\d+(?:\\.\\d+)*)${extract.suffix}"
Property changes on: trunk/dports/python/py26-rtree/Portfile
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Added: trunk/dports/python/py26-rtree/files/patch-rtree_core.py.diff
===================================================================
--- trunk/dports/python/py26-rtree/files/patch-rtree_core.py.diff (rev 0)
+++ trunk/dports/python/py26-rtree/files/patch-rtree_core.py.diff 2009-12-27 18:17:42 UTC (rev 62007)
@@ -0,0 +1,19 @@
+--- rtree/core.py.orig 2009-08-04 21:42:57.000000000 +0400
++++ rtree/core.py 2009-12-26 11:07:14.000000000 +0300
+@@ -92,9 +92,15 @@
+ lib_name = 'libsidx.so'
+ if platform == 'Darwin':
+ free = ctypes.CDLL(find_library('libc')).free
++ lib_name_darwin = os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', lib_name))
++ if os.path.exists(lib_name_darwin):
++ try:
++ rt = ctypes.CDLL(lib_name_darwin)
++ except OSError:
++ rt = ctypes.CDLL(lib_name)
+ else:
+ free = ctypes.CDLL(find_library('libc.so.6')).free
+- rt = ctypes.CDLL(lib_name)
++ rt = ctypes.CDLL(lib_name)
+ else:
+ raise RTreeError('Unsupported OS "%s"' % os.name)
+
Added: trunk/dports/python/py26-rtree/files/patch-setup.cfg.diff
===================================================================
--- trunk/dports/python/py26-rtree/files/patch-setup.cfg.diff (rev 0)
+++ trunk/dports/python/py26-rtree/files/patch-setup.cfg.diff 2009-12-27 18:17:42 UTC (rev 62007)
@@ -0,0 +1,12 @@
+--- setup.cfg.orig 2009-12-25 18:56:46.000000000 +0300
++++ setup.cfg 2009-12-25 18:57:28.000000000 +0300
+@@ -4,7 +4,7 @@
+ tag_svn_revision = 0
+
+ [build_ext]
+-include-dirs = /usr/local/include:/usr/local/include/spatialindex
+-library-dirs = /usr/local/lib
++include-dirs = @@PREFIX@@/include:@@PREFIX@@/include/spatialindex
++library-dirs = @@PREFIX@@/lib
+ define =
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20091227/20fa6443/attachment.html>
More information about the macports-changes
mailing list