Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Jun 2015 11:12:30 +0000 (UTC)
From:      Kubilay Kocak <koobs@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r389265 - in head/databases/pyspatialite: . files
Message-ID:  <201506121112.t5CBCUbx027618@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: koobs
Date: Fri Jun 12 11:12:29 2015
New Revision: 389265
URL: https://svnweb.freebsd.org/changeset/ports/389265

Log:
  database/pyspatialite: Modernize before setuptools update
  
  Modernize in preparation for a pending setuptools update which
  identified this port as failing during an exp-run [1].
  
  - Use canonical CHEESESHOP master site
  - Use autoplist & concurrent
  - Remove pkg-plist accordingly
  - Remove PYDISTUTILS_PKGNAME and WRKSRC overrides
  - Stop package from adding empty directory to --record (and therefore
    pkg-plist) output
  
  While I'm here:
  
  - Add LICENSE and LICENSE_FILE
  - Strip shared library
  - Re-patch patches according to makepatch
  - Remove spurious whitespace
  
  [1] https://reviews.freebsd.org/D2704
  
  Approved by:	python, portmgr (exp-run)

Deleted:
  head/databases/pyspatialite/pkg-plist
Modified:
  head/databases/pyspatialite/Makefile
  head/databases/pyspatialite/files/patch-setup.cfg
  head/databases/pyspatialite/files/patch-setup.py
  head/databases/pyspatialite/files/patch-src-connection.h

Modified: head/databases/pyspatialite/Makefile
==============================================================================
--- head/databases/pyspatialite/Makefile	Fri Jun 12 10:28:36 2015	(r389264)
+++ head/databases/pyspatialite/Makefile	Fri Jun 12 11:12:29 2015	(r389265)
@@ -3,26 +3,27 @@
 
 PORTNAME=	pyspatialite
 PORTVERSION=	3.0.1
-PORTREVISION=	5
+PORTREVISION=	6
 CATEGORIES=	databases python
-MASTER_SITES=	CHEESESHOP/source/p/${PORTNAME}
+MASTER_SITES=	CHEESESHOP
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
 DISTNAME=	${PORTNAME}-${PORTVERSION}-alpha-0
 
 MAINTAINER=	coder@tuxfamily.org
 COMMENT=	DB-API 2.0 interface for SQLite 3.x with Spatialite
 
+LICENSE=	ZLIB
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
 LIB_DEPENDS=	libspatialite.so:${PORTSDIR}/databases/spatialite \
 		libgeos_c.so:${PORTSDIR}/graphics/geos \
 		libproj.so:${PORTSDIR}/graphics/proj \
 		libfreexl.so:${PORTSDIR}/textproc/freexl
-		
 
-WRKSRC=	${WRKDIR}/${PORTNAME}-${PORTVERSION}-alpha-0
+OPTIONS_DEFINE=	DOCS
 
 USES=		iconv python
-USE_PYTHON=	distutils
-PYDISTUTILS_PKGNAME=	pyspatialite
+USE_PYTHON=	autoplist concurrent distutils
 
 .include <bsd.port.pre.mk>
 
@@ -33,7 +34,11 @@ ICONV_APPEND=	,iconv
 .endif
 
 post-patch:
-	@${REINPLACE_CMD} -e "s|pyspatialite-doc|${DOCSDIR}|g" ${WRKSRC}/setup.py 
+	@${REINPLACE_CMD} -e "s|pyspatialite-doc|${DOCSDIR}|g" ${WRKSRC}/setup.py
 	@${REINPLACE_CMD} -e "s|%%LOCALBASE%%|${LOCALBASE}|g" \
 		-e "s|%%ICONV%%|${ICONV_APPEND}|" ${WRKSRC}/setup.cfg
+
+post-install:
+	${STRIP_CMD} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/pyspatialite/_spatialite.so
+
 .include <bsd.port.post.mk>

Modified: head/databases/pyspatialite/files/patch-setup.cfg
==============================================================================
--- head/databases/pyspatialite/files/patch-setup.cfg	Fri Jun 12 10:28:36 2015	(r389264)
+++ head/databases/pyspatialite/files/patch-setup.cfg	Fri Jun 12 11:12:29 2015	(r389265)
@@ -1,11 +1,11 @@
---- setup.cfg.orig	2014-12-30 18:37:55.696294687 +0100
-+++ setup.cfg	2014-12-30 18:37:30.988798563 +0100
-@@ -2,3 +2,8 @@
+--- setup.cfg.orig	2013-11-22 19:21:43 UTC
++++ setup.cfg
+@@ -2,4 +2,9 @@
  tag_build = 
  tag_date = 0
  tag_svn_revision = 0
 +[build_ext]
 +libraries = spatialite,geos,geos_c,proj%%ICONV%%
-+library-dirs = %%LOCALBASE%%/lib/
-+include-dirs = %%LOCALBASE%%/include/
-+with-freexl = True
++library-dirs = %%LOCALBASE%%/lib
++include-dirs = %%LOCALBASE/include
++with-freexl = True 

Modified: head/databases/pyspatialite/files/patch-setup.py
==============================================================================
--- head/databases/pyspatialite/files/patch-setup.py	Fri Jun 12 10:28:36 2015	(r389264)
+++ head/databases/pyspatialite/files/patch-setup.py	Fri Jun 12 11:12:29 2015	(r389265)
@@ -1,37 +1,46 @@
---- setup.py.orig	2014-12-30 18:38:25.823292562 +0100
-+++ setup.py	2014-12-30 18:39:43.418635165 +0100
-@@ -65,7 +65,7 @@
+--- setup.py.orig	2013-11-22 19:17:22 UTC
++++ setup.py
+@@ -65,8 +65,6 @@ class DocBuilder(Command):
          if rc != 0:
              print "Is sphinx installed? If not, try 'sudo easy_install sphinx'."
  
 -AMALGAMATION_ROOT = "amalgamation/libspatialite-amalgamation-3.0.1"
-+#AMALGAMATION_ROOT = "amalgamation/libspatialite-amalgamation-3.0.1"
- 
+-
  TRUTHY = ("yes", "true", "t", "1")
  
-@@ -258,12 +258,12 @@
-                         "src/prepare_protocol.c",
+ class HeaderNotFoundException(Exception):
+@@ -220,12 +218,11 @@ def get_setup_args():
+         print "Fatal error: PYSPATIALITE_VERSION could not be detected!"
+         sys.exit(1)
+ 
+-    data_files = [("pyspatialite-doc",
++    data_files = [("/usr/local/share/doc/pyspatialite",
+                         glob.glob("doc/*.html") \
+                       + glob.glob("doc/*.txt") \
+                       + glob.glob("doc/*.css")),
+-                   ("pyspatialite-doc/code",
+-                        glob.glob("doc/code/*.py"))]
++                 ]
+ 
+     py_modules = ["spatialite"]
+     setup_args = dict(
+@@ -259,11 +256,8 @@ def get_setup_args():
                          "src/statement.c",
                          "src/util.c",
--                        "src/row.c",
+                         "src/row.c",
 -                        os.path.join(AMALGAMATION_ROOT, "sqlite3.c"),
 -                        os.path.join(AMALGAMATION_ROOT, "spatialite.c")
-+                        "src/row.c"
-+#                        os.path.join(AMALGAMATION_ROOT, "sqlite3.c"),
-+#                        os.path.join(AMALGAMATION_ROOT, "spatialite.c")
                      ],
                      include_dirs = [
 -                        os.path.join(AMALGAMATION_ROOT,"headers")
-+#                        os.path.join(AMALGAMATION_ROOT,"headers")
                      ],
                      library_dirs = [],
                      runtime_library_dirs = [],
-@@ -272,7 +272,7 @@
+@@ -272,7 +266,6 @@ def get_setup_args():
                          ("VERSION",'"%s"' % PYSPATIALITE_VERSION),
                          ("SQLITE_ENABLE_RTREE", "1"),   # build with fulltext search enabled
                          ("NDEBUG","1"),
 -                        ("SPL_AMALGAMATION","1"),
-+#                        ("SPL_AMALGAMATION","1"),
                          ('MODULE_NAME', '\\"spatialite.dbapi2\\"') if sys.platform == "win32" else ('MODULE_NAME', '"spatialite.dbapi2"')
                      ],
                  )

Modified: head/databases/pyspatialite/files/patch-src-connection.h
==============================================================================
--- head/databases/pyspatialite/files/patch-src-connection.h	Fri Jun 12 10:28:36 2015	(r389264)
+++ head/databases/pyspatialite/files/patch-src-connection.h	Fri Jun 12 11:12:29 2015	(r389265)
@@ -1,5 +1,5 @@
---- src/connection.h.orig	2014-12-30 18:40:27.628284595 +0100
-+++ src/connection.h	2014-12-30 18:40:37.947283409 +0100
+--- src/connection.h.orig	2013-11-22 09:33:35 UTC
++++ src/connection.h
 @@ -30,7 +30,7 @@
  #include "cache.h"
  #include "module.h"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201506121112.t5CBCUbx027618>