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

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

Return to bug 91030