[SCM] PostGIS branch master updated. 3.4.0rc1-752-g14464b4f5

git at osgeo.org git at osgeo.org
Fri Nov 10 15:22:16 PST 2023


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PostGIS".

The branch, master has been updated
       via  14464b4f5b29975f5a26d5b64c43f1f015a60184 (commit)
      from  66be3a66a2d4a4435c1acbce50a67d8629fc38e5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 14464b4f5b29975f5a26d5b64c43f1f015a60184
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Fri Nov 10 13:57:52 2023 -0800

    Detect MacOS and add rpath entries when linking to proj and geos. Works around change in rpath discovery in XCode15+

diff --git a/configure.ac b/configure.ac
index cd47d79be..cd136395f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -809,6 +809,23 @@ fi
 dnl Extract the linker and include flags
 GEOS_LDFLAGS=`$GEOSCONFIG --clibs`
 GEOS_CPPFLAGS=`$GEOSCONFIG --cflags`
+
+#
+# MacOS with XCode > 15 now requires rpath entries for
+# libraries like GEOS/Proj that might be flexibly installed
+# with movability expected
+#
+case $host_os in
+    darwin*)
+				GEOS_RPATH=`echo $GEOS_LDFLAGS | $PERL -nle 'print "$1" if /\-L ?(\S+) /'`
+				AC_MSG_RESULT([checking for GEOS_RPATH under MacOS... $GEOS_RPATH])
+				if test "x$GEOS_RPATH" != "x"; then
+				  # Add the rpath setting to the LDFLAGS
+					GEOS_LDFLAGS="$GEOS_LDFLAGS -Wl,-rpath,$GEOS_RPATH"
+				fi
+				;;
+esac
+
 AC_SUBST([GEOS_LDFLAGS])
 AC_SUBST([GEOS_CPPFLAGS])
 
@@ -954,7 +971,7 @@ elif test ! -z "$PKG_CONFIG"; then
 		[
 			PROJ_CPPFLAGS="$PROJ_CFLAGS"
 			PROJ_LDFLAGS="$PROJ_LIBS"
-			POSTGIS_PROJ_VERSION=`$PKG_CONFIG proj --modversion | sed 's/\([[0-9]]\).*\([[0-9]]\).*\([[0-9]]\)/\1\2/'`
+			POSTGIS_PROJ_VERSION=`$PKG_CONFIG proj --modversion | $PERL -nle 'print "$1$2" if /(\d).*(\d).*(\d)/'`
 		],
 		[
 			PROJ_LDFLAGS="-lproj"
@@ -965,6 +982,23 @@ else
 fi
 
 
+#
+# MacOS with XCode > 15 now requires rpath entries for
+# libraries like GEOS/Proj that might be flexibly installed
+# with movability expected
+#
+case $host_os in
+    darwin*)
+				PROJ_RPATH=`echo $PROJ_LDFLAGS | $PERL -nle 'print "$1" if /\-L ?(\S+) /'`
+				AC_MSG_RESULT([checking for PROJ_RPATH under MacOS... $PROJ_RPATH])
+					if test "x$PROJ_RPATH" != "x"; then
+				  # Add the rpath setting to the LDFLAGS
+					PROJ_LDFLAGS="$PROJ_LDFLAGS -Wl,-rpath,$PROJ_RPATH"
+				fi
+				;;
+esac
+
+
 dnl Check that we can find the proj_api.h header file
 CPPFLAGS_SAVE="$CPPFLAGS"
 CPPFLAGS="$PROJ_CPPFLAGS"
diff --git a/liblwgeom/cunit/Makefile.in b/liblwgeom/cunit/Makefile.in
index a382e2f3a..83fc75baf 100644
--- a/liblwgeom/cunit/Makefile.in
+++ b/liblwgeom/cunit/Makefile.in
@@ -22,7 +22,7 @@ LIBTOOL = @LIBTOOL@
 CUNIT_LDFLAGS=@CUNIT_LDFLAGS@
 CUNIT_CPPFLAGS = -I$(srcdir)/.. -I$(builddir)/.. @CUNIT_CPPFLAGS@ @CPPFLAGS@
 CFLAGS=$(CUNIT_CPPFLAGS) @CFLAGS@
-LDFLAGS = @GEOS_LDFLAGS@ $(CUNIT_LDFLAGS)
+LDFLAGS = @GEOS_LDFLAGS@ @PROJ_LDFLAGS@ $(CUNIT_LDFLAGS)
 
 VPATH = $(srcdir)
 
diff --git a/loader/Makefile.in b/loader/Makefile.in
index 86f274556..c17fbce6b 100644
--- a/loader/Makefile.in
+++ b/loader/Makefile.in
@@ -29,7 +29,7 @@ CFLAGS= -I$(top_srcdir)/liblwgeom -I$(top_builddir)/liblwgeom @CPPFLAGS@ @CFLAGS
 SHELL = @SHELL@
 LIBTOOL = @LIBTOOL@
 
-LDFLAGS = @LDFLAGS@
+LDFLAGS = @LDFLAGS@ @PROJ_LDFLAGS@ @GEOS_LDFLAGS@
 
 # Filenames with extension as determined by the OS
 POSTGIS-CLI=postgis
diff --git a/raster/loader/Makefile.in b/raster/loader/Makefile.in
index 250dac361..a08bbc355 100644
--- a/raster/loader/Makefile.in
+++ b/raster/loader/Makefile.in
@@ -47,6 +47,7 @@ LIBGDAL_CFLAGS=@LIBGDAL_CFLAGS@
 LIBGDAL_LDFLAGS=@LIBGDAL_LDFLAGS@
 LIBGDAL_DEPLIBS_LDFLAGS=@LIBGDAL_DEPLIBS_LDFLAGS@
 PROJ_CFLAGS=@PROJ_CPPFLAGS@
+PROJ_LDFLAGS=@PROJ_LDFLAGS@
 GEOS_CFLAGS=@GEOS_CPPFLAGS@
 GEOS_LDFLAGS=@GEOS_LDFLAGS@
 
@@ -77,6 +78,7 @@ LDFLAGS = \
 	$(LIBGDAL_LDFLAGS) \
 	$(LIBGDAL_DEPLIBS_LDFLAGS) \
 	$(GEOS_LDFLAGS) \
+	$(PROJ_LDFLAGS) \
 	$(GETTEXT_LDFLAGS) \
 	$(ICONV_LDFLAGS)
 
diff --git a/regress/core/regress_buffer_params.sql b/regress/core/regress_buffer_params.sql
index cb239341d..083a16999 100644
--- a/regress/core/regress_buffer_params.sql
+++ b/regress/core/regress_buffer_params.sql
@@ -6,7 +6,7 @@
 -- Ouput is snapped to grid to account for small floating numbers
 -- differences between architectures
 SELECT 'point quadsegs=2', ST_AsText( ST_SnapToGrid(st_buffer('POINT(0 0)', 1, 'quad_segs=2'), 0.0001), 4);
-SELECT 'line quadsegs=2', ST_AsText(st_buffer('LINESTRING(0 0, 10 0)', 2, 'quad_segs=2'), 3);
+SELECT 'line quadsegs=2', ST_AsText( ST_SnapToGrid(st_buffer('LINESTRING(0 0, 10 0)', 2, 'quad_segs=2'), 0.0001), 3);
 SELECT 'line quadsegs=2 endcap=flat', ST_AsText(st_buffer('LINESTRING(0 0, 10 0)', 2, 'quad_segs=2 endcap=flat'), 5);
 SELECT 'line quadsegs=2 endcap=butt', ST_AsText(st_buffer('LINESTRING(0 0, 10 0)', 2, 'quad_segs=2 endcap=butt'), 5);
 SELECT 'line quadsegs=2 endcap=square', ST_AsText(st_buffer('LINESTRING(0 0, 10 0)', 2, 'quad_segs=2 endcap=square'), 5);
diff --git a/regress/core/regress_buffer_params_expected b/regress/core/regress_buffer_params_expected
index d32aa2507..36b5d3724 100644
--- a/regress/core/regress_buffer_params_expected
+++ b/regress/core/regress_buffer_params_expected
@@ -1,5 +1,5 @@
 point quadsegs=2|POLYGON((1 0,0.7071 -0.7071,0 -1,-0.7071 -0.7071,-1 0,-0.7071 0.7071,0 1,0.7071 0.7071,1 0))
-line quadsegs=2|POLYGON((10 2,11.414 1.414,12 0,11.414 -1.414,10 -2,0 -2,-1.414 -1.414,-2 2.449e-16,-1.414 1.414,0 2,10 2))
+line quadsegs=2|POLYGON((10 2,11.414 1.414,12 0,11.414 -1.414,10 -2,0 -2,-1.414 -1.414,-2 0,-1.414 1.414,0 2,10 2))
 line quadsegs=2 endcap=flat|POLYGON((10 2,10 -2,0 -2,0 2,10 2))
 line quadsegs=2 endcap=butt|POLYGON((10 2,10 -2,0 -2,0 2,10 2))
 line quadsegs=2 endcap=square|POLYGON((10 2,12 2,12 -2,0 -2,-2 -2,-2 2,10 2))

-----------------------------------------------------------------------

Summary of changes:
 configure.ac                                | 36 ++++++++++++++++++++++++++++-
 liblwgeom/cunit/Makefile.in                 |  2 +-
 loader/Makefile.in                          |  2 +-
 raster/loader/Makefile.in                   |  2 ++
 regress/core/regress_buffer_params.sql      |  2 +-
 regress/core/regress_buffer_params_expected |  2 +-
 6 files changed, 41 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list