ports/91030: [maintainer-update] Postgis upgrade from 1.0.6 to 1.1.0

Anderson S. Ferreira anderson at cnpm.embrapa.br
Wed Dec 28 20:30:07 UTC 2005


>Number:         91030
>Category:       ports
>Synopsis:       [maintainer-update] Postgis upgrade from 1.0.6 to 1.1.0
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Dec 28 20:30:05 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Anderson S. Ferreira
>Release:        FreeBSD 6.0-STABLE i386
>Organization:
Embrapa Monitoramento por Satélite
>Environment:
System: FreeBSD ipe.cnpm.embrapa.br 6.0-STABLE FreeBSD 6.0-STABLE #4: Mon Dec 19 07:43:41 BRST 2005 root at ipe.cnpm.embrapa.br:/usr/src/sys/i386/compile/IPE i386

>Description:

Postgis upgrade from 1.0.6 to 1.1.0 .

This release, includes new functionality, performance improvements and bug fixes. 
Highlights include:

    * Geometry building functions, including line merging, polygon creation and vertex manipulation,
    * Linear referencing functions, including support for measures,
    * Performance improvements to coordinate reference transformations

>How-To-Repeat:

>Fix:

--- postgis.patch begins here ---
diff -urN postgis.bak/Makefile postgis/Makefile
--- postgis.bak/Makefile	Wed Dec 28 17:32:25 2005
+++ postgis/Makefile	Wed Dec 28 18:07:08 2005
@@ -6,80 +6,71 @@
 #
 
 PORTNAME=	postgis
-DISTVERSION=	1.0.6
+DISTVERSION=	1.1.0
 CATEGORIES=	databases
 MASTER_SITES=	http://postgis.refractions.net/download/
 
 MAINTAINER=	anderson at cnpm.embrapa.br
 COMMENT=	Adds support for geographic objects to PostgreSQL databases
 
-BUILD_DEPENDS=	${NONEXISTENT}:${PGSQL_PORTDIR}:configure
 LIB_DEPENDS=	proj.5:${PORTSDIR}/graphics/proj
+RUN_DEPENDS=	postmaster:${PORTSDIR}/databases/postgresql${PGSQL_VER}-server
 
 USE_PGSQL=	yes
 USE_GMAKE=	yes
 USE_BISON=	yes
 USE_PERL5_BUILD=	yes
 
-MAN1=		pgsql2shp.1 shp2pgsql.1
-
 INSTALL_TARGET=	install
 INSTALLS_SHLIB=	no
 
 OPTIONS=	GEOS "Include GEOS - the OpenGIS 'Simple Features for SQL'" off \
 		UTF8 "UTF-8 support for shp2pgsql. (needs libiconv)" off
 
-MAKE_ARGS=	PGSQL_SRC="${PGSQL_SRC}" \
-		USE_PROJ=1 \
-		DATADIR="${PREFIX}/share/postgis" \
-		INSTALL_DATA="${INSTALL_DATA}" \
-		BINDIR="${PREFIX}/bin" \
-		LIBDIR="${PREFIX}/lib"
+GNU_CONFIGURE=	yes
+CONFIGURE_ARGS=	--datadir=${PREFIX}/share/postgis \
+		--bindir=${PREFIX}/bin \
+		--libdir=${PREFIX}/lib
 
 .include <bsd.port.pre.mk>
 
-DEFAULT_PGSQL_VER?= 74
-
 #Setting/finding PostgreSQL version we want.
-.if exists(${LOCALBASE}/bin/postmaster)
-PGSQL_VER!=	${LOCALBASE}/bin/postmaster -V | \
-		${SED} -n 's/postmaster.*PostgreSQL[^0-9]*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\..*/\1\2/p'
-.elif exists(${LOCALBASE}/bin/pg_config)
-PGSQL_VER!=	${LOCALBASE}/bin/pg_config --version | ${SED} -n 's/PostgreSQL[^0-9]*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\..*/\1\2/p'
+.if exists(${LOCALBASE}/bin/pg_config)
+PGSQL_VER!=     ${LOCALBASE}/bin/pg_config --version | ${SED} -n 's/PostgreSQL[^0-9]*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\..*/\1\2/p'
 .else
-PGSQL_VER=	${DEFAULT_PGSQL_VER}
+PGSQL_VER=      ${DEFAULT_PGSQL_VER}
 .endif
 
-PGSQL_PORTDIR=	${PORTSDIR}/databases/postgresql${PGSQL_VER}-server
-PGSQL_SRC!=	cd ${PGSQL_PORTDIR} && ${MAKE} -V WRKSRC
 
 .if !defined(NOPORTDOCS)
 BUILD_DEPENDS+=	xsltproc:${PORTSDIR}/textproc/libxslt \
 		${LOCALBASE}/share/xsl/docbook/html/chunk.xsl:${PORTSDIR}/textproc/docbook-xsl
-MAKE_ARGS+=	WITH-DOC=yes \
-		DOCSDIR="${DOCSDIR}"
+MAKE_ARGS+=	WITH-DOC=yes
+MAN1=		pgsql2shp.1 shp2pgsql.1
 PORTDOCS=	*
 .endif
 
 .if defined(WITH_UTF8)
 LIB_DEPENDS+=	iconv:${PORTSDIR}/converters/libiconv
-MAKE_ARGS+=	USE_ICONV=1
+MAKE_ENV+=	"LDFLAGS=-L${LOCALBASE}/lib"
+.else
+CONFIGURE_ARGS+=	--without-iconv
 .endif
 
 .if defined(WITH_GEOS)
 LIB_DEPENDS+=	geos:${PORTSDIR}/graphics/geos
-MAKE_ARGS+=	USE_GEOS=1
+CONFIGURE_ARGS+=	--with-geos=${LOCALBASE}/bin/geos-config
 .else
-MAKE_ARGS+=	USE_GEOS=0
+CONFIGURE_ARGS+=	--without-geos
 .endif
 
 pre-everything::
 	@${SH} ${PKGINSTALL} ${PORTNAME} MESSAGE
 
 post-install:
-	@ ${MKDIR} ${PREFIX}/lib/postgresql
-	@ ${LN} ${PREFIX}/lib/liblwgeom.so.1 ${PREFIX}/lib/postgresql
-	@ ${SETENV} PKG_PREFIX=${PREFIX} \
+	@${MKDIR} ${PREFIX}/lib/postgresql
+	@${LN} -s ${PREFIX}/lib/liblwgeom.so.1 ${PREFIX}/lib/postgresql
+	@${SETENV} PKG_PREFIX=${PREFIX} \
 		${SH} ${PKGINSTALL} ${PORTNAME} POST-INSTALL
 
 post-deinstall:
diff -urN postgis.bak/distinfo postgis/distinfo
--- postgis.bak/distinfo	Wed Dec 28 17:32:25 2005
+++ postgis/distinfo	Wed Dec 28 17:34:59 2005
@@ -1,3 +1,3 @@
-MD5 (postgis-1.0.6.tar.gz) = 34925b24c77045b1b23a9a06e47a9a22
-SHA256 (postgis-1.0.6.tar.gz) = 0c22c834c32e2e355a0a5fa0f9ff61602ea0243964bbc9731f3a47887e4b25fe
-SIZE (postgis-1.0.6.tar.gz) = 1399206
+MD5 (postgis-1.1.0.tar.gz) = 57768cb808d358b667075273aef40122
+SHA256 (postgis-1.1.0.tar.gz) = 113e74b2ce7f01c21014bd8a1129e6e4dfb71930e7ef338b9cc26a085d403c78
+SIZE (postgis-1.1.0.tar.gz) = 1535679
diff -urN postgis.bak/files/README.postgis postgis/files/README.postgis
--- postgis.bak/files/README.postgis	Sat Apr 23 08:44:08 2005
+++ postgis/files/README.postgis	Wed Dec 28 17:34:59 2005
@@ -1,214 +0,0 @@
-PostGIS - Geographic Information Systems Extensions to PostgreSQL
-~~~~~~~   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-VERSION: 1.0.0 (2005/01/13)
-
-MORE INFORMATION: http://postgis.refractions.net
-
-INTRODUCTION:
-This distribution contains a module which implements GIS simple 
-features, ties the features to rtree indexing, and provides some 
-spatial functions for accessing and analyzing geographic data.
-
-Directory structure:
-
-  ./          Build scripts and install directions.
-  ./lwgeom    Library source code.
-  ./jdbc      Extensions to the PostgreSQL JDBC drivers to support
-              the GIS objects. 
-  ./doc       Documentation on the code, objects and functions 
-              provided. 
-  ./loader    A program to convert ESRI Shape files into SQL text
-              suitable for uploading into a PostGIS/PostgreSQL database
-              and a program for converting PostGIS spatial tables into
-              Shape files..
-  ./examples  Small programs which demonstrate ways of accessing 
-              GIS data.
-	        
-
-INSTALLATION:
-
-PostGIS is compatible with PostgreSQL 7.2 and above.
-
-To install the module, move this directory to the "contrib" directory of your
-PostgreSQL source installation. Alternately, point PGSQL_SRC at your
-PostgreSQL source tree either in an environment variable or editing 
-Makefile.config.
-
-You *must* have a PostgreSQL source tree, and you *must* have succesfully
-built and installed it for this to work. 
-
-SEE THE NOTE ON GEOS SUPPORT BELOW FOR SPECIAL COMPILATION INSTRUCTIONS
-
-
-* PROJ4 SUPPORT (Recommended): 
-  The Proj4 reprojection library is required if you want to use the 
-  transform() function to reproject features within the database.
-
-    http://www.remotesensing.org/proj
-
-  Install Proj4 in the default location.
-  Edit the postgis Makefile.config and change the USE_PROJ variable to 1
-  and ensure that the PROJ_DIR variable points to your Proj4 
-  installation location (/usr/local is the default).
-
-* SPATIAL PREDICATE / GEOS SUPPORT (Recommended):
-  The GEOS library provides support for exact topological tests
-  such as Touches(), Contains(), Disjoint() and spatial operations
-  such as Intersection(), Union() and Buffer().  
-
-    http://geos.refractions.net
-
-  In order to use the GEOS support, you *may* need to specially compile 
-  your version of PostgreSQL to link the C++ runtime library.
-  To do this, invoke the PgSQL configuration script this way:
- 
-  LDFLAGS=-lstdc++ ./configure --your-options-go-here
-
-  The initial LDFLAGS variable is passed through to the Makefile and
-  adds the C++ library to the linking stage. 
-  Once you have compiled PgSQL with C++ support, you can enable GEOS
-  support in PostGIS by setting the USE_GEOS variable in the PostGIS
-  Makefile.config to 1, and ensure that the GEOS_DIR variable points
-  to your GEOS installation location (/usr/local is the default).
-  
-
-To compile PostGIS, as root run:
-	
-  make
-  make install
-
-PostGIS now requires the PL/pgSQL procedural language in order to operate
-correctly. To install PL/pgSQL use the 'createlang' program from the PostgreSQL
-installation. (The PostgreSQL Programmer's Guide has details if you want 
-to this manually for some reason.)
-
-As postgres run:
-
-  createlang plpgsql yourdatabase
-  psql -f lwpostgis.sql -d yourdatabase
-
-Installation should now be complete.
-
-
-UPGRADING:
-
-Upgrading PostGIS can be tricky, because the underlying C libraries which 
-support the object types and geometries may have changed between versions.
-
-For this purpose PostGIS provides an utility script to restore a dump
-produced with the pg_dump -Fc command. It is experimental so redirecting
-its output to a file will help in case of problems. The procedure is
-as follow:
-
-	# Create a "custom-format" dump of the database you want
-	# to upgrade (let's call it "olddb")
-	$ pg_dump -Fc olddb olddb.dump
-
-	# Restore the dump contextually upgrading postgis into
-	# a new database. The new database doesn't have to exist.
-	# Let's call it "newdb"
-	$ sh utils/postgis_restore.pl lwpostgis.sql newdb olddb.dump > restore.log
-
-	# Check that all restored dump objects really had to be restored from dump
-	# and do not conflict with the ones defined in lwpostgis.sql
-	$ grep ^KEEPING restore.log | less
-
-	# If upgrading from PostgreSQL < 7.5 to >= 7.5 you might want to 
-	# drop the attrelid, varattnum and stats columns in the geometry_columns
-	# table, which are no-more needed. Keeping them won't hurt.
-	# !!! DROPPING THEM WHEN REALLY NEEDED WILL DO HURT !!!!
-	$ psql newdb -c "ALTER TABLE geometry_columns DROP attrelid"
-	$ psql newdb -c "ALTER TABLE geometry_columns DROP varattnum"
-	$ psql newdb -c "ALTER TABLE geometry_columns DROP stats"
-
-	# spatial_ref_sys table is restore from the dump, to ensure your custom
-	# additions are kept, but the distributed one might contain modification
-	# so you should backup your entries, drop the table and source the new one.
-	# If you did make additions we assume you know how to backup them before
-	# upgrading the table. Replace of it with the new one is done like this:
-	$ psql newdb
-	newdb=> drop table spatial_ref_sys;
-	DROP
-	newdb=> \i spatial_ref_sys.sql
-
-Following is the "old" procedure description. IT SHOULD BE AVOIDED if possible,
-as it will leave in the database many spurious functions. It is kept in this document
-as a "backup" in case postgis_restore.pl won't work for you:
-
-	pg_dump -t "*" -f dumpfile.sql yourdatabase
-	dropdb yourdatabase
-	createdb yourdatabase
-	createlang plpgsql yourdatabase
-	psql -f lwpostgis.sql -d yourdatabase
-	psql -f dumpfile.sql -d yourdatabase
-	vacuumdb -z yourdatabase
-
-
-USAGE:
-
-Try the following example SQL statements to create non-OpenGIS tables and 
-geometries:
-
-  CREATE TABLE geom_test ( gid int4, geom geometry,name varchar(25) );
-  INSERT INTO geom_test ( gid, geom, name ) 
-    VALUES ( 1, 'POLYGON((0 0 0,0 5 0,5 5 0,5 0 0,0 0 0))', '3D Square');
-  INSERT INTO geom_test ( gid, geom, name ) 
-    VALUES ( 2, 'LINESTRING(1 1 1,5 5 5,7 7 5)', '3D Line' );
-  INSERT INTO geom_test ( gid, geom, name )
-    VALUES ( 3, 'MULTIPOINT(3 4,8 9)', '2D Aggregate Point' );
-  SELECT * from geom_test WHERE geom && 'BOX3D(2 2 0,3 3 0)'::box3d;
-
-The following SQL creates proper OpenGIS entries in the SPATIAL_REF_SYS
-and GEOMETRY_COLUMNS tables, and ensures that all geometries are created
-with an SRID.
-
-  INSERT INTO SPATIAL_REF_SYS
-    ( SRID, AUTH_NAME, AUTH_SRID, SRTEXT ) VALUES
-    ( 1, 'EPSG', 4269,
-      'GEOGCS["NAD83",
-        DATUM[
-          "North_American_Datum_1983",
-          SPHEROID[
-          "GRS 1980",
-          6378137,
-          298.257222101
-        ]
-      ],
-      PRIMEM["Greenwich",0],
-      UNIT["degree",0.0174532925199433]]'
-    );
-
-  CREATE TABLE geotest (
-    id INT4,
-    name VARCHAR(32)
-    );
-
-  SELECT AddGeometryColumn('db','geotest','geopoint',1,'POINT',2);
-
-  INSERT INTO geotest (id, name, geopoint)
-    VALUES (1, 'Olympia', GeometryFromText('POINT(-122.90 46.97)',1));
-  INSERT INTO geotest (id, name, geopoint)
-    VALUES (2, 'Renton', GeometryFromText('POINT(-122.22 47.50)',1));
-
-  SELECT name,AsText(geopoint) FROM geotest;
-
-
-Spatial Indexes:
-
-PostgreSQL provides support for GiST spatial indexing. The GiST scheme offers 
-indexing even on large objects, using a system of "lossy" indexing where 
-a large object is proxied by a smaller one in the index.  In the case 
-of the PostGIS indexing system, all objects are proxied in the index by 
-their bounding boxes.
-
-You can build a GiST index with:
-
-  CREATE INDEX <indexname> 
-    ON <tablename> 
-    USING GIST ( <geometryfield> );
-
-Always run the "VACUUM ANALYZE <tablename>" on your tables after
-creating an index. This gathers statistics which the query planner
-uses to optimize index usage.
-
diff -urN postgis.bak/files/patch-GNUmakefile postgis/files/patch-GNUmakefile
--- postgis.bak/files/patch-GNUmakefile	Thu Jan  1 00:00:00 1970
+++ postgis/files/patch-GNUmakefile	Wed Dec 28 17:34:59 2005
@@ -0,0 +1,30 @@
+--- GNUmakefile	Mon Dec 19 18:23:23 2005
++++ GNUmakefile	Wed Dec 28 15:38:36 2005
+@@ -4,9 +4,15 @@
+ #
+ #-----------------------------------------------------
+ 
+-all: Makefile.config liblwgeom loaderdumper utils 
++all: Makefile.config liblwgeom loaderdumper utils
++ifneq ($(WITH-DOC),)
++	$(MAKE) -C doc
++endif
+ 
+-install: all liblwgeom-install loaderdumper-install 
++install: all liblwgeom-install loaderdumper-install utils-install
++ifneq ($(WITH-DOC),)
++	$(MAKE) -C doc install
++endif
+ 
+ uninstall: liblwgeom-uninstall loaderdumper-uninstall docs-uninstall
+ 
+@@ -74,6 +80,9 @@
+ 
+ utils:
+ 	$(MAKE) -C utils
++
++utils-install:
++	$(MAKE) -C utils install
+ 
+ configure: configure.in
+ 	./autogen.sh
diff -urN postgis.bak/files/patch-configure postgis/files/patch-configure
--- postgis.bak/files/patch-configure	Thu Jan  1 00:00:00 1970
+++ postgis/files/patch-configure	Wed Dec 28 17:34:59 2005
@@ -0,0 +1,10 @@
+--- configure	Wed Dec 21 20:25:14 2005
++++ configure	Wed Dec 28 13:57:10 2005
+@@ -4050,6 +4050,7 @@
+ 	/usr/share/sgml/docbook/xsl-stylesheets
+ 	/usr/share/xml/docbook/stylesheet/nwalsh
+ 	/usr/share/sgml/docbook/stylesheet/xsl/nwalsh
++	/usr/local/share/xsl/docbook
+ "
+ for p in ${SEARCHPATH}; do
+ 	if test -r ${p}/html/docbook.xsl; then
diff -urN postgis.bak/files/patch-doc postgis/files/patch-doc
--- postgis.bak/files/patch-doc	Wed Dec 28 17:32:26 2005
+++ postgis/files/patch-doc	Wed Dec 28 17:34:59 2005
@@ -1,53 +0,0 @@
---- doc/Makefile	Tue Apr 12 08:17:04 2005
-+++ doc/Makefile	Fri Dec  9 23:36:05 2005
-@@ -1,11 +1,14 @@
- COMMONOPTS = -f docbook -b html -e no-valid
- 
-+include ../Makefile.config
-+include $(top_srcdir)/src/Makefile.shlib
-+
- # fetch version numbers from central repository
- include ../Version.config
- 
- LAST_RELEASE_VERSION = $(SO_MAJOR_VERSION).$(SO_MINOR_VERSION).$(SO_MICRO_VERSION)
- 
--XSLBASE?=/usr/share/sgml/docbook/xsl-stylesheets
-+XSLBASE?=/usr/local/share/xsl/docbook
- #XSLBASE = /usr/share/xml/docbook/stylesheet/nwalsh
- 
- all: html
-@@ -16,14 +19,13 @@
- chunked-html: postgis-out.xml
- 	xsltproc \
- 		--output html/ \
--		--param shade.verbatim 1 \
- 		--param chunk.section.depth 0 \
- 		--param section.autolabel 1 \
- 		--param section.label.includes.component.label 1 \
- 		--stringparam html.stylesheet style.css \
- 		--stringparam saxon.character.representation decimal \
- 		$(XSLBASE)/html/chunk.xsl \
--		$<
-+		$< && touch chunked-html
- 
- html/postgis.html: postgis-out.xml
- 	xsltproc \
-@@ -67,6 +69,16 @@
- maintainer-clean: clean
- 	@rm -f html/*.html
- 
--install: html/postgis.html man/shp2pgsql.1 man/pgsql2shp.1
--
-+install: chunked-html
-+	$(mkinstalldirs) $(DOCSDIR)
-+	$(INSTALL_DATA)	html/index.html $(DOCSDIR)/index.html
-+	$(INSTALL_DATA)	html/ch01.html $(DOCSDIR)/ch01.html
-+	$(INSTALL_DATA)	html/ch02.html $(DOCSDIR)/ch02.html
-+	$(INSTALL_DATA)	html/ch03.html $(DOCSDIR)/ch03.html
-+	$(INSTALL_DATA)	html/ch04.html $(DOCSDIR)/ch04.html
-+	$(INSTALL_DATA)	html/ch05.html $(DOCSDIR)/ch05.html
-+	$(INSTALL_DATA)	html/ch06.html $(DOCSDIR)/ch06.html
-+	$(INSTALL_DATA)	html/ch07.html $(DOCSDIR)/ch07.html
-+	$(INSTALL_DATA)	html/apa.html $(DOCSDIR)/apa.html
-+ 
- .PHONY: html 
diff -urN postgis.bak/files/patch-loader postgis/files/patch-loader
--- postgis.bak/files/patch-loader	Wed Dec 28 17:32:26 2005
+++ postgis/files/patch-loader	Wed Dec 28 17:34:59 2005
@@ -1,13 +1,22 @@
---- loader/Makefile	Wed Jan 12 15:03:57 2005
-+++ loader/Makefile	Mon Jan 31 14:36:59 2005
-@@ -31,8 +32,8 @@
- 	$(CC) $(CFLAGS) $(OBJS) shp2pgsql.o $(LDFLAGS) -o $@ 
+--- loader/Makefile	Fri Dec 16 14:47:24 2005
++++ loader/Makefile	Wed Dec 28 14:23:13 2005
+@@ -9,7 +9,7 @@
+ #---------------------------------------------------------------
  
- install: all
--	$(INSTALL_PROGRAM) pgsql2shp$(EXE) $(DESTDIR)$(bindir)/pgsql2shp$(EXE)
--	$(INSTALL_PROGRAM) shp2pgsql$(EXE) $(DESTDIR)$(bindir)/shp2pgsql$(EXE)
-+	$(INSTALL_PROGRAM) pgsql2shp$(EXE) $(DESTDIR)$(BINDIR)/pgsql2shp$(EXE)
-+	$(INSTALL_PROGRAM) shp2pgsql$(EXE) $(DESTDIR)$(BINDIR)/shp2pgsql$(EXE)
+ ifeq ($(USE_ICONV),1)
+-	override CFLAGS += -DUSE_ICONV
++	override CFLAGS += -DUSE_ICONV -I/usr/local/include
+ 	override LDFLAGS += $(ICONV_LDFLAGS)
+ endif
+ 
+--- loader/shp2pgsql.c	Tue Nov  1 07:25:47 2005
++++ loader/shp2pgsql.c	Wed Dec 28 14:23:13 2005
+@@ -33,7 +33,7 @@
+ #include <unistd.h>
+ #include <errno.h>
+ #include "getopt.h"
+-#ifdef HAVE_ICONV_H
++#ifdef USE_ICONV
+ #include <iconv.h>
+ #endif
  
- uninstall:
- 	rm -f $(DESTDIR)$(bindir)/pgsql2shp$(EXE)
diff -urN postgis.bak/files/patch-lwgeom postgis/files/patch-lwgeom
--- postgis.bak/files/patch-lwgeom	Sat Oct 22 15:59:09 2005
+++ postgis/files/patch-lwgeom	Wed Dec 28 17:44:10 2005
@@ -1,41 +1,11 @@
---- lwgeom/Makefile	Mon Apr  4 06:48:57 2005
-+++ lwgeom/Makefile	Thu Apr 21 17:08:37 2005
-@@ -21,10 +21,10 @@
+--- lwgeom/Makefile	Wed Dec 28 17:39:49 2005
++++ lwgeom/Makefile	Wed Dec 28 17:41:22 2005
+@@ -128,7 +128,7 @@
+ 	$(PERL) ../utils/postgis_proc_upgrade.pl ../lwpostgis.sql > ../lwpostgis_upgrade.sql
+ 
+ ../lwpostgis.sql: lwpostgis.sql.in
+-	cpp -P -traditional-cpp -DUSE_VERSION=$(USE_VERSION) $< | sed -e 's:@MODULE_FILENAME@:$(MODULE_FILENAME):g;s:@POSTGIS_VERSION@:$(POSTGIS_VERSION):g;s:@POSTGIS_SCRIPTS_VERSION@:$(SCRIPTS_VERSION):g;s/@POSTGIS_BUILD_DATE@/$(POSTGIS_BUILD_DATE)/g' | grep -v '^#' > $@
++	cpp -P -traditional-cpp -DUSE_VERSION=$(USE_VERSION) $< | sed -e 's:@MODULE_FILENAME@:$$libdir/liblwgeom.so.1:g;s:@POSTGIS_VERSION@:$(POSTGIS_VERSION):g;s:@POSTGIS_SCRIPTS_VERSION@:$(SCRIPTS_VERSION):g;s/@POSTGIS_BUILD_DATE@/$(POSTGIS_BUILD_DATE)/g' | grep -v '^#' > $@
  
- ifeq (${USE_VERSION},71) 
- 	MODULE_FILENAME = $(LPATH)/$(shlib)
--	MODULE_INSTALLDIR = $(libdir)
-+	MODULE_INSTALLDIR = $(LIBDIR)
- else
- 	MODULE_FILENAME = $(LPATH)/$(shlib)
--	MODULE_INSTALLDIR = $(pkglibdir)
-+	MODULE_INSTALLDIR = $(LIBDIR)
- endif
+ install: all install-lib-shared install-lwgeom-scripts
  
- #---------------------------------------------------------------
-@@ -143,9 +143,9 @@
- install: all installdirs install-lwgeom-lib install-lwgeom-scripts
- 
- install-lwgeom-scripts:
--	$(INSTALL_DATA) lwpostgis.sql $(DESTDIR)$(datadir)/contrib/lwpostgis.sql
--	$(INSTALL_DATA) ../spatial_ref_sys.sql $(DESTDIR)$(datadir)/contrib/spatial_ref_sys.sql
--	$(INSTALL_DATA) ../README.postgis $(DESTDIR)$(docdir)/contrib/README.postgis
-+	$(INSTALL_DATA) lwpostgis.sql $(DESTDIR)$(DATADIR)/lwpostgis.sql
-+	$(INSTALL_DATA) ../spatial_ref_sys.sql $(DESTDIR)$(DATADIR)/spatial_ref_sys.sql
-+	$(INSTALL_DATA) ../README.postgis $(DESTDIR)$(DATADIR)/README.postgis
- 	$(INSTALL_DATA) ../doc/man/pgsql2shp.1 $(DESTDIR)$(mandir)/man1/pgsql2shp.1
- 	$(INSTALL_DATA) ../doc/man/shp2pgsql.1 $(DESTDIR)$(mandir)/man1/shp2pgsql.1
- 
-@@ -171,9 +171,9 @@
- 	sh ../geos_version.sh $(GEOS_DIR) > postgis_geos_version.h
- 
- installdirs:
--	$(mkinstalldirs) $(DESTDIR)$(MODULE_INSTALLDIR)
--	$(mkinstalldirs) $(DESTDIR)$(datadir)/contrib
--	$(mkinstalldirs) $(DESTDIR)$(docdir)/contrib
-+	$(mkinstalldirs) $(LIBDIR)
-+	$(mkinstalldirs) $(DATADIR)
-+	$(mkinstalldirs) $(DOCSDIR)
- 
- uninstall-lwgeom-scripts:
- 	rm -f $(DESTDIR)$(datadir)/contrib/lwpostgis.sql
diff -urN postgis.bak/files/patch-main postgis/files/patch-main
--- postgis.bak/files/patch-main	Wed Dec 28 17:32:26 2005
+++ postgis/files/patch-main	Wed Dec 28 17:34:59 2005
@@ -1,31 +0,0 @@
---- Makefile	Tue Mar  8 13:46:23 2005
-+++ Makefile	Mon Mar 28 09:22:32 2005
-@@ -5,8 +5,15 @@
- #-----------------------------------------------------
- 
- all: liblwgeom loaderdumper utils
-+ifneq ($(WITH-DOC),)
-+	$(MAKE) -C doc chunked-html
-+endif
- 
- install: all liblwgeom-install loaderdumper-install
-+	$(MAKE) INSTALL_DATA="$(INSTALL_DATA)" DATADIR=$(DATADIR) -C utils install
-+ifneq ($(WITH-DOC),)
-+	$(MAKE) INSTALL_DATA="$(INSTALL_DATA)" DOCSDIR=$(DOCSDIR) -C doc install
-+endif
- 
- uninstall: liblwgeom-uninstall loaderdumper-uninstall
- 
---- Makefile.config	Thu Dec  1 07:26:49 2005
-+++ Makefile.config	Fri Dec  9 23:27:18 2005
-@@ -75,8 +75,8 @@
- # Use ICONV_LDFLAGS and ICONV_CFLAGS to fine-tune usage.
- #
- USE_ICONV ?= 0
--ICONV_CFLAGS ?=
--ICONV_LDFLAGS ?=
-+ICONV_CFLAGS ?=-I/usr/local/include
-+ICONV_LDFLAGS ?=-L/usr/local/lib -liconv
- 
- #
- # Path to library (to be specified in CREATE FUNCTION queries)
diff -urN postgis.bak/files/patch-utils postgis/files/patch-utils
--- postgis.bak/files/patch-utils	Wed Apr 13 09:08:06 2005
+++ postgis/files/patch-utils	Wed Dec 28 18:00:57 2005
@@ -1,21 +1,22 @@
---- utils/Makefile	Tue Mar  8 09:11:29 2005
-+++ utils/Makefile	Mon Mar 28 09:45:41 2005
+--- utils/Makefile	Mon Jun  6 13:49:41 2005
++++ utils/Makefile	Wed Dec 28 15:33:31 2005
 @@ -1,3 +1,6 @@
 +include ../Makefile.config
-+include $(top_srcdir)/src/Makefile.shlib
++include ../Version.config
 +
  SCRIPTS = \
  	postgis_restore.pl \
- 	profile_intersects.pl \
-@@ -6,3 +9,11 @@
+ 	create_undef.pl \
+@@ -8,3 +11,12 @@
  
  all:
  	chmod +x $(SCRIPTS)
 +
 +install:
-+	$(mkinstalldirs) $(DATADIR)/utils
-+	$(INSTALL_DATA)	README $(DATADIR)/utils/README
-+	$(INSTALL_DATA)	postgis_restore.pl $(DATADIR)/utils/postgis_restore.pl
-+	$(INSTALL_DATA)	profile_intersects.pl $(DATADIR)/utils/profile_intersects.pl
-+	$(INSTALL_DATA)	test_estimation.pl $(DATADIR)/utils/test_estimation.pl
-+	$(INSTALL_DATA)	test_joinestimation.pl $(DATADIR)/utils/test_joinestimation.pl
++	@mkdir -p $(DESTDIR)$(datadir)/utils
++	$(INSTALL_DATA) README $(DESTDIR)$(datadir)/utils/README
++	$(INSTALL_DATA) create_undef.pl $(DESTDIR)$(datadir)/utils/create_undef.pl
++	$(INSTALL_DATA) postgis_restore.pl $(DESTDIR)$(datadir)/utils/postgis_restore.pl
++	$(INSTALL_DATA) profile_intersects.pl $(DESTDIR)$(datadir)/utils/profile_intersects.pl
++	$(INSTALL_DATA) test_estimation.pl $(DESTDIR)$(datadir)/utils/test_estimation.pl
++	$(INSTALL_DATA) test_joinestimation.pl $(DESTDIR)$(datadir)/utils/test_joinestimation.pl
diff -urN postgis.bak/pkg-install postgis/pkg-install
--- postgis.bak/pkg-install	Sat Oct 22 15:27:57 2005
+++ postgis/pkg-install	Wed Dec 28 17:34:59 2005
@@ -2,14 +2,6 @@
 
 msg(){
  echo "
-  ================== ** Postgis Upgrade Notice ** ====================
-
-  If you are a user from old versions of Postgis (1.0.0-RC5 or older), 
-  stop now and read the README.postgis file located in port's files 
-  directory to know how to make a dump from your databases !
-
-  If you need to backup your data, press CTRL-C now !
-
   ======================= GEOS Support Notice ========================
   In order to use the GEOS support, you may need to specially compile
   your version of PostgreSQL to link the C++ runtime library.
diff -urN postgis.bak/pkg-plist postgis/pkg-plist
--- postgis.bak/pkg-plist	Sat Dec  3 10:50:20 2005
+++ postgis/pkg-plist	Wed Dec 28 17:59:09 2005
@@ -3,13 +3,14 @@
 lib/liblwgeom.so
 lib/liblwgeom.so.1
 lib/postgresql/liblwgeom.so.1
-%%DATADIR%%/README.postgis
 %%DATADIR%%/lwpostgis.sql
+%%DATADIR%%/lwpostgis_upgrade.sql
 %%DATADIR%%/spatial_ref_sys.sql
 %%DATADIR%%/utils/postgis_restore.pl
 %%DATADIR%%/utils/profile_intersects.pl
 %%DATADIR%%/utils/test_estimation.pl
 %%DATADIR%%/utils/test_joinestimation.pl
+%%DATADIR%%/utils/create_undef.pl
 %%DATADIR%%/utils/README
 %%PORTDOCS%%@unexec rmdir %D/%%DOCSDIR%% 2>/dev/null || true
 @unexec rmdir %D/lib/postgresql 2>/dev/null || true
--- postgis.patch ends here ---


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



More information about the freebsd-ports-bugs mailing list