All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [git commit] package/postgis: add optional dependency on gdal
@ 2022-07-27 13:23 Thomas Petazzoni via buildroot
  0 siblings, 0 replies; only message in thread
From: Thomas Petazzoni via buildroot @ 2022-07-27 13:23 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=b9a38a42ac817b963be2b4b51d218c5eabb1059d
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

With the gdal package added, we can add optional support for gdal in
postgis. This needs a small patch, which is in fact similar to the
existing patch, just for a different part of the postgis source
code. This new patch has been submitted upstream.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 ...er-Makefile.in-do-not-force-static-linkin.patch | 35 ++++++++++++++++++++++
 package/postgis/postgis.mk                         | 10 +++++--
 2 files changed, 43 insertions(+), 2 deletions(-)

diff --git a/package/postgis/0002-raster-loader-Makefile.in-do-not-force-static-linkin.patch b/package/postgis/0002-raster-loader-Makefile.in-do-not-force-static-linkin.patch
new file mode 100644
index 0000000000..756a7c10dd
--- /dev/null
+++ b/package/postgis/0002-raster-loader-Makefile.in-do-not-force-static-linkin.patch
@@ -0,0 +1,35 @@
+From 29c33c483e22a4445d870739187d128df0f11f60 Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
+Date: Wed, 27 Jul 2022 15:12:40 +0200
+Subject: [PATCH] raster/loader/Makefile.in: do not force static linking
+
+This is similar to commit
+https://github.com/postgis/postgis/commit/98070faad220e12fcaed9a583a70a37c510b7c6b,
+but applied to raster/loader. It ensures that if only shared variants
+of the libraries are available, the link still works. If you force
+-static and only shared variants of some of the libraries are
+available, the link fails with "d: attempted static link of dynamic
+object XYZ".
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
+Upstream: https://github.com/postgis/postgis/pull/702
+---
+ raster/loader/Makefile.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/raster/loader/Makefile.in b/raster/loader/Makefile.in
+index 3df47a96f..d0a408333 100644
+--- a/raster/loader/Makefile.in
++++ b/raster/loader/Makefile.in
+@@ -36,7 +36,7 @@ PGSQL_BINDIR=@PGSQL_BINDIR@
+ 
+ RT_CORE=../rt_core
+ 
+-LIBLWGEOM_LDFLAGS= -static ../../liblwgeom/liblwgeom.la
++LIBLWGEOM_LDFLAGS= ../../liblwgeom/liblwgeom.la
+ LIBLWGEOM_CFLAGS=-I../../liblwgeom
+ LIBGDAL_CFLAGS=@LIBGDAL_CFLAGS@
+ LIBGDAL_LDFLAGS=@LIBGDAL_LDFLAGS@
+-- 
+2.37.1
+
diff --git a/package/postgis/postgis.mk b/package/postgis/postgis.mk
index 652e7951ae..1b5a7bc3ad 100644
--- a/package/postgis/postgis.mk
+++ b/package/postgis/postgis.mk
@@ -19,8 +19,7 @@ POSTGIS_DEPENDENCIES = postgresql libgeos proj libxml2
 POSTGIS_CONF_OPTS += \
 	--with-pgconfig=$(STAGING_DIR)/usr/bin/pg_config \
 	--with-geosconfig=$(STAGING_DIR)/usr/bin/geos-config \
-	--with-xml2config=$(STAGING_DIR)/usr/bin/xml2-config \
-	--without-raster
+	--with-xml2config=$(STAGING_DIR)/usr/bin/xml2-config
 
 ifeq ($(BR2_PACKAGE_JSON_C),y)
 POSTGIS_DEPENDENCIES += json-c
@@ -29,6 +28,13 @@ else
 POSTGIS_CONF_OPTS += --without-json
 endif
 
+ifeq ($(BR2_PACKAGE_GDAL),y)
+POSTGIS_DEPENDENCIES += gdal
+POSTGIS_CONF_OPTS += --with-raster --with-gdalconfig=$(STAGING_DIR)/usr/bin/gdal-config
+else
+POSTGIS_CONF_OPTS += --without-raster
+endif
+
 ifeq ($(BR2_PACKAGE_PCRE),y)
 POSTGIS_DEPENDENCIES += pcre
 endif
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-07-27 13:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-27 13:23 [Buildroot] [git commit] package/postgis: add optional dependency on gdal Thomas Petazzoni via buildroot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.