[postgis-tickets] r16854 - Add new configure switch --with-library-minor-version, change default behavior to not include minor version in extension library files.

Regina Obe lr at pcorp.us
Sun Sep 30 11:46:33 PDT 2018


Author: robe
Date: 2018-09-30 23:46:33 -0700 (Sun, 30 Sep 2018)
New Revision: 16854

Modified:
   trunk/NEWS
   trunk/configure.ac
   trunk/doc/installation.xml
   trunk/extensions/postgis/Makefile.in
   trunk/extensions/postgis_raster/Makefile.in
   trunk/extensions/postgis_sfcgal/Makefile.in
   trunk/extensions/postgis_topology/Makefile.in
   trunk/postgis/Makefile.in
   trunk/raster/rt_pg/Makefile.in
   trunk/topology/Makefile.in
Log:
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

Modified: trunk/NEWS
===================================================================
--- trunk/NEWS	2018-10-01 06:05:56 UTC (rev 16853)
+++ trunk/NEWS	2018-10-01 06:46:33 UTC (rev 16854)
@@ -3,21 +3,21 @@
 * 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

Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac	2018-10-01 06:05:56 UTC (rev 16853)
+++ trunk/configure.ac	2018-10-01 06:46:33 UTC (rev 16854)
@@ -106,6 +106,27 @@
 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([  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}])

Modified: trunk/doc/installation.xml
===================================================================
--- trunk/doc/installation.xml	2018-10-01 06:05:56 UTC (rev 16853)
+++ trunk/doc/installation.xml	2018-10-01 06:46:33 UTC (rev 16854)
@@ -223,7 +223,7 @@
 
 	  <listitem>
 		<para>
-                  SFCGAL, version 1.1 (or higher) could be used to provide additional 2D and 3D advanced analysis functions to PostGIS cf <xref linkend="reference_sfcgal" />. 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 <code>postgis.backend</code> 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: <ulink url="http://oslandia.github.io/SFCGAL/installation.html">http://oslandia.github.io/SFCGAL/installation.html</ulink>)
+			SFCGAL, version 1.1 (or higher) could be used to provide additional 2D and 3D advanced analysis functions to PostGIS cf <xref linkend="reference_sfcgal" />. 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 <code>postgis.backend</code> 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: <ulink url="http://oslandia.github.io/SFCGAL/installation.html">http://oslandia.github.io/SFCGAL/installation.html</ulink>)
 
 		  <ulink url="https://github.com/Oslandia/SFCGAL">https://github.com/Oslandia/SFCGAL</ulink>.
 		</para>
@@ -337,8 +337,8 @@
 	  <para>This section includes general compilation instructions, if you are compiling for Windows etc
 		or another OS, you may find additional more detailed help at <ulink url="http://trac.osgeo.org/postgis/wiki/UsersWikiInstall">PostGIS User contributed compile guides</ulink> and <ulink url="http://trac.osgeo.org/postgis/wiki/DevWikiMain">PostGIS Dev Wiki</ulink>.</para>
 	  <para>Pre-Built Packages for various OS are listed in <ulink url="http://trac.osgeo.org/postgis/wiki/UsersWikiPackages">PostGIS Pre-built Packages</ulink></para>
-	  <para>If you are a windows user, you can get stable builds via Stackbuilder or <ulink url="http://www.postgis.org/download/windows/">PostGIS Windows download site</ulink>
-	  We also have <ulink url="http://www.postgis.org/download/windows/experimental.php">very bleeding-edge windows experimental builds</ulink> that are built usually once or twice a week or whenever anything exciting happens.  You can
+	  <para>If you are a windows user, you can get stable builds via Stackbuilder or <ulink url="https://postgis.net/windows_downloads">PostGIS Windows download site</ulink>
+	  We also have <ulink url="https://postgis.net/windows_downloads">very bleeding-edge windows experimental builds</ulink> 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</para>
 	</note>
 
@@ -402,7 +402,6 @@
 		several parameters for those who have the required libraries and
 		programs in non-standard locations.
 	  </para>
-
 	  <para>
 		The following list shows only the most commonly used parameters. For a
 		complete list, use the <command>--help</command> or
@@ -411,11 +410,26 @@
 
 	  <variablelist>
 		<varlistentry>
+		  <term><command>--with-library-minor-version</command></term>
+		  <listitem>
+			<para>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 <code>postgis-3</code>.
+			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. <code>postgis-3.0</code>
+			add this switch to your configure statement.</para>
+
+		  </listitem>
+		</varlistentry>
+
+
+		<varlistentry>
+
 		  <term><command>--prefix=PREFIX</command></term>
 		  <listitem>
 			<para>
-			  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.
 			</para>
 

Modified: trunk/extensions/postgis/Makefile.in
===================================================================
--- trunk/extensions/postgis/Makefile.in	2018-10-01 06:05:56 UTC (rev 16853)
+++ trunk/extensions/postgis/Makefile.in	2018-10-01 06:46:33 UTC (rev 16854)
@@ -3,7 +3,11 @@
 EXTENSION     = postgis
 EXTVERSION    = @POSTGIS_LIB_VERSION@
 MINORVERSION  = @POSTGIS_MAJOR_VERSION at .@POSTGIS_MINOR_VERSION@
-MODULEPATH    = $$libdir/$(EXTENSION)-$(MINORVERSION)
+MODULEPATH    = $$libdir/$(EXTENSION)- at POSTGIS_MAJOR_VERSION@
+
+ifeq (@LIBINCLUDEMINORVERSION@,yes)
+MODULEPATH=$$libdir/$(EXTENSION)-$(MINORVERSION)
+endif
 GREP = @GREP@
 
 MICRO_NUMBER  = $(shell echo $(EXTVERSION) | \

Modified: trunk/extensions/postgis_raster/Makefile.in
===================================================================
--- trunk/extensions/postgis_raster/Makefile.in	2018-10-01 06:05:56 UTC (rev 16853)
+++ trunk/extensions/postgis_raster/Makefile.in	2018-10-01 06:46:33 UTC (rev 16854)
@@ -3,7 +3,11 @@
 EXTENSION     = postgis_raster
 EXTVERSION    = @POSTGIS_LIB_VERSION@
 MINORVERSION  = @POSTGIS_MAJOR_VERSION at .@POSTGIS_MINOR_VERSION@
-MODULEPATH    = $$libdir/$(EXTENSION)-$(MINORVERSION)
+MODULEPATH    = $$libdir/$(EXTENSION)- at POSTGIS_MAJOR_VERSION@
+
+ifeq (@LIBINCLUDEMINORVERSION@,yes)
+MODULEPATH=$$libdir/$(EXTENSION)-$(MINORVERSION)
+endif
 GREP = @GREP@
 
 MICRO_NUMBER  = $(shell echo $(EXTVERSION) | \

Modified: trunk/extensions/postgis_sfcgal/Makefile.in
===================================================================
--- trunk/extensions/postgis_sfcgal/Makefile.in	2018-10-01 06:05:56 UTC (rev 16853)
+++ trunk/extensions/postgis_sfcgal/Makefile.in	2018-10-01 06:46:33 UTC (rev 16854)
@@ -3,6 +3,7 @@
 EXTENSION    = postgis_sfcgal
 EXTVERSION    = @POSTGIS_LIB_VERSION@
 MINORVERSION  = @POSTGIS_MAJOR_VERSION at .@POSTGIS_MINOR_VERSION@
+
 GREP = @GREP@
 
 MICRO_NUMBER  = $(shell echo $(EXTVERSION) | \

Modified: trunk/extensions/postgis_topology/Makefile.in
===================================================================
--- trunk/extensions/postgis_topology/Makefile.in	2018-10-01 06:05:56 UTC (rev 16853)
+++ trunk/extensions/postgis_topology/Makefile.in	2018-10-01 06:46:33 UTC (rev 16854)
@@ -3,6 +3,11 @@
 EXTENSION     = postgis_topology
 EXTVERSION    = @POSTGIS_LIB_VERSION@
 MINORVERSION  = @POSTGIS_MAJOR_VERSION at .@POSTGIS_MINOR_VERSION@
+MODULEPATH    = $$libdir/$(EXTENSION)- at 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/")

Modified: trunk/postgis/Makefile.in
===================================================================
--- trunk/postgis/Makefile.in	2018-10-01 06:05:56 UTC (rev 16853)
+++ trunk/postgis/Makefile.in	2018-10-01 06:46:33 UTC (rev 16854)
@@ -23,9 +23,19 @@
 # **********************************************************************
 
 POSTGIS_PGSQL_VERSION=@POSTGIS_PGSQL_VERSION@
+MODULE_big=postgis- at POSTGIS_MAJOR_VERSION@
+MODULEDIR=contrib/postgis- at POSTGIS_MAJOR_VERSION@. at POSTGIS_MINOR_VERSION@
+MODULEPATH    = $$libdir/postgis- at POSTGIS_MAJOR_VERSION@
+
+ifeq (@LIBINCLUDEMINORVERSION@,yes)
+MODULEPATH=$$libdir/postgis- at POSTGIS_MAJOR_VERSION@. at POSTGIS_MINOR_VERSION@
 MODULE_big=postgis- at POSTGIS_MAJOR_VERSION@. at 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
 DATA=../spatial_ref_sys.sql
@@ -212,7 +222,7 @@
 # replace @extschema at . 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- at POSTGIS_MAJOR_VERSION@. at 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_for_extension.sql: postgis.sql.in
 	$(SQLPP) -I../libpgcommon $< | grep -v '^#' | \
 	$(PERL) -lpe \
-		"s'MODULE_PATHNAME'\$$libdir/postgis- at POSTGIS_MAJOR_VERSION@. at 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

Modified: trunk/raster/rt_pg/Makefile.in
===================================================================
--- trunk/raster/rt_pg/Makefile.in	2018-10-01 06:05:56 UTC (rev 16853)
+++ trunk/raster/rt_pg/Makefile.in	2018-10-01 06:46:33 UTC (rev 16854)
@@ -19,9 +19,14 @@
 #############################################################################
 
 POSTGIS_PGSQL_VERSION=@POSTGIS_PGSQL_VERSION@
+MODULE_big=rtpostgis- at POSTGIS_MAJOR_VERSION@
+MODULEDIR=contrib/postgis- at POSTGIS_MAJOR_VERSION@. at POSTGIS_MINOR_VERSION@
+MODULEPATH    = $$libdir/rtpostgis- at POSTGIS_MAJOR_VERSION@
 
+ifeq (@LIBINCLUDEMINORVERSION@,yes)
+MODULEPATH=$$libdir/rtpostgis- at POSTGIS_MAJOR_VERSION@. at POSTGIS_MINOR_VERSION@
 MODULE_big=rtpostgis- at POSTGIS_MAJOR_VERSION@. at POSTGIS_MINOR_VERSION@
-MODULEDIR=contrib/postgis- at POSTGIS_MAJOR_VERSION@. at 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 @@
 # replace @extschema at . 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- at POSTGIS_MAJOR_VERSION@. at 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- at POSTGIS_MAJOR_VERSION@. at POSTGIS_MINOR_VERSION@'g" > $@
+	$(PERL) -lpe "s'MODULE_PATHNAME'\$(MODULEPATH)'g" > $@
 
 ../../liblwgeom/.libs/liblwgeom.a:
 	$(MAKE) -C ../../liblwgeom

Modified: trunk/topology/Makefile.in
===================================================================
--- trunk/topology/Makefile.in	2018-10-01 06:05:56 UTC (rev 16853)
+++ trunk/topology/Makefile.in	2018-10-01 06:46:33 UTC (rev 16854)
@@ -2,7 +2,7 @@
 # *
 # * PostGIS - Spatial Types for PostgreSQL
 # * http://postgis.net
-# * 
+# *
 # * Copyright (C) 2010-2011 Sandro Santilli <strk at kbt.io>
 # * Copyright (C) 2008 Mark Cave-Ayland
 # * Copyright (C) 2005 Refractions Research Inc.
@@ -18,9 +18,15 @@
 
 POSTGIS_PGSQL_VERSION=@POSTGIS_PGSQL_VERSION@
 
-MODULE_big=postgis_topology- at POSTGIS_MAJOR_VERSION@. at POSTGIS_MINOR_VERSION@
+MODULE_big=postgis_topology- at POSTGIS_MAJOR_VERSION@
 MODULEDIR=contrib/postgis- at POSTGIS_MAJOR_VERSION@. at POSTGIS_MINOR_VERSION@
+MODULEPATH    = $$libdir/rtpostgis- at POSTGIS_MAJOR_VERSION@
 
+ifeq (@LIBINCLUDEMINORVERSION@,yes)
+MODULEPATH=$$libdir/postgis_topology- at POSTGIS_MAJOR_VERSION@. at POSTGIS_MINOR_VERSION@
+MODULE_big=postgis_topology-- at POSTGIS_MAJOR_VERSION@. at 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 @@
 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 @@
 
 
 
-# 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- at POSTGIS_MAJOR_VERSION@. at POSTGIS_MINOR_VERSION@'g" > $@
@@ -124,7 +130,7 @@
 	../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



More information about the postgis-tickets mailing list