Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Dec 2012 22:08:17 GMT
From:      Matthew Trisoline <matt.trisoline@intermedix.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/174620: Upgraded Port databases/postgis Adds support for geographic objects to PostgreSQL
Message-ID:  <201212212208.qBLM8H7C027340@red.freebsd.org>
Resent-Message-ID: <201212212210.qBLMA1ZX069661@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         174620
>Category:       ports
>Synopsis:       Upgraded Port  databases/postgis Adds support for geographic objects to PostgreSQL
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Dec 21 22:10:01 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Matthew Trisoline
>Release:        9.0
>Organization:
Intermedix
>Environment:
FreeBSD trisoline-freebsd-kvm-test 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan  3 07:46:30 UTC 2012     root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
Upgraded port to use postgis version 2.0.2 to work with postgresql version 9.2
>How-To-Repeat:
N/A
>Fix:
Use the attached patch.

Patch attached with submission follows:

diff -u postgis/Makefile postgis.orig/Makefile
--- postgis/Makefile	2012-12-21 21:52:52.000000000 -0500
+++ postgis.orig/Makefile	2012-11-17 00:55:20.000000000 -0500
@@ -1,34 +1,85 @@
-# $FreeBSD$
+# New ports collection makefile for:	PostGIS
+# Date created:		June 09, 2004
+# Whom:			Anderson Soares Ferreira <anderson@cnpm.embrapa.br>
+#
+# $FreeBSD: ports/databases/postgis/Makefile,v 1.66 2012/11/17 05:55:20 svnexp Exp $
+#
 
 PORTNAME=	postgis
-PORTVERSION=	2.0.2
-PORTREVISION=	
+PORTVERSION=	1.5.3
+PORTREVISION=	2
 CATEGORIES=	databases geography
-MASTER_SITES=	http://download.osgeo.org/postgis/source/
+MASTER_SITES=	http://postgis.refractions.net/download/ \
+ 		http://www.postgis.org/download/
 
-MAINTAINER=	matt.trisoline@intermedix.com
+MAINTAINER=	anderson@cnpm.embrapa.br
 COMMENT=	Adds support for geographic objects to PostgreSQL databases
 
+LIB_DEPENDS=	proj.7:${PORTSDIR}/graphics/proj \
+		geos.0:${PORTSDIR}/graphics/geos
 RUN_DEPENDS=	postmaster:${PORTSDIR}/databases/postgresql${PGSQL_VER}-server
-LIB_DEPENDS=	geos:${PORTSDIR}/graphics/geos \
-		proj:${PORTSDIR}/graphics/proj \
-		json:${PORTSDIR}/devel/json-c \
-		gdal:${PORTSDIR}/graphics/gdal
 
-USE_GNOME=	libxml2
-USE_ICONV=	yes
+USE_BISON=	build
 USE_PGSQL=	yes
+USE_GMAKE=	yes
+USE_ICONV=	yes
 USE_LDCONFIG=	yes
+USE_PERL5_BUILD=	yes
+
+OPTIONS=	LOADERGUI "Enable shp2pgsql-gui" Off
+
+.include <bsd.port.options.mk>
+
+INSTALL_TARGET=	install
+
+GNU_CONFIGURE=	yes
+.if defined(WITH_LOADERGUI)
+USE_GNOME=	libxml2 gtk20
+CONFIGURE_ARGS=	--with-projdir=${LOCALBASE} --with-gui
+PLIST_SUB+=	LOADERGUI=""
+.else
+USE_GNOME=	libxml2
+CONFIGURE_ARGS=	--with-projdir=${LOCALBASE}
+PLIST_SUB+=	LOADERGUI="@comment "
+.endif
 
 CFLAGS+=	-I${LOCALBASE}/include
 LDFLAGS+=	-L${LOCALBASE}/lib
+MAKE_ENV=	DATADIR=${DATADIR} DOCSDIR=${DOCSDIR}
+MAKE_JOBS_UNSAFE=	yes
 
-CONFIGURE_ARGS=	--with-projdir=${LOCALBASE}
+.include <bsd.port.pre.mk>
+
+.if !defined(NOPORTDOCS)
+BUILD_DEPENDS+=	xsltproc:${PORTSDIR}/textproc/libxslt \
+		${LOCALBASE}/share/xsl/docbook/html/chunk.xsl:${PORTSDIR}/textproc/docbook-xsl
+CONFIGURE_ARGS+=	--with-xsldir=${LOCALBASE}/share/xsl/docbook
+MAN1=		pgsql2shp.1 shp2pgsql.1
+PORTDOCS=	*
+.else
+MAKE_ARGS+=	NOPORTDOCS=yes
+.endif
+
+post-extract:
+	@${REINPLACE_CMD} -e 's#@ICONV_LDFLAGS@#-liconv -L${LOCALBASE}/lib#g' \
+		${WRKSRC}/loader/Makefile.in
+
+post-patch:
+	@${REINPLACE_CMD} -e 's#%PERL%#${PERL}#g' \
+		${WRKSRC}/postgis/Makefile.in
 
 post-install:
-	${MKDIR} ${DATADIR}/tiger_2010
-	(cd ${WRKSRC}/extras/tiger_geocoder/tiger_2010/ && ${COPYTREE_SHARE} \* ${DATADIR}/tiger_2010/)
-	${MKDIR} ${DATADIR}/utils
-	(cd ${WRKSRC}/utils/ && ${COPYTREE_SHARE} \* ${DATADIR}/utils/)
+	@${MKDIR} ${DATADIR}/utils
+	${INSTALL_SCRIPT} ${WRKSRC}/utils/create_undef.pl ${DATADIR}/utils/
+	${INSTALL_SCRIPT} ${WRKSRC}/utils/new_postgis_restore.pl ${DATADIR}/utils/
+	${INSTALL_SCRIPT} ${WRKSRC}/utils/profile_intersects.pl ${DATADIR}/utils/
+	${INSTALL_SCRIPT} ${WRKSRC}/utils/postgis_proc_upgrade.pl ${DATADIR}/utils/
+	${INSTALL_SCRIPT} ${WRKSRC}/utils/test_estimation.pl ${DATADIR}/utils/
+	${INSTALL_SCRIPT} ${WRKSRC}/utils/postgis_restore.pl ${DATADIR}/utils/
+	${INSTALL_SCRIPT} ${WRKSRC}/utils/test_joinestimation.pl ${DATADIR}/utils/
+	@${MKDIR} ${PREFIX}/lib/postgresql
+	@${LN} -s ${PREFIX}/lib/postgresql/postgis-1.5.so ${PREFIX}/lib/postgresql/postgis.so
+	@${LN} -s ${PREFIX}/lib/postgresql/postgis-1.5.so ${PREFIX}/lib/postgresql/liblwgeom.so.1
+	@${LN} -s ${PREFIX}/lib/postgresql/postgis-1.5.so ${PREFIX}/lib/postgresql/liblwgeom.so
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff -u postgis/distinfo postgis.orig/distinfo
--- postgis/distinfo	2012-12-20 14:15:39.000000000 -0500
+++ postgis.orig/distinfo	2011-09-21 19:39:43.000000000 -0400
@@ -1,2 +1,2 @@
-SHA256 (postgis-2.0.2.tar.gz) = 57746d040080e624f3e81633a180d8a5fc16b0c035d94fe2c16306023ab1c391
-SIZE (postgis-2.0.2.tar.gz) = 5573652
+SHA256 (postgis-1.5.3.tar.gz) = a2334f8b229446c0497d48a430a40152a3b71a5da02f414a0340a0a025d416cf
+SIZE (postgis-1.5.3.tar.gz) = 3779956
Only in postgis.orig: files
diff -u postgis/pkg-descr postgis.orig/pkg-descr
--- postgis/pkg-descr	2012-12-20 14:39:15.000000000 -0500
+++ postgis.orig/pkg-descr	2011-10-22 19:50:09.000000000 -0400
@@ -1,12 +1,17 @@
-PostGIS adds support for geographic objects to the PostgreSQL object-relational database. 
-In effect, PostGIS "spatially enables" the PostgreSQL server, allowing it to be used as a 
-backend spatial database for geographic information systems (GIS), much like ESRI's SDE or
-Oracle's Spatial extension. PostGIS follows the OpenGIS "Simple Features Specification for
-SQL" and has been certified as compliant with the "Types and Functions" profile.
+PostGIS adds support for geographic objects to the PostgreSQL 
+object-relational database. In effect, PostGIS "spatially enables" 
+the PostgreSQL server, allowing it to be used as a backend spatial 
+database for geographic information systems (GIS), much like ESRI's SDE 
+or Oracle's Spatial extension. 
+PostGIS follows the OpenGIS "Simple Features Specification for SQL" and 
+will be submitted for conformance testing at version 1.0.
 
-PostGIS development was started by Refractions Research as a project in open source spatial
-database technology. PostGIS is released under the GNU General Public License. PostGIS 
-continues to be developed by a group of contributors led by a Project Steering Committee
-and new features continue to be added. 
+PostGIS has been developed by Refractions Research Inc as a research project 
+in open source spatial database technology. PostGIS is released under the 
+GNU General Public License. We intend to continue development as time and 
+resources permit. Our list of future projects includes enhanced technology 
+for data loading and dumping, user interface tools for direct data access 
+and manipulation, and support for advanced topologies at the server side, 
+such as coverages, networks, and surfaces.
 
-WWW: http://postgis.org
+WWW: http://postgis.refractions.net/
Only in postgis.orig: pkg-install
diff -u postgis/pkg-plist postgis.orig/pkg-plist
--- postgis/pkg-plist	2012-12-21 21:49:01.000000000 -0500
+++ postgis.orig/pkg-plist	2011-07-01 02:22:55.000000000 -0400
@@ -1,129 +1,26 @@
 bin/pgsql2shp
 bin/shp2pgsql
-lib/postgresql/postgis-2.0.so
-lib/postgresql/rtpostgis-2.0.so
-%%DATADIR%%/tiger_2010/README
-%%DATADIR%%/tiger_2010/census_loader.sql
-%%DATADIR%%/tiger_2010/create_geocode.bat
-%%DATADIR%%/tiger_2010/create_geocode.sh
-%%DATADIR%%/tiger_2010/create_geocode.sql
-%%DATADIR%%/tiger_2010/geocode/rate_attributes.sql
-%%DATADIR%%/tiger_2010/geocode/geocode.sql
-%%DATADIR%%/tiger_2010/geocode/census_tracts_functions.sql
-%%DATADIR%%/tiger_2010/geocode/other_helper_functions.sql
-%%DATADIR%%/tiger_2010/geocode/geocode_address.sql
-%%DATADIR%%/tiger_2010/geocode/geocode_intersection.sql
-%%DATADIR%%/tiger_2010/geocode/includes_address.sql
-%%DATADIR%%/tiger_2010/geocode/geocode_location.sql
-%%DATADIR%%/tiger_2010/geocode/interpolate_from_address.sql
-%%DATADIR%%/tiger_2010/geocode/reverse_geocode.sql
-%%DATADIR%%/tiger_2010/legacy_import/tiger2008/import_tiger_shps.sh
-%%DATADIR%%/tiger_2010/normalize/location_extract_countysub_exact.sql
-%%DATADIR%%/tiger_2010/normalize/location_extract.sql
-%%DATADIR%%/tiger_2010/normalize/location_extract_countysub_fuzzy.sql
-%%DATADIR%%/tiger_2010/normalize/normalize_address.sql
-%%DATADIR%%/tiger_2010/normalize/count_words.sql
-%%DATADIR%%/tiger_2010/normalize/location_extract_place_exact.sql
-%%DATADIR%%/tiger_2010/normalize/state_extract.sql
-%%DATADIR%%/tiger_2010/normalize/end_soundex.sql
-%%DATADIR%%/tiger_2010/normalize/location_extract_place_fuzzy.sql
-%%DATADIR%%/tiger_2010/normalize/pprint_addy.sql
-%%DATADIR%%/tiger_2010/normalize/get_last_words.sql
-%%DATADIR%%/tiger_2010/regress/geocode_regress
-%%DATADIR%%/tiger_2010/regress/normalize_address_regress
-%%DATADIR%%/tiger_2010/regress/regress.sql
-%%DATADIR%%/tiger_2010/regress/reverse_geocode_regress.sql
-%%DATADIR%%/tiger_2010/regress/reverse_geocode_regress
-%%DATADIR%%/tiger_2010/regress/geocode_regress.sql
-%%DATADIR%%/tiger_2010/regress/normalize_address_regress.sql
-%%DATADIR%%/tiger_2010/tables/lookup_tables_2010.sql
-%%DATADIR%%/tiger_2010/tiger_loader.sql
-%%DATADIR%%/tiger_2010/topology/tiger_topology_loader.sql
-%%DATADIR%%/tiger_2010/topology/README
-%%DATADIR%%/tiger_2010/upgrade_geocode.sql
-%%DATADIR%%/tiger_2010/upgrade_geocoder.bat
-%%DATADIR%%/tiger_2010/upgrade_geocoder.sh
-%%DATADIR%%/tiger_2010/utility/utmzone.sql
-%%DATADIR%%/tiger_2010/utility/levenshtein_ignore_case.sql
-%%DATADIR%%/tiger_2010/utility/nullable_levenshtein.sql
-%%DATADIR%%/tiger_2010/utility/cull_null.sql
-%%DATADIR%%/utils/Makefile
-%%DATADIR%%/utils/Makefile.in
-%%DATADIR%%/utils/README
+%%LOADERGUI%%bin/shp2pgsql-gui
+lib/postgresql/liblwgeom.so
+lib/postgresql/liblwgeom.so.1
+lib/postgresql/postgis-1.5.so
+lib/postgresql/postgis.so
+%%DATADIR%%/contrib/postgis-1.5/postgis.sql
+%%DATADIR%%/contrib/postgis-1.5/postgis_upgrade_13_to_15.sql
+%%DATADIR%%/contrib/postgis-1.5/postgis_upgrade_14_to_15.sql
+%%DATADIR%%/contrib/postgis-1.5/postgis_upgrade_15_minor.sql
+%%DATADIR%%/contrib/postgis-1.5/spatial_ref_sys.sql
+%%DATADIR%%/contrib/postgis-1.5/uninstall_postgis.sql
 %%DATADIR%%/utils/create_undef.pl
+%%DATADIR%%/utils/new_postgis_restore.pl
 %%DATADIR%%/utils/postgis_proc_upgrade.pl
 %%DATADIR%%/utils/postgis_restore.pl
-%%DATADIR%%/utils/postgis_restore.pl.in
 %%DATADIR%%/utils/profile_intersects.pl
-%%DATADIR%%/utils/read_scripts_version.pl
-%%DATADIR%%/utils/svn_repo_revision.pl
 %%DATADIR%%/utils/test_estimation.pl
-%%DATADIR%%/utils/test_geography_estimation.pl
-%%DATADIR%%/utils/test_geography_joinestimation.pl
 %%DATADIR%%/utils/test_joinestimation.pl
-%%DATADIR%%/utils/uninstall_script
-share/postgresql/contrib/postgis-2.0/postgis_comments.sql
-share/postgresql/contrib/postgis-2.0/raster_comments.sql
-share/postgresql/contrib/postgis-2.0/topology_comments.sql
-share/postgresql/contrib/postgis-2.0/spatial_ref_sys.sql
-share/postgresql/contrib/postgis-2.0/postgis.sql
-share/postgresql/contrib/postgis-2.0/uninstall_postgis.sql
-share/postgresql/contrib/postgis-2.0/postgis_upgrade_20_minor.sql
-share/postgresql/contrib/postgis-2.0/legacy.sql
-share/postgresql/contrib/postgis-2.0/uninstall_legacy.sql
-share/postgresql/contrib/postgis-2.0/legacy_minimal.sql
-share/postgresql/contrib/postgis-2.0/legacy_gist.sql
-share/postgresql/contrib/postgis-2.0/rtpostgis.sql
-share/postgresql/contrib/postgis-2.0/rtpostgis_upgrade_20_minor.sql
-share/postgresql/contrib/postgis-2.0/uninstall_rtpostgis.sql
-share/postgresql/contrib/postgis-2.0/rtpostgis_legacy.sql
-share/postgresql/contrib/postgis-2.0/topology.sql
-share/postgresql/contrib/postgis-2.0/topology_upgrade_20_minor.sql
-share/postgresql/contrib/postgis-2.0/uninstall_topology.sql
-share/postgresql/contrib/postgis-2.0/postgis_restore.pl
-share/postgresql/extension/postgis.control
-share/postgresql/extension/postgis--2.0.0alpha3--2.0.2.sql
-share/postgresql/extension/postgis--2.0.0alpha4--2.0.2.sql
-share/postgresql/extension/postgis--2.0.1--2.0.2.sql
-share/postgresql/extension/postgis--2.0.0alpha5--2.0.2.sql
-share/postgresql/extension/postgis--2.0.0beta3--2.0.2.sql
-share/postgresql/extension/postgis--2.0.0beta4--2.0.2.sql
-share/postgresql/extension/postgis--2.0.0rc2--2.0.2.sql
-share/postgresql/extension/postgis--2.0.0alpha6--2.0.2.sql
-share/postgresql/extension/postgis--2.0.2.sql
-share/postgresql/extension/postgis--2.0.0alpha1--2.0.2.sql
-share/postgresql/extension/postgis--unpackaged--2.0.2.sql
-share/postgresql/extension/postgis--2.0.0beta1--2.0.2.sql
-share/postgresql/extension/postgis--2.0.0--2.0.2.sql
-share/postgresql/extension/postgis--2.0.0beta2--2.0.2.sql
-share/postgresql/extension/postgis--2.0.0rc1--2.0.2.sql
-share/postgresql/extension/postgis--2.0.0alpha2--2.0.2.sql
-share/postgresql/extension/postgis_topology.control
-share/postgresql/extension/postgis_topology--2.0.0beta4--2.0.2.sql
-share/postgresql/extension/postgis_topology--2.0.0alpha6--2.0.2.sql
-share/postgresql/extension/postgis_topology--2.0.0alpha1--2.0.2.sql
-share/postgresql/extension/postgis_topology--unpackaged--2.0.2.sql
-share/postgresql/extension/postgis_topology--2.0.0beta2--2.0.2.sql
-share/postgresql/extension/postgis_topology--2.0.2.sql
-share/postgresql/extension/postgis_topology--2.0.0beta1--2.0.2.sql
-share/postgresql/extension/postgis_topology--2.0.0--2.0.2.sql
-share/postgresql/extension/postgis_topology--2.0.0rc1--2.0.2.sql
-share/postgresql/extension/postgis_topology--2.0.0alpha2--2.0.2.sql
-share/postgresql/extension/postgis_topology--2.0.0alpha3--2.0.2.sql
-share/postgresql/extension/postgis_topology--2.0.0alpha4--2.0.2.sql
-share/postgresql/extension/postgis_topology--2.0.1--2.0.2.sql
-share/postgresql/extension/postgis_topology--2.0.0rc2--2.0.2.sql
-share/postgresql/extension/postgis_topology--2.0.0alpha5--2.0.2.sql
-share/postgresql/extension/postgis_topology--2.0.0beta3--2.0.2.sql
-@dirrm share/postgresql/contrib/postgis-2.0
-@dirrm share/postgis/tiger_2010/legacy_import/tiger2008
-@dirrm share/postgis/tiger_2010/geocode
-@dirrm share/postgis/tiger_2010/legacy_import
-@dirrm share/postgis/tiger_2010/normalize
-@dirrm share/postgis/tiger_2010/regress
-@dirrm share/postgis/tiger_2010/tables
-@dirrm share/postgis/tiger_2010/topology
-@dirrm share/postgis/tiger_2010/utility
-@dirrm share/postgis/tiger_2010
-@dirrm share/postgis/utils
-@dirrm share/postgis
+@dirrmtry %%DATADIR%%/utils
+@dirrmtry %%DATADIR%%/contrib/postgis-1.5
+@dirrmtry %%DATADIR%%/contrib
+@dirrmtry %%DATADIR%%
+@dirrmtry lib/postgresql
+@dirrmtry lib


>Release-Note:
>Audit-Trail:
>Unformatted:



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