Date: Mon, 31 Jan 2005 17:04:11 -0200 (BRST) From: "Anderson S.Ferreira" <anderson@cnpm.embrapa.br> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/76916: [maintainer update] Postgis upgrade from 0.9.1 to 1.0.0-rc2 Message-ID: <20050131190411.F02FC15340A@mogno.cnpm.embrapa.br> Resent-Message-ID: <200501311910.j0VJAJ0n012963@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 76916 >Category: ports >Synopsis: [maintainer update] Postgis upgrade from 0.9.1 to 1.0.0-rc2 >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: Mon Jan 31 19:10:19 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Anderson S. Ferreira >Release: FreeBSD 6.0-CURRENT amd64 >Organization: Embrapa Monitoramento por Satélite >Environment: System: FreeBSD mogno.cnpm.embrapa.br 6.0-CURRENT FreeBSD 6.0-CURRENT #23: Mon Jan 24 08:26:30 BRST 2005 anderson@mogno.cnpm.embrapa.br:/usr/src/sys/amd64/compile/MOGNO amd64 >Description: UPDATE - Postgis upgrade from 0.9.1 to 1.0.0-rc2 >How-To-Repeat: >Fix: --- postgis.patch begins here --- diff -ruN postgis.old/Makefile postgis/Makefile --- postgis.old/Makefile Sun Jan 30 22:35:42 2005 +++ postgis/Makefile Mon Jan 31 16:58:46 2005 @@ -6,11 +6,11 @@ # PORTNAME= postgis -PORTVERSION= 0.9.1 -PORTREVISION= 1 +PORTVERSION= 1.0.0rc2 CATEGORIES= databases MASTER_SITES= http://postgis.refractions.net/ DISTNAME= postgis-${PORTVERSION} +DISTFILES= postgis-1.0.0-rc2.tar.gz MAINTAINER= anderson@cnpm.embrapa.br COMMENT= Adds support for geographic objects to PostgreSQL databases @@ -21,33 +21,41 @@ USE_PERL5_BUILD= yes PKGMESSAGE= pkg-message -WRKSRC= ${WRKDIR}/postgis-${PORTVERSION} +WRKSRC= ${WRKDIR}/postgis-1.0.0-rc2 PGSQL_SRC= ${WRKDIR}/pgsql/postgresql 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 USE_PGSQL= YES .include <bsd.port.pre.mk> MAKE_ARGS= PGSQL_SRC="${PGSQL_SRC}" \ + USE_PROJ=1 \ DATADIR="${PREFIX}/share/postgis" \ + INSTALL_DATA="${INSTALL_DATA}" \ BINDIR="${PREFIX}/bin" \ LIBDIR="${PREFIX}/lib" -PGSQL_PORTDIR= ${PORTSDIR}/databases/postgresql${PGSQL_VER}-client +PGSQL_PORTDIR= ${PORTSDIR}/databases/postgresql${PGSQL_VER}-server .if !defined(NOPORTDOCS) BUILD_DEPENDS+= xsltproc:${PORTSDIR}/textproc/libxslt \ - ${LOCALBASE}/share/xsl/docbook/html/chunk.xsl:${PORTSDIR}/textproc/docbook-xsl + ${LOCALBASE}/share/xsl/docbook/html/chunk.xsl:${PORTSDIR}/textproc/docbook-xsl MAKE_ARGS+= WITH-DOC=yes \ DOCSDIR="${DOCSDIR}" PORTDOCS= * .endif +.if defined(WITH_UTF8) +LIB_DEPENDS+= iconv:${PORTSDIR}/converters/libiconv +MAKE_ARGS+= USE_ICONV=1 +.endif + .if defined(WITH_GEOS) LIB_DEPENDS+= geos.2:${PORTSDIR}/graphics/geos MAKE_ARGS+= USE_GEOS=1 @@ -65,8 +73,8 @@ ${MV} ${WRKDIR}/pgsql/postgresql* ${PGSQL_SRC} \ post-install: - @ ${INSTALL_SCRIPT} ${FILESDIR}/updatedb.default ${PREFIX}/share/postgis - @ ${INSTALL_SCRIPT} ${FILESDIR}/UPDATE ${PREFIX}/share/postgis + @ ${INSTALL_DATA} ${FILESDIR}/updatedb.default ${PREFIX}/share/postgis + @ ${INSTALL_DATA} ${FILESDIR}/README.upgrade ${PREFIX}/share/postgis @ ${SETENV} PKG_PREFIX=${PREFIX} \ ${SH} ${PKGINSTALL} ${PORTNAME} POST-INSTALL @ ${CAT} ${PKGMESSAGE} diff -ruN postgis.old/distinfo postgis/distinfo --- postgis.old/distinfo Thu Jan 13 20:53:39 2005 +++ postgis/distinfo Mon Jan 31 12:48:36 2005 @@ -1,2 +1,2 @@ -MD5 (postgis-0.9.1.tar.gz) = 43264e90d013aea9ce8f3f0c3540ac32 -SIZE (postgis-0.9.1.tar.gz) = 491789 +MD5 (postgis-1.0.0-rc2.tar.gz) = 7b39a1f3cec40cd30b2c1549a65e04c9 +SIZE (postgis-1.0.0-rc2.tar.gz) = 1270939 diff -ruN postgis.old/files/README.upgrade postgis/files/README.upgrade --- postgis.old/files/README.upgrade Wed Dec 31 21:00:00 1969 +++ postgis/files/README.upgrade Mon Jan 31 16:34:02 2005 @@ -0,0 +1,16 @@ +Updating databases from old versions of Postgis + +The postgis library has its name changed, now the library is called +liblwgeom.so.1 instead of libpostgis.so.0 . +Databases created with older versions of postgis won't work properly, +until all references of libpostgis.so.0 be corrected. +To solve this problem, please, make a dump (on text format) of your +database and use the PREFIX/share/updatedb script. + + sh PREFIX/share/updatedb dump.sql + +A new file with '.updated' extension will be created with the library +references updated. +After that, you can restore your database using the updated file. + + psql -f dump.sql.updated database diff -ruN postgis.old/files/UPDATE postgis/files/UPDATE --- postgis.old/files/UPDATE Thu Jan 13 20:53:39 2005 +++ postgis/files/UPDATE Wed Dec 31 21:00:00 1969 @@ -1,14 +0,0 @@ -Updating databases from old versions of Postgis - -Due the libpostgis.so.0 path modification, databases created with older -versions of postgis won't work properly. -To solve this problem, please, make a dump (on text format) of your database -and use the PREFIX/share/updatedb script. - - sh PREFIX/share/updatedb dump.sql - -A new file with '.updated' extension will be created with libpostgis -references updated. -After that you can restore your database using updated file. - - psql -f dump.sql.updated database diff -ruN postgis.old/files/patch-a postgis/files/patch-a --- postgis.old/files/patch-a Thu Jan 13 20:53:39 2005 +++ postgis/files/patch-a Mon Jan 31 16:49:25 2005 @@ -1,17 +1,22 @@ ---- doc/Makefile Thu Sep 9 17:51:32 2004 -+++ doc/Makefile.new Wed Dec 29 09:49:05 2004 -@@ -5,14 +5,16 @@ +--- doc/Makefile Thu Jan 13 07:42:40 2005 ++++ doc/Makefile Mon Jan 31 16:48:51 2005 +@@ -1,20 +1,22 @@ + COMMONOPTS = -f docbook -b html -e no-valid + LAST_RELEASE_VERSION = 1.0.0RC1 + ++include ../Makefile.config ++include $(top_srcdir)/src/Makefile.shlib + postgis-out.xml: postgis.xml cat $< | sed "s/@@LAST_RELEASE_VERSION@@/$(LAST_RELEASE_VERSION)/g" > $@ -+# html/ch01.html html/ch02.html html/ch03.html html/ch04.html html/ch05.html html/index.html -+ chunked-html: postgis-out.xml -- xsltproc \ + xsltproc \ - --param shade.verbatim 1 \ -+ xsltproc --param shade.verbatim 1 \ - --param chunk.section.depth 0 \ + --output html/ \ + --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 \ - /usr/share/sgml/docbook/xsl-stylesheets/html/chunk.xsl \ @@ -21,25 +26,16 @@ html: postgis-out.xml xsltproc \ -@@ -20,11 +22,20 @@ - --param shade.verbatim 1 \ - --param chunk.section.depth 0 \ - --stringparam html.stylesheet style.css \ -- /usr/share/sgml/docbook/xsl-stylesheets/html/docbook.xsl \ -+ /usr/local/share/xsl/docbook/html/docbook.xsl \ - $< - - jw: postgis-out.xml - jw $(COMMONOPTS) -o html/ postgis-out.xml +@@ -53,3 +55,12 @@ + postgis.out \ + postgis.log - clean: -+ rm -f postgis-out.xml chunked-html html/*.html -+ +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/index.html $(DOCSDIR)/index.html - ++ $(INSTALL_DATA) html/ch06.html $(DOCSDIR)/ch06.html diff -ruN postgis.old/files/patch-b postgis/files/patch-b --- postgis.old/files/patch-b Thu Jan 13 20:53:39 2005 +++ postgis/files/patch-b Mon Jan 31 14:39:16 2005 @@ -1,6 +1,14 @@ ---- loader/Makefile Wed Dec 29 16:31:54 2004 -+++ loader/Makefile.new Wed Dec 29 16:32:25 2004 -@@ -50,8 +50,8 @@ +--- loader/Makefile Wed Jan 12 15:03:57 2005 ++++ loader/Makefile Mon Jan 31 14:36:59 2005 +@@ -18,6 +18,7 @@ + + ifeq ($(USE_ICONV),1) + override CFLAGS += -DUSE_ICONV ++ override LDFLAGS += -liconv + endif + + override CFLAGS := -g -I.. -I$(srcdir) -I$(top_builddir)/src/interfaces/libpq $(CFLAGS) -DFRONTEND -DSYSCONFDIR='"$(sysconfdir)"' -DUSE_VERSION=$(USE_VERSION) +@@ -31,8 +32,8 @@ $(CC) $(CFLAGS) $(OBJS) shp2pgsql.o $(LDFLAGS) -o $@ install: all @@ -9,5 +17,5 @@ + $(INSTALL_PROGRAM) pgsql2shp$(EXE) $(DESTDIR)$(BINDIR)/pgsql2shp$(EXE) + $(INSTALL_PROGRAM) shp2pgsql$(EXE) $(DESTDIR)$(BINDIR)/shp2pgsql$(EXE) - clean: - @rm -f $(OBJS) shp2pgsql.o pgsql2shp.o shp2pgsql$(EXE) pgsql2shp$(EXE) + uninstall: + rm -f $(DESTDIR)$(bindir)/pgsql2shp$(EXE) diff -ruN postgis.old/files/patch-c postgis/files/patch-c --- postgis.old/files/patch-c Thu Jan 13 20:53:39 2005 +++ postgis/files/patch-c Mon Jan 31 13:01:34 2005 @@ -1,64 +1,17 @@ ---- Makefile Wed Dec 29 09:44:01 2004 -+++ Makefile.new Wed Dec 29 09:56:30 2004 -@@ -28,7 +28,7 @@ - # - # Download from: http://geos.refractions.net - # --USE_GEOS=1 -+#USE_GEOS=1 - ifeq (${GEOS_DIR},) - GEOS_DIR=/usr/local - endif -@@ -105,10 +105,10 @@ - SCRIPTS_VERSION=0.0.1 - 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 +--- Makefile Mon Jan 31 12:51:48 2005 ++++ Makefile Mon Jan 31 12:56:14 2005 +@@ -5,8 +5,14 @@ + #----------------------------------------------------- - #--------------------------------------------------------------- -@@ -191,6 +191,10 @@ - postgis_geos_wrapper.o: postgis_geos_wrapper.cpp - - all: $(GEOS_RULES) all-lib postgis.sql postgis_undef.sql loaderdumper + all: liblwgeom loaderdumper +ifneq ($(WITH-DOC),) + $(MAKE) -C doc chunked-html +endif -+ - - loaderdumper: - $(MAKE) -C loader -@@ -207,11 +211,15 @@ - perl create_undef.pl $< $(USE_VERSION) > $@ - install: all installdirs install-postgis-lib -- $(INSTALL_DATA) postgis.sql $(DESTDIR)$(datadir) -- $(INSTALL_DATA) postgis_undef.sql $(DESTDIR)$(datadir) -- $(INSTALL_DATA) spatial_ref_sys.sql $(DESTDIR)$(datadir) -- $(INSTALL_DATA) README.postgis $(DESTDIR)$(datadir) -+ $(INSTALL_DATA) postgis.sql $(DESTDIR)$(DATADIR)/postgis.sql.default -+ $(INSTALL_DATA) postgis_undef.sql $(DESTDIR)$(DATADIR) -+ $(INSTALL_DATA) spatial_ref_sys.sql $(DESTDIR)$(DATADIR) -+ $(INSTALL_DATA) README.postgis $(DESTDIR)$(DATADIR) - $(MAKE) DESTDIR=$(DESTDIR) -C loader install + install: all liblwgeom-install loaderdumper-install +ifneq ($(WITH-DOC),) + $(MAKE) INSTALL_DATA="$(INSTALL_DATA)" DOCSDIR=$(DOCSDIR) -C doc install +endif -+ - - #- This has been copied from postgresql and adapted - install-postgis-lib: $(shlib) -@@ -235,7 +243,7 @@ - ./geos_version.sh $(GEOS_DIR) > postgis_geos_version.h - installdirs: -- $(mkinstalldirs) $(docdir)/contrib $(datadir)/contrib $(libdir) -+ $(mkinstalldirs) $(DATADIR) $(libdir) + uninstall: liblwgeom-uninstall loaderdumper-uninstall - uninstall: uninstall-lib - @rm -f $(docdir)/contrib/README.postgis $(datadir)/contrib/postgis.sql diff -ruN postgis.old/files/patch-d postgis/files/patch-d --- postgis.old/files/patch-d Wed Dec 31 21:00:00 1969 +++ postgis/files/patch-d Mon Jan 31 13:28:39 2005 @@ -0,0 +1,38 @@ +--- lwgeom/Makefile Wed Jan 26 06:35:56 2005 ++++ lwgeom/Makefile Mon Jan 31 13:28:00 2005 +@@ -21,10 +21,10 @@ + SCRIPTS_VERSION=0.1.0 + 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 + + #--------------------------------------------------------------- +@@ -123,7 +123,7 @@ + install: all installdirs install-lwgeom-lib install-lwgeom-scripts + + install-lwgeom-scripts: +- $(INSTALL_DATA) lwpostgis.sql $(DESTDIR)$(datadir) ++ $(INSTALL_DATA) lwpostgis.sql $(DESTDIR)$(DATADIR)/lwpostgis.sql.default + + #- This has been copied from postgresql and adapted + install-lwgeom-lib: $(shlib) +@@ -147,10 +147,11 @@ + sh ../geos_version.sh $(GEOS_DIR) > postgis_geos_version.h + + installdirs: +- $(mkinstalldirs) $(libdir) ++ $(mkinstalldirs) $(LIBDIR) ++ $(mkinstalldirs) $(DATADIR) + + uninstall-lwgeom-scripts: +- rm -f $(DESTDIR)$(datadir)/lwpostgis.sql ++ rm -f $(DESTDIR)$(DATADIR)/lwpostgis.sql + + uninstall: uninstall-lib uninstall-lwgeom-scripts + diff -ruN postgis.old/files/updatedb.default postgis/files/updatedb.default --- postgis.old/files/updatedb.default Thu Jan 13 20:53:39 2005 +++ postgis/files/updatedb.default Mon Jan 31 15:01:45 2005 @@ -2,4 +2,5 @@ LIBDIR=%%LIBDIR%% -sed "s|'.*/libpostgis.so.0'|'${LIBDIR}/libpostgis.so.0'|g" $1 > $1.updated +sed "s|'.*/libpostgis\.so\.0'|'${LIBDIR}/liblwgeom.so.1'|g + s|'.*/liblwgeom\.so\.1'|'${LIBDIR}/liblwgeom.so.1'|g $1 > $1.updated diff -ruN postgis.old/pkg-deinstall postgis/pkg-deinstall --- postgis.old/pkg-deinstall Thu Jan 13 20:53:39 2005 +++ postgis/pkg-deinstall Mon Jan 31 13:55:19 2005 @@ -5,7 +5,7 @@ "POST-DEINSTALL") PREF=${PREFIX:-$PKG_PREFIX} SHAREDIR=${PREF}/share/postgis - rm -f ${SHAREDIR}/postgis.sql ${SHAREDIR}/updatedb + rm -f ${SHAREDIR}/lwpostgis.sql ${SHAREDIR}/updatedb rmdir ${SHAREDIR} ;; esac diff -ruN postgis.old/pkg-install postgis/pkg-install --- postgis.old/pkg-install Thu Jan 13 20:53:39 2005 +++ postgis/pkg-install Mon Jan 31 16:34:31 2005 @@ -4,10 +4,8 @@ echo " ================== ** Postgis Upgrade Notice ** =================== - The Postgis 0.9.1 port has changed the location of some files, - including libpostgis.so.0 library. If you are a user from a old - version of Postgis (0.9.0 or older), make a backup from your - databases before continue ! + If you are a user from a old version of Postgis (0.9.1 or older), + make a backup from your databases before continue ! If you need to backup your data, press CTRL-C now ! @@ -43,8 +41,9 @@ PREF=${PREFIX:-$PKG_PREFIX} SHAREDIR=${PREF}/share/postgis LIBDIR=${PREF}/lib - sed -e "s|\$libdir|${LIBDIR}|g" ${SHAREDIR}/postgis.sql.default > ${SHAREDIR}/postgis.sql + sed -e "s|\$libdir|${LIBDIR}|g" ${SHAREDIR}/lwpostgis.sql.default > ${SHAREDIR}/lwpostgis.sql sed -e "s|%%LIBDIR%%|${LIBDIR}|g" ${SHAREDIR}/updatedb.default > ${SHAREDIR}/updatedb + chmod 0755 ${SHAREDIR}/updatedb ;; "MESSAGE") msg diff -ruN postgis.old/pkg-message postgis/pkg-message --- postgis.old/pkg-message Thu Jan 13 20:53:39 2005 +++ postgis/pkg-message Mon Jan 31 16:33:01 2005 @@ -1,16 +1,9 @@ ============================================================= -Postgis Installation notes +Postgis Installation note -* The Postgis SQL files had its locations changed. - Now they can be found at PREFIX/share/postgis - -* HTML Documentation was added to this port and can be found - at PREFIX/share/doc/postgis - -* libpostgis.so and libpostgis.so.1 were moved from - PREFIX/lib/postgresql to PREFIX/lib. - Users from older versions (0.9.0 or older), *must* read - PREFIX/share/postgis/UPDATE for instructions. +* The name of the postgis library has changed. + Users from older versions (0.9.1 or older), *must* read + PREFIX/share/postgis/README.upgrade for instructions. ============================================================= diff -ruN postgis.old/pkg-plist postgis/pkg-plist --- postgis.old/pkg-plist Fri Jan 14 07:55:49 2005 +++ postgis/pkg-plist Mon Jan 31 16:33:19 2005 @@ -1,13 +1,10 @@ bin/pgsql2shp bin/shp2pgsql -lib/libpostgis.so -lib/libpostgis.so.0 -%%DATADIR%%/README.postgis -%%DATADIR%%/UPDATE -%%DATADIR%%/postgis.sql.default +lib/liblwgeom.so +lib/liblwgeom.so.1 +%%DATADIR%%/README.upgrade %%DATADIR%%/updatedb.default -%%DATADIR%%/postgis_undef.sql -%%DATADIR%%/spatial_ref_sys.sql +%%DATADIR%%/lwpostgis.sql.default %%PORTDOCS%%@unexec rmdir %D/%%DOCSDIR%% 2>/dev/null || true @unexec rmdir %D/%%DATADIR%% 2>/dev/null || true @unexec rmdir %D/lib 2>/dev/null || true --- postgis.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050131190411.F02FC15340A>