From: Regina Obe Date: Mon, 1 Oct 2018 06:46:33 +0000 (+0000) Subject: Add new configure switch --with-library-minor-version, change default behavior to... X-Git-Tag: 3.0.0alpha1~377 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c6481e5a68501d74d84d25578a7ab7b717d0d0d3;p=postgis Add new configure switch --with-library-minor-version, change default behavior to not include minor version in extension library files. Closes #3807 Also fix link in docs that points to old postgis.org git-svn-id: http://svn.osgeo.org/postgis/trunk@16854 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/NEWS b/NEWS index 4ef99e881..4d61718c2 100644 --- a/NEWS +++ b/NEWS @@ -3,21 +3,21 @@ PostGIS 3.0.0 * Breaking Changes * - #3888, Raster support now available as a separate extension (Sandro Santilli) + - #3807, Extension library files no longer include the minor version. + Use New configure switch --with-library-minor-version + if you need the old behavior (Regina Obe) + * New Features * - #2902, postgis_geos_noop (Sandro Santilli) - #4128, ST_AsMVT support for Feature ID (Stepan Kuzmin) + * Enhancements and fixes * - #4153, ST_Segmentize now splits segments proportionally (Darafei Praliaskouski). - #4162, ST_DWithin documentation examples for storing geometry and radius in table (Darafei Praliaskouski, github user Boscop). - - #4163, MVT: Fix resource leak when the first geometry is NULL (Raúl Marín) - #4161, MVT: Drop geometries smaller than the resolution (Raúl Marín) - - #4172, Fix memory leak in lwgeom_offsetcurve (Raúl Marín) - - #4173, Fix undefined behaviour in ptarray_segmentize2d (Raúl Marín) - #4176, ST_Intersects supports GEOMETRYCOLLECTION (Darafei Praliaskouski) - - #4177, Postgres 12 disallows variable length arrays in C (Laurenz Albe) - - #4160, Use qualified names in topology extension install (Raúl Marín) - #4181, St_AsMVTGeom: Avoid type changes due to validation (Raúl Marín) PostGIS 2.5.0 diff --git a/configure.ac b/configure.ac index 913271d41..645dd710f 100644 --- a/configure.ac +++ b/configure.ac @@ -106,6 +106,27 @@ AC_SUBST([POSTGIS_MAJOR_VERSION]) AC_SUBST([POSTGIS_MINOR_VERSION]) AC_SUBST([POSTGIS_MICRO_VERSION]) +dnl ===================================================== +dnl Include minor version in postgis extension libraries +dnl ===================================================== +LIBINCLUDEMINORVERSION="no" +AC_ARG_WITH([library-minor-version], + [AS_HELP_STRING([--without-interrupt-tests], + [Disable the interrupt tests (for CI servers)])], + [], []) + +AC_ARG_WITH([library-minor-version], + [AS_HELP_STRING([--with-library-minor-version], + [Include minor version in the PostgreSQL PostGIS library files])], + [LIBINCLUDEMINORVERSION="yes"], []) + +if test "x$with-library-minor-version" = "xno"; then + LIBINCLUDEMINORVERSION="no" +fi + +AC_SUBST([LIBINCLUDEMINORVERSION]) + + dnl dnl Liblwgeom version information imported from Version.config dnl @@ -1493,11 +1514,16 @@ AC_MSG_RESULT([ C compiler: ${CC} ${CFLAGS}]) AC_MSG_RESULT([ SQL preprocessor: ${SQLPP}]) AC_MSG_RESULT() AC_MSG_RESULT([ -------------- Additional Info ------------- ]) +if test "x$LIBINCLUDEMINORVERSION" = "xyes"; then + AC_MSG_RESULT([ POSTGIS lib file includes minor: ENABLED]) +fi + if test "x$INTERRUPTTESTS" = "xyes"; then AC_MSG_RESULT([ Interrupt Tests: ENABLED]) else AC_MSG_RESULT([ Interrupt Tests: DISABLED use: --with-interrupt-tests to enable]) fi + AC_MSG_RESULT() AC_MSG_RESULT([ -------------- Dependencies -------------- ]) AC_MSG_RESULT([ GEOS config: ${GEOSCONFIG}]) diff --git a/doc/installation.xml b/doc/installation.xml index db15ebf75..619572848 100644 --- a/doc/installation.xml +++ b/doc/installation.xml @@ -223,7 +223,7 @@ psql -d yourdatabase -f sfcgal_comments.sql - SFCGAL, version 1.1 (or higher) could be used to provide additional 2D and 3D advanced analysis functions to PostGIS cf . And also allow to use SFCGAL rather than GEOS for some 2D functions provided by both backends (like ST_Intersection or ST_Area, for instance). A PostgreSQL configuration variable postgis.backend allow end user to control which backend he want to use if SFCGAL is installed (GEOS by default). Nota: SFCGAL 1.2 require at least CGAL 4.3 and Boost 1.54 (cf: http://oslandia.github.io/SFCGAL/installation.html) + SFCGAL, version 1.1 (or higher) could be used to provide additional 2D and 3D advanced analysis functions to PostGIS cf . And also allow to use SFCGAL rather than GEOS for some 2D functions provided by both backends (like ST_Intersection or ST_Area, for instance). A PostgreSQL configuration variable postgis.backend allow end user to control which backend he want to use if SFCGAL is installed (GEOS by default). Nota: SFCGAL 1.2 require at least CGAL 4.3 and Boost 1.54 (cf: http://oslandia.github.io/SFCGAL/installation.html) https://github.com/Oslandia/SFCGAL. @@ -337,8 +337,8 @@ tar -xvzf postgis-&last_release_version;.tar.gz This section includes general compilation instructions, if you are compiling for Windows etc or another OS, you may find additional more detailed help at PostGIS User contributed compile guides and PostGIS Dev Wiki. Pre-Built Packages for various OS are listed in PostGIS Pre-built Packages - If you are a windows user, you can get stable builds via Stackbuilder or PostGIS Windows download site - We also have very bleeding-edge windows experimental builds that are built usually once or twice a week or whenever anything exciting happens. You can + If you are a windows user, you can get stable builds via Stackbuilder or PostGIS Windows download site + We also have very bleeding-edge windows experimental builds that are built usually once or twice a week or whenever anything exciting happens. You can use these to experiment with the in progress releases of PostGIS @@ -402,7 +402,6 @@ tar -xvzf postgis-&last_release_version;.tar.gz several parameters for those who have the required libraries and programs in non-standard locations. - The following list shows only the most commonly used parameters. For a complete list, use the --help or @@ -411,11 +410,26 @@ tar -xvzf postgis-&last_release_version;.tar.gz + --with-library-minor-version + + Starting with PostGIS 3.0, the library files generated by default will no longer have the minor version + as part of the file name. This means all PostGIS 3 libs will end in postgis-3. + This was done to make pg_upgrade easier, with downside that you can only install + one version PostGIS 3 series in your server. + To get the old behavior of file including the minor version: e.g. postgis-3.0 + add this switch to your configure statement. + + + + + + + --prefix=PREFIX - This is the location the PostGIS libraries and SQL scripts will be - installed to. By default, this location is the same as the + This is the location the PostGIS loader executables and shared libs will be installed. + By default, this location is the same as the detected PostgreSQL installation. diff --git a/extensions/postgis/Makefile.in b/extensions/postgis/Makefile.in index 5a2f7993b..85a2ec90f 100644 --- a/extensions/postgis/Makefile.in +++ b/extensions/postgis/Makefile.in @@ -3,7 +3,11 @@ include ../upgradeable_versions.mk EXTENSION = postgis EXTVERSION = @POSTGIS_LIB_VERSION@ MINORVERSION = @POSTGIS_MAJOR_VERSION@.@POSTGIS_MINOR_VERSION@ -MODULEPATH = $$libdir/$(EXTENSION)-$(MINORVERSION) +MODULEPATH = $$libdir/$(EXTENSION)-@POSTGIS_MAJOR_VERSION@ + +ifeq (@LIBINCLUDEMINORVERSION@,yes) +MODULEPATH=$$libdir/$(EXTENSION)-$(MINORVERSION) +endif GREP = @GREP@ MICRO_NUMBER = $(shell echo $(EXTVERSION) | \ diff --git a/extensions/postgis_raster/Makefile.in b/extensions/postgis_raster/Makefile.in index 2d215b890..0a726597e 100644 --- a/extensions/postgis_raster/Makefile.in +++ b/extensions/postgis_raster/Makefile.in @@ -3,7 +3,11 @@ include ../upgradeable_versions.mk EXTENSION = postgis_raster EXTVERSION = @POSTGIS_LIB_VERSION@ MINORVERSION = @POSTGIS_MAJOR_VERSION@.@POSTGIS_MINOR_VERSION@ -MODULEPATH = $$libdir/$(EXTENSION)-$(MINORVERSION) +MODULEPATH = $$libdir/$(EXTENSION)-@POSTGIS_MAJOR_VERSION@ + +ifeq (@LIBINCLUDEMINORVERSION@,yes) +MODULEPATH=$$libdir/$(EXTENSION)-$(MINORVERSION) +endif GREP = @GREP@ MICRO_NUMBER = $(shell echo $(EXTVERSION) | \ diff --git a/extensions/postgis_sfcgal/Makefile.in b/extensions/postgis_sfcgal/Makefile.in index 7938e6726..4fd33122b 100644 --- a/extensions/postgis_sfcgal/Makefile.in +++ b/extensions/postgis_sfcgal/Makefile.in @@ -3,6 +3,7 @@ include ../upgradeable_versions.mk EXTENSION = postgis_sfcgal EXTVERSION = @POSTGIS_LIB_VERSION@ MINORVERSION = @POSTGIS_MAJOR_VERSION@.@POSTGIS_MINOR_VERSION@ + GREP = @GREP@ MICRO_NUMBER = $(shell echo $(EXTVERSION) | \ diff --git a/extensions/postgis_topology/Makefile.in b/extensions/postgis_topology/Makefile.in index 532e3965d..5fa959fca 100644 --- a/extensions/postgis_topology/Makefile.in +++ b/extensions/postgis_topology/Makefile.in @@ -3,6 +3,11 @@ include ../upgradeable_versions.mk EXTENSION = postgis_topology EXTVERSION = @POSTGIS_LIB_VERSION@ MINORVERSION = @POSTGIS_MAJOR_VERSION@.@POSTGIS_MINOR_VERSION@ +MODULEPATH = $$libdir/$(EXTENSION)-@POSTGIS_MAJOR_VERSION@ + +ifeq (@LIBINCLUDEMINORVERSION@,yes) +MODULEPATH=$$libdir/$(EXTENSION)-$(MINORVERSION) +endif GREP = @GREP@ MICRO_NUMBER = $(shell echo $(EXTVERSION) | sed "s/[0-9]\.[0-9]\.\([0-9]*\)[a-zA-Z]*[0-9]*/\1/") diff --git a/postgis/Makefile.in b/postgis/Makefile.in index c6b5fe7ec..49736eec3 100644 --- a/postgis/Makefile.in +++ b/postgis/Makefile.in @@ -23,8 +23,18 @@ # ********************************************************************** POSTGIS_PGSQL_VERSION=@POSTGIS_PGSQL_VERSION@ +MODULE_big=postgis-@POSTGIS_MAJOR_VERSION@ +MODULEDIR=contrib/postgis-@POSTGIS_MAJOR_VERSION@.@POSTGIS_MINOR_VERSION@ +MODULEPATH = $$libdir/postgis-@POSTGIS_MAJOR_VERSION@ + +ifeq (@LIBINCLUDEMINORVERSION@,yes) +MODULEPATH=$$libdir/postgis-@POSTGIS_MAJOR_VERSION@.@POSTGIS_MINOR_VERSION@ MODULE_big=postgis-@POSTGIS_MAJOR_VERSION@.@POSTGIS_MINOR_VERSION@ -MODULEDIR=contrib/$(MODULE_big) +endif + +ifeq (@HAVE_BRIN@,yes) +BRIN_OBJ= brin_2d.o brin_nd.o brin_common.o +endif # Files to be copied to the contrib/ directory SQL_built=postgis.sql postgis_for_extension.sql uninstall_postgis.sql postgis_upgrade.sql postgis_upgrade_for_extension.sql postgis_proc_set_search_path.sql legacy.sql uninstall_legacy.sql legacy_minimal.sql legacy_gist.sql @@ -212,7 +222,7 @@ endif # replace @extschema@. with nothing, this is only used as placeholder for extension install %.sql: %.sql.in $(SQLPP) -I../libpgcommon $< | grep -v '^#' | \ - $(PERL) -lpe "s'MODULE_PATHNAME'\$$libdir/postgis-@POSTGIS_MAJOR_VERSION@.@POSTGIS_MINOR_VERSION@'g;s'@extschema@\.''g" > $@ + $(PERL) -lpe "s'MODULE_PATHNAME'\$(MODULEPATH)'g;s'@extschema@\.''g" > $@ postgis_upgrade_for_extension.sql: postgis_drop_before.sql postgis_upgrade_for_extension.sql.in postgis_drop_after.sql #strip BEGIN/COMMIT since these are not allowed in extensions @@ -222,7 +232,7 @@ postgis_upgrade_for_extension.sql: postgis_drop_before.sql postgis_upgrade_for_e postgis_for_extension.sql: postgis.sql.in $(SQLPP) -I../libpgcommon $< | grep -v '^#' | \ $(PERL) -lpe \ - "s'MODULE_PATHNAME'\$$libdir/postgis-@POSTGIS_MAJOR_VERSION@.@POSTGIS_MINOR_VERSION@'g" \ + "s'MODULE_PATHNAME'\$(MODULEPATH)'g" \ | $(PERL) -pe 's/BEGIN\;//g ; s/COMMIT\;//g' > $@ #this is redundant but trying to fold in with extension just hangs diff --git a/raster/rt_pg/Makefile.in b/raster/rt_pg/Makefile.in index 4197b8c33..0d939e4a2 100644 --- a/raster/rt_pg/Makefile.in +++ b/raster/rt_pg/Makefile.in @@ -19,9 +19,14 @@ ############################################################################# POSTGIS_PGSQL_VERSION=@POSTGIS_PGSQL_VERSION@ +MODULE_big=rtpostgis-@POSTGIS_MAJOR_VERSION@ +MODULEDIR=contrib/postgis-@POSTGIS_MAJOR_VERSION@.@POSTGIS_MINOR_VERSION@ +MODULEPATH = $$libdir/rtpostgis-@POSTGIS_MAJOR_VERSION@ +ifeq (@LIBINCLUDEMINORVERSION@,yes) +MODULEPATH=$$libdir/rtpostgis-@POSTGIS_MAJOR_VERSION@.@POSTGIS_MINOR_VERSION@ MODULE_big=rtpostgis-@POSTGIS_MAJOR_VERSION@.@POSTGIS_MINOR_VERSION@ -MODULEDIR=contrib/postgis-@POSTGIS_MAJOR_VERSION@.@POSTGIS_MINOR_VERSION@ +endif # Files to be copied to the contrib/ directory DATA_built=rtpostgis.sql rtpostgis_for_extension.sql rtpostgis_upgrade_for_extension.sql rtpostgis_upgrade.sql rtpostgis_proc_set_search_path.sql uninstall_rtpostgis.sql rtpostgis_legacy.sql @@ -106,11 +111,11 @@ endif # replace @extschema@. with nothing, this is only used as placeholder for extension install %.sql: %.sql.in $(SQLPP) -I../../postgis/ -I../../ $< | grep -v '^#' | \ - $(PERL) -lpe "s'MODULE_PATHNAME'\$$libdir/rtpostgis-@POSTGIS_MAJOR_VERSION@.@POSTGIS_MINOR_VERSION@'g;s'@extschema@\.''g" > $@ + $(PERL) -lpe "s'MODULE_PATHNAME'\$(MODULEPATH)'g;s'@extschema@\.''g" > $@ rtpostgis_for_extension.sql: rtpostgis.sql.in $(SQLPP) -I../../postgis/ -I../../ $< | grep -v '^#' | \ - $(PERL) -lpe "s'MODULE_PATHNAME'\$$libdir/rtpostgis-@POSTGIS_MAJOR_VERSION@.@POSTGIS_MINOR_VERSION@'g" > $@ + $(PERL) -lpe "s'MODULE_PATHNAME'\$(MODULEPATH)'g" > $@ ../../liblwgeom/.libs/liblwgeom.a: $(MAKE) -C ../../liblwgeom diff --git a/topology/Makefile.in b/topology/Makefile.in index 4f89fbaef..445f2bea2 100644 --- a/topology/Makefile.in +++ b/topology/Makefile.in @@ -2,7 +2,7 @@ # * # * PostGIS - Spatial Types for PostgreSQL # * http://postgis.net -# * +# * # * Copyright (C) 2010-2011 Sandro Santilli # * Copyright (C) 2008 Mark Cave-Ayland # * Copyright (C) 2005 Refractions Research Inc. @@ -18,8 +18,14 @@ POSTGIS_PGSQL_VERSION=@POSTGIS_PGSQL_VERSION@ -MODULE_big=postgis_topology-@POSTGIS_MAJOR_VERSION@.@POSTGIS_MINOR_VERSION@ +MODULE_big=postgis_topology-@POSTGIS_MAJOR_VERSION@ MODULEDIR=contrib/postgis-@POSTGIS_MAJOR_VERSION@.@POSTGIS_MINOR_VERSION@ +MODULEPATH = $$libdir/rtpostgis-@POSTGIS_MAJOR_VERSION@ + +ifeq (@LIBINCLUDEMINORVERSION@,yes) +MODULEPATH=$$libdir/postgis_topology-@POSTGIS_MAJOR_VERSION@.@POSTGIS_MINOR_VERSION@ +MODULE_big=postgis_topology--@POSTGIS_MAJOR_VERSION@.@POSTGIS_MINOR_VERSION@ +endif # Files to be copied to the contrib/ directory DATA_built=topology.sql topology_upgrade.sql uninstall_topology.sql @@ -58,7 +64,7 @@ endif EXTRA_CLEAN=$(SQL_OBJS) topology_upgrade.sql.in # PGXS information -PG_CONFIG = @PG_CONFIG@ +PG_CONFIG = @PG_CONFIG@ PGXS := @PGXS@ # NO_TEMP_INSTALL is a workaround for a 9.5dev bug. See: # http://www.postgresql.org/message-id/CAB7nPqTsR5o3g-fBi6jbsVdhfPiLFWQ_0cGU5=94Rv_8W3qvFA@mail.gmail.com @@ -86,7 +92,7 @@ endif -# Generate any .sql file from .sql.in.c files by running them through the SQL pre-processor +# Generate any .sql file from .sql.in.c files by running them through the SQL pre-processor %.sql: %.sql.in $(SQLPP) $< | grep -v '^#' | \ $(PERL) -lpe "s'MODULE_PATHNAME'\$$libdir/postgis_topology-@POSTGIS_MAJOR_VERSION@.@POSTGIS_MINOR_VERSION@'g" > $@ @@ -124,7 +130,7 @@ topology.sql: \ ../postgis/sqldefines.h \ ../postgis_svn_revision.h -uninstall_topology.sql: topology.sql ../utils/create_undef.pl +uninstall_topology.sql: topology.sql ../utils/create_undef.pl $(PERL) ../utils/create_undef.pl $< $(POSTGIS_PGSQL_VERSION) > $@ check: topology.sql