View | Details | Raw Unified | Return to bug 196387
Collapse All | Expand All

(-)Makefile (-14 / +15 lines)
Lines 3-26 Link Here
3
3
4
PORTNAME=	pyspatialite
4
PORTNAME=	pyspatialite
5
PORTVERSION=	3.0.1
5
PORTVERSION=	3.0.1
6
PORTREVISION=	4
6
PORTREVISION=	5
7
CATEGORIES=	databases python
7
CATEGORIES=	databases python
8
MASTER_SITES=	CHEESESHOP:pyspatialite \
8
MASTER_SITES=	CHEESESHOP:pyspatialite
9
		http://www.gaia-gis.it/gaia-sins/libspatialite-sources/:amalgam
10
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
9
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
11
DISTFILES=	${DISTNAME}${EXTRACT_SUFX}:pyspatialite \
10
DISTFILES=	${PORTNAME}-${PORTVERSION}-alpha-0${EXTRACT_SUFX}:pyspatialite
12
		${AMALGAMATION_NAME}${EXTRACT_SUFX}:amalgam
13
11
14
MAINTAINER=	coder@tuxfamily.org
12
MAINTAINER=	coder@tuxfamily.org
15
COMMENT=	DB-API 2.0 interface for SQLite 3.x with Spatialite 3.x
13
COMMENT=	DB-API 2.0 interface for SQLite 3.x with Spatialite
16
14
17
LIB_DEPENDS=	libspatialite.so:${PORTSDIR}/databases/spatialite
15
LIB_DEPENDS=	libspatialite.so:${PORTSDIR}/databases/spatialite \
16
		libgeos_c.so:${PORTSDIR}/graphics/geos \
17
		libproj.so:${PORTSDIR}/graphics/proj \
18
		libfreexl.so:${PORTSDIR}/textproc/freexl
19
		
18
20
21
WRKSRC=	${WRKDIR}/${PORTNAME}-${PORTVERSION}-alpha-0
22
19
USES=		iconv python
23
USES=		iconv python
20
USE_PYTHON=	distutils
24
USE_PYTHON=	distutils
21
PYDISTUTILS_PKGNAME=	pyspatialite
25
PYDISTUTILS_PKGNAME=	pyspatialite
22
26
23
AMALGAMATION_NAME=	libspatialite-amalgamation-${PORTVERSION}
24
27
25
.include <bsd.port.pre.mk>
28
.include <bsd.port.pre.mk>
26
29
Lines 27-39 Link Here
27
.if empty(ICONV_LIB)
30
.if empty(ICONV_LIB)
28
ICONV_APPEND=
31
ICONV_APPEND=
29
.else
32
.else
30
ICONV_APPEND=	,'iconv'
33
ICONV_APPEND=	,iconv
31
.endif
34
.endif
32
35
33
post-patch:
36
post-patch:
34
	@${REINPLACE_CMD} -e "s|pyspatialite-doc|${DOCSDIR}|g" \
37
	@${REINPLACE_CMD} -e "s|pyspatialite-doc|${DOCSDIR}|g" ${WRKSRC}/setup.py 
35
		-e "s|%%LOCALBASE%%|${LOCALBASE}|g" \
38
	@${REINPLACE_CMD} -e "s|%%LOCALBASE%%|${LOCALBASE}|g" \
36
		-e "s|%%ICONV%%|${ICONV_APPEND}|" ${WRKSRC}/setup.py
39
		-e "s|%%ICONV%%|${ICONV_APPEND}|" ${WRKSRC}/setup.cfg
37
	@${MV} ${WRKDIR}/${AMALGAMATION_NAME} ${WRKSRC}/amalgamation
38
39
.include <bsd.port.post.mk>
40
.include <bsd.port.post.mk>
(-)distinfo (-4 / +2 lines)
Lines 1-4 Link Here
1
SHA256 (pyspatialite-3.0.1.tar.gz) = 81a3e4966fb6348802a985486cbf62e019a0fcb0a1e006b9522e8b02dc08f238
1
SHA256 (pyspatialite-3.0.1-alpha-0.tar.gz) = f7e135cd5e592b3a0d6627863b46442cb4407ab5a05c6004e73453e078274478
2
SIZE (pyspatialite-3.0.1.tar.gz) = 75099
2
SIZE (pyspatialite-3.0.1-alpha-0.tar.gz) = 2562257
3
SHA256 (libspatialite-amalgamation-3.0.1.tar.gz) = 51f08c6c9180b1f8979d0469960a5c20a79a574c08fe032ae292042245ad46b6
4
SIZE (libspatialite-amalgamation-3.0.1.tar.gz) = 2485779
(-)files/patch-setup.cfg (+11 lines)
Line 0 Link Here
1
--- setup.cfg.orig	2014-12-30 18:37:55.696294687 +0100
2
+++ setup.cfg	2014-12-30 18:37:30.988798563 +0100
3
@@ -2,3 +2,8 @@
4
 tag_build = 
5
 tag_date = 0
6
 tag_svn_revision = 0
7
+[build_ext]
8
+libraries = spatialite,geos,geos_c,proj%%ICONV%%
9
+library-dirs = %%LOCALBASE%%/lib/
10
+include-dirs = %%LOCALBASE%%/include/
11
+with-freexl = True
(-)files/patch-setup.py (-82 / +34 lines)
Lines 1-85 Link Here
1
--- setup.py.orig	2012-01-11 23:54:57.000000000 +0100
1
--- setup.py.orig	2014-12-30 18:38:25.823292562 +0100
2
+++ setup.py	2013-03-24 09:52:46.000000000 +0100
2
+++ setup.py	2014-12-30 18:39:43.418635165 +0100
3
@@ -44,7 +44,7 @@
3
@@ -65,7 +65,7 @@
4
         if rc != 0:
5
             print "Is sphinx installed? If not, try 'sudo easy_install sphinx'."
4
 
6
 
5
 include_dirs = []
7
-AMALGAMATION_ROOT = "amalgamation/libspatialite-amalgamation-3.0.1"
6
 library_dirs = []
8
+#AMALGAMATION_ROOT = "amalgamation/libspatialite-amalgamation-3.0.1"
7
-libraries = ['geos','geos_c','proj']
8
+libraries = ['geos','geos_c','proj'%%ICONV%%]
9
 runtime_library_dirs = []
10
 extra_objects = []
11
 define_macros = []
12
@@ -86,29 +86,30 @@
13
 
9
 
14
 def get_amalgamation():
10
 TRUTHY = ("yes", "true", "t", "1")
15
     """Download the Spatialite amalgamation if it isn't there, already."""
16
-    if os.path.exists(AMALGAMATION_ROOT):
17
-        return
18
-    os.mkdir(AMALGAMATION_ROOT)
19
-    print "Downloading amalgation."
20
-
21
-    # find out what's current amalgamation ZIP file
22
-    download_page = urllib.urlopen("https://www.gaia-gis.it/fossil/libspatialite/index").read()
23
-    pattern = re.compile("(libspatialite-amalgamation.*?\.zip)")
24
-    download_file = pattern.findall(download_page)[0]
25
-    amalgamation_url = "http://www.gaia-gis.it/gaia-sins/" + download_file
26
-    zip_dir = string.replace(download_file,'.zip','')
27
-    # and download it
28
-    urllib.urlretrieve(amalgamation_url, "tmp.zip")
29
-
30
-    zf = zipfile.ZipFile("tmp.zip")
31
-    files = ["sqlite3.c", "headers/spatialite/sqlite3.h", "spatialite.c", "headers/spatialite/sqlite3ext.h","headers/spatialite/spatialite.h","headers/spatialite/gaiaaux.h","headers/spatialite/gaiaexif.h","headers/spatialite/gaiageo.h"]
32
-    for fn in files:
33
-        print "Extracting", fn
34
-        outf = open(AMALGAMATION_ROOT + os.sep + string.split(fn,'/')[-1], "wb")
35
-        outf.write(zf.read(zip_dir + '/' + fn))
36
-        outf.close()
37
-    zf.close()
38
-    os.unlink("tmp.zip")
39
+#   into ${FILESDIR} for FreeBSD
40
+#    if os.path.exists(AMALGAMATION_ROOT):
41
+#        return
42
+#    os.mkdir(AMALGAMATION_ROOT)
43
+#    print "Downloading amalgation."
44
+#
45
+#    # find out what's current amalgamation ZIP file
46
+#    download_page = urllib.urlopen("http://www.gaia-gis.it/gaia-sins/libspatialite-sources/").read()
47
+#    pattern = re.compile("(libspatialite-amalgamation.*?\.zip)")
48
+#    download_file = pattern.findall(download_page)[-1]
49
+#    amalgamation_url = "http://www.gaia-gis.it/gaia-sins/libspatialite-sources/" + download_file
50
+#    zip_dir = string.replace(download_file,'.zip','')
51
+#    # and download it
52
+#    urllib.urlretrieve(amalgamation_url, "tmp.zip")
53
+#
54
+#    zf = zipfile.ZipFile("tmp.zip")
55
+#    files = ["sqlite3.c", "headers/spatialite/sqlite3.h", "spatialite.c", "headers/spatialite/sqlite3ext.h","headers/spatialite/spatialite.h","headers/spatialite/gaiaaux.h","headers/spatialite/gaiaexif.h","headers/spatialite/gaiageo.h"]
56
+#    for fn in files:
57
+#        print "Extracting", fn
58
+#        outf = open(AMALGAMATION_ROOT + os.sep + string.split(fn,'/')[-1], "wb")
59
+#        outf.write(zf.read(zip_dir + '/' + fn))
60
+#        outf.close()
61
+#    zf.close()
62
+#    os.unlink("tmp.zip")
63
 
11
 
64
 class MyBuildExt(build_ext):
12
@@ -258,12 +258,12 @@
65
 
13
                         "src/prepare_protocol.c",
66
@@ -119,8 +120,10 @@
14
                         "src/statement.c",
67
           ext.libraries.append("iconv")
15
                         "src/util.c",
68
 
16
-                        "src/row.c",
69
         #Default locations for Mac
17
-                        os.path.join(AMALGAMATION_ROOT, "sqlite3.c"),
70
+        ext.include_dirs.append("%%LOCALBASE%%/include/")
18
-                        os.path.join(AMALGAMATION_ROOT, "spatialite.c")
71
         ext.include_dirs.append("/Library/Frameworks/GEOS.framework/unix/include/")
19
+                        "src/row.c"
72
         ext.include_dirs.append("/Library/Frameworks/PROJ.framework/unix/include/")
20
+#                        os.path.join(AMALGAMATION_ROOT, "sqlite3.c"),
73
+        ext.library_dirs.append("%%LOCALBASE%%/lib")
21
+#                        os.path.join(AMALGAMATION_ROOT, "spatialite.c")
74
         ext.library_dirs.append("/Library/Frameworks/GEOS.framework/unix/lib")
22
                     ],
75
         ext.library_dirs.append("/Library/Frameworks/PROJ.framework/unix/lib")
23
                     include_dirs = [
76
 
24
-                        os.path.join(AMALGAMATION_ROOT,"headers")
77
@@ -132,7 +135,7 @@
25
+#                        os.path.join(AMALGAMATION_ROOT,"headers")
78
         ext.sources.append(os.path.join(AMALGAMATION_ROOT, "spatialite.c"))
26
                     ],
79
         ext.include_dirs.append(AMALGAMATION_ROOT)
27
                     library_dirs = [],
80
         build_ext.build_extension(self, ext)
28
                     runtime_library_dirs = [],
81
-        
29
@@ -272,7 +272,7 @@
82
+
30
                         ("VERSION",'"%s"' % PYSPATIALITE_VERSION),
83
 
31
                         ("SQLITE_ENABLE_RTREE", "1"),   # build with fulltext search enabled
84
 #    def __setattr__(self, k, v):
32
                         ("NDEBUG","1"),
85
 #        # Make sure we don't link against the SQLite library, no matter what setup.cfg says
33
-                        ("SPL_AMALGAMATION","1"),
34
+#                        ("SPL_AMALGAMATION","1"),
35
                         ('MODULE_NAME', '\\"spatialite.dbapi2\\"') if sys.platform == "win32" else ('MODULE_NAME', '"spatialite.dbapi2"')
36
                     ],
37
                 )
(-)files/patch-src-connection.h (-9 / +9 lines)
Lines 1-11 Link Here
1
--- src/connection.h.bak	2012-10-25 19:40:06.000000000 +0200
1
--- src/connection.h.orig	2014-12-30 18:40:27.628284595 +0100
2
+++ src/connection.h	2012-10-25 19:40:25.000000000 +0200
2
+++ src/connection.h	2014-12-30 18:40:37.947283409 +0100
3
@@ -33,8 +33,6 @@
3
@@ -30,7 +30,7 @@
4
 #include "sqlite3.h"
4
 #include "cache.h"
5
 #include "module.h"
6
 
7
-#include "spatialite/sqlite3.h"
8
+#include "spatialite/sqlite.h"
5
 #include "spatialite.h"
9
 #include "spatialite.h"
6
 
10
 
7
-int spatialite_init(int verbose);
11
 SPATIALITE_DECLARE void spatialite_init(int verbose);
8
-
9
 typedef struct
10
 {
11
     PyObject_HEAD
(-)pkg-plist (-37 / +8 lines)
Lines 1-3 Link Here
1
%%PYTHON_SITELIBDIR%%/pyspatialite-3.0.1_alpha_0-py%%PYTHON_VER%%.egg-info/PKG-INFO
2
%%PYTHON_SITELIBDIR%%/pyspatialite-3.0.1_alpha_0-py%%PYTHON_VER%%.egg-info/SOURCES.txt
3
%%PYTHON_SITELIBDIR%%/pyspatialite-3.0.1_alpha_0-py%%PYTHON_VER%%.egg-info/dependency_links.txt
4
%%PYTHON_SITELIBDIR%%/pyspatialite-3.0.1_alpha_0-py%%PYTHON_VER%%.egg-info/top_level.txt
1
%%PYTHON_SITELIBDIR%%/pyspatialite/__init__.py
5
%%PYTHON_SITELIBDIR%%/pyspatialite/__init__.py
2
%%PYTHON_SITELIBDIR%%/pyspatialite/__init__.pyc
6
%%PYTHON_SITELIBDIR%%/pyspatialite/__init__.pyc
3
%%PYTHON_SITELIBDIR%%/pyspatialite/__init__.pyo
7
%%PYTHON_SITELIBDIR%%/pyspatialite/__init__.pyo
Lines 8-47 Link Here
8
%%PYTHON_SITELIBDIR%%/pyspatialite/dump.py
12
%%PYTHON_SITELIBDIR%%/pyspatialite/dump.py
9
%%PYTHON_SITELIBDIR%%/pyspatialite/dump.pyc
13
%%PYTHON_SITELIBDIR%%/pyspatialite/dump.pyc
10
%%PYTHON_SITELIBDIR%%/pyspatialite/dump.pyo
14
%%PYTHON_SITELIBDIR%%/pyspatialite/dump.pyo
11
%%PYTHON_SITELIBDIR%%/pyspatialite/test/__init__.py
15
%%PORTDOCS%%%%DOCSDIR%%/default.css
12
%%PYTHON_SITELIBDIR%%/pyspatialite/test/__init__.pyc
16
%%PORTDOCS%%%%DOCSDIR%%/docutils.css
13
%%PYTHON_SITELIBDIR%%/pyspatialite/test/__init__.pyo
17
%%PORTDOCS%%%%DOCSDIR%%/install-source.txt
14
%%PYTHON_SITELIBDIR%%/pyspatialite/test/dbapi.py
18
%%PORTDOCS%%@dir %%DOCSDIR%%/code
15
%%PYTHON_SITELIBDIR%%/pyspatialite/test/dbapi.pyc
16
%%PYTHON_SITELIBDIR%%/pyspatialite/test/dbapi.pyo
17
%%PYTHON_SITELIBDIR%%/pyspatialite/test/dump.py
18
%%PYTHON_SITELIBDIR%%/pyspatialite/test/dump.pyc
19
%%PYTHON_SITELIBDIR%%/pyspatialite/test/dump.pyo
20
%%PYTHON_SITELIBDIR%%/pyspatialite/test/factory.py
21
%%PYTHON_SITELIBDIR%%/pyspatialite/test/factory.pyc
22
%%PYTHON_SITELIBDIR%%/pyspatialite/test/factory.pyo
23
%%PYTHON_SITELIBDIR%%/pyspatialite/test/hooks.py
24
%%PYTHON_SITELIBDIR%%/pyspatialite/test/hooks.pyc
25
%%PYTHON_SITELIBDIR%%/pyspatialite/test/hooks.pyo
26
%%PYTHON_SITELIBDIR%%/pyspatialite/test/py25/__init__.py
27
%%PYTHON_SITELIBDIR%%/pyspatialite/test/py25/__init__.pyc
28
%%PYTHON_SITELIBDIR%%/pyspatialite/test/py25/__init__.pyo
29
%%PYTHON_SITELIBDIR%%/pyspatialite/test/py25/py25tests.py
30
%%PYTHON_SITELIBDIR%%/pyspatialite/test/py25/py25tests.pyc
31
%%PYTHON_SITELIBDIR%%/pyspatialite/test/py25/py25tests.pyo
32
%%PYTHON_SITELIBDIR%%/pyspatialite/test/regression.py
33
%%PYTHON_SITELIBDIR%%/pyspatialite/test/regression.pyc
34
%%PYTHON_SITELIBDIR%%/pyspatialite/test/regression.pyo
35
%%PYTHON_SITELIBDIR%%/pyspatialite/test/spatial.py
36
%%PYTHON_SITELIBDIR%%/pyspatialite/test/spatial.pyc
37
%%PYTHON_SITELIBDIR%%/pyspatialite/test/spatial.pyo
38
%%PYTHON_SITELIBDIR%%/pyspatialite/test/transactions.py
39
%%PYTHON_SITELIBDIR%%/pyspatialite/test/transactions.pyc
40
%%PYTHON_SITELIBDIR%%/pyspatialite/test/transactions.pyo
41
%%PYTHON_SITELIBDIR%%/pyspatialite/test/types.py
42
%%PYTHON_SITELIBDIR%%/pyspatialite/test/types.pyc
43
%%PYTHON_SITELIBDIR%%/pyspatialite/test/types.pyo
44
%%PYTHON_SITELIBDIR%%/pyspatialite/test/userfunctions.py
45
%%PYTHON_SITELIBDIR%%/pyspatialite/test/userfunctions.pyc
46
%%PYTHON_SITELIBDIR%%/pyspatialite/test/userfunctions.pyo
47
%%DOCSDIR%%/install-source.txt

Return to bug 196387