[postgis-tickets] [SCM] PostGIS branch master updated. 3.3.0rc2-988-g9ec3f4bc5
git at osgeo.org
git at osgeo.org
Tue Jun 20 06:52:59 PDT 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 9ec3f4bc526e44bc2e2afa530f5cc8cf238d366a (commit)
from f86792b860f07adf71cef551e227924e0938a305 (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 9ec3f4bc526e44bc2e2afa530f5cc8cf238d366a
Author: Sandro Santilli <strk at kbt.io>
Date: Tue Jun 20 10:46:32 2023 +0200
Allow building commandline tools without PostgreSQL
Closes #5177
Have woodie guard after this
diff --git a/.woodpecker/tools.yml b/.woodpecker/tools.yml
new file mode 100644
index 000000000..5c3a417f2
--- /dev/null
+++ b/.woodpecker/tools.yml
@@ -0,0 +1,13 @@
+pipeline:
+ build:
+ image: docker.osgeo.org/postgis/build-test:trisquel3
+ commands:
+ - ./autogen.sh
+ - ./configure --without-pgconfig --prefix=/tmp/pgx
+ - make
+ - make check
+ - make install
+ - /tmp/pgx/bin/postgis help
+ - /tmp/pgx/bin/shp2pgsql
+ - /tmp/pgx/bin/raster2pgsql
+
diff --git a/GNUmakefile.in b/GNUmakefile.in
index 34afbc372..7e8b1a698 100644
--- a/GNUmakefile.in
+++ b/GNUmakefile.in
@@ -4,9 +4,9 @@
#
#-----------------------------------------------------
-SUBDIRS = liblwgeom
+SUBDIRS = liblwgeom @RASTER@ loader
ifeq (@LIBLWGEOM_ONLY@,no)
-SUBDIRS += @DEPS_SUBDIR@ libpgcommon postgis regress @RASTER@ @TOPOLOGY@ @SFCGAL@ loader utils doc @EXTENSIONS@
+SUBDIRS += @DEPS_SUBDIR@ libpgcommon postgis regress @TOPOLOGY@ @SFCGAL@ utils doc @EXTENSIONS@
endif
HAVE_SFCGAL=@HAVE_SFCGAL@
@@ -65,7 +65,11 @@ clean-local:
# TODO: drop 'test' target..
test: check
-check: check-no-trailing-blanks check-unit check-regress docs-check check-news check-tests-enabled
+check: check-no-trailing-blanks check-unit docs-check check-news check-tests-enabled
+
+ifeq (@LIBLWGEOM_ONLY@,no)
+check: check-regress
+endif
staged-install: all
$(MAKE) -C regress staged-install
diff --git a/configure.ac b/configure.ac
index b673cca3d..ae7a4bb08 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1483,9 +1483,12 @@ if test "x$with_raster" != "xno"; then
CPPFLAGS_SAVE="$CPPFLAGS"
CPPFLAGS="$LIBGDAL_CFLAGS"
CFLAGS_SAVE="$CFLAGS"
- CFLAGS=`"$PG_CONFIG" --cflags`
CC_SAVE="$CC"
- CC=`"$PG_CONFIG" --cc`
+
+ if test "x$PG_CONFIG" != "xno"; then
+ CFLAGS=`"$PG_CONFIG" --cflags`
+ CC=`"$PG_CONFIG" --cc`
+ fi
LIBS_SAVE="$LIBS"
LIBS="$LIBGDAL_LDFLAGS"
@@ -1521,9 +1524,11 @@ if test "x$with_raster" != "xno"; then
dnl Define raster objects, for makefiles
RT_CORE_LIB=corelib
- RT_PG_LIB=pglib
RT_LOADER=rtloader
- RT_POSTGIS_SQL=rtpostgis.sql
+ if test "x$PG_CONFIG" != "xno"; then
+ RT_PG_LIB=pglib
+ RT_POSTGIS_SQL=rtpostgis.sql
+ fi
AC_SUBST([RASTER])
AC_SUBST([RT_CORE_LIB])
@@ -1709,14 +1714,16 @@ dnl the xlstproc tool for generating the comments SQL file.
dnl ===========================================================================
EXTENSIONS=""
-if test \
- "x$XSLTPROC" != "x" -o \
- -e doc/postgis_comments.sql -a \
- -e doc/raster_comments.sql;
-then
- AC_MSG_RESULT([enabling PostgreSQL extension support...])
- EXTENSIONS=extensions
- AC_SUBST([EXTENSIONS])
+if test "x$PG_CONFIG" != "xno"; then
+ if test \
+ "x$XSLTPROC" != "x" -o \
+ -e doc/postgis_comments.sql -a \
+ -e doc/raster_comments.sql;
+ then
+ AC_MSG_RESULT([enabling PostgreSQL extension support...])
+ EXTENSIONS=extensions
+ AC_SUBST([EXTENSIONS])
+ fi
fi
INSTALL_EXTENSION_UPGRADES=yes
diff --git a/loader/Makefile.in b/loader/Makefile.in
index da10b442d..aead6159c 100644
--- a/loader/Makefile.in
+++ b/loader/Makefile.in
@@ -34,9 +34,17 @@ LDFLAGS = @LDFLAGS@
# Filenames with extension as determined by the OS
POSTGIS-CLI=postgis
-PGSQL2SHP-CLI=pgsql2shp at EXESUFFIX@
SHP2PGSQL-CLI=shp2pgsql at EXESUFFIX@
-SHP2PGSQL-GUI=shp2pgsql-gui at EXESUFFIX@
+PGSQL2SHP-CLI=
+SHP2PGSQL-GUI=
+ifneq (@PG_CONFIG@,no)
+ PGSQL2SHP-CLI=pgsql2shp at EXESUFFIX@
+ ifneq (@GTK_BUILD@,)
+ SHP2PGSQL-GUI=shp2pgsql-gui at EXESUFFIX@
+ # We test this variable later to see if we're building the GUI
+ gtk_build = 1
+ endif
+endif
# PostgreSQL frontend CPPFLAGS and LDFLAGS (for compiling and linking with libpq)
PGSQL_FE_CPPFLAGS=@PGSQL_FE_CPPFLAGS@
@@ -76,9 +84,6 @@ ifeq ($(REGRESS),1)
datadir=/share
endif
-# We test this variable later to see if we're building the GUI
-gtk_build = @GTK_BUILD@
-
# Common object files
SHPLIB_OBJS = shpopen.o dbfopen.o getopt.o shpcommon.o safileio.o
@@ -143,10 +148,12 @@ ifdef gtk_build
endif
install: installdir install-desktop install-icons
-ifdef gtk_build
+ifneq ($(SHP2PGSQL-GUI),)
$(LIBTOOL) --mode=install $(INSTALL) $(SHP2PGSQL-GUI) "$(DESTDIR)$(bindir)/$(SHP2PGSQL-GUI)"
endif
+ifneq ($(PGSQL2SHP-CLI),)
$(LIBTOOL) --mode=install $(INSTALL) $(PGSQL2SHP-CLI) "$(DESTDIR)$(bindir)/$(PGSQL2SHP-CLI)"
+endif
$(LIBTOOL) --mode=install $(INSTALL) $(SHP2PGSQL-CLI) "$(DESTDIR)$(bindir)/$(SHP2PGSQL-CLI)"
$(LIBTOOL) --mode=install $(INSTALL) $(POSTGIS-CLI) "$(DESTDIR)$(bindir)/$(POSTGIS-CLI)"
@@ -161,9 +168,13 @@ ifdef gtk_build
endif
uninstall: uninstall-desktop uninstall-icons
+ifneq ($(PGSQL2SHP-CLI),)
$(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(bindir)/$(PGSQL2SHP-CLI)"
+endif
$(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(bindir)/$(SHP2PGSQL-CLI)"
+ifneq ($(SHP2PGSQL-GUI),)
$(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(bindir)/$(SHP2PGSQL-GUI)"
+endif
$(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(bindir)/$(POSTGIS-CLI)"
# TODO: move here what's currently run from regress/loader and
diff --git a/loader/cunit/Makefile.in b/loader/cunit/Makefile.in
index a6f842a73..33a115d0e 100644
--- a/loader/cunit/Makefile.in
+++ b/loader/cunit/Makefile.in
@@ -63,19 +63,27 @@ VPATH = $(srcdir)
# Object files
OBJS= \
- cu_pgsql2shp.o \
cu_shp2pgsql.o \
cu_tester.o
+ifneq (@PG_CONFIG@,no)
+OBJS += \
+ cu_pgsql2shp.o
+endif
+
LOADER_OBJS= \
../dbfopen.o \
../shpopen.o \
../getopt.o \
../shpcommon.o \
../safileio.o \
- ../pgsql2shp-core.o \
../shp2pgsql-core.o
+ifneq (@PG_CONFIG@,no)
+LOADER_OBJS += \
+ ../pgsql2shp-core.o
+endif
+
# If we couldn't find the cunit library then display a helpful message
ifeq ($(CUNIT_LDFLAGS),)
all: requirements_not_met_cunit
diff --git a/loader/cunit/cu_tester.c b/loader/cunit/cu_tester.c
index d23bde7c5..d47d5b1aa 100644
--- a/loader/cunit/cu_tester.c
+++ b/loader/cunit/cu_tester.c
@@ -13,6 +13,7 @@
#include <string.h>
#include "CUnit/Basic.h"
#include "cu_tester.h"
+#include "../postgis_config.h"
/*
** The main() function for setting up and running the tests.
@@ -33,12 +34,14 @@ int main()
return CU_get_error();
}
+#ifdef POSTGIS_PGSQL_VERSION
/* Add the pgsql2shp test suite */
if (NULL == register_pgsql2shp_suite())
{
CU_cleanup_registry();
return CU_get_error();
}
+#endif
/* Run all tests using the CUnit Basic interface */
CU_basic_set_mode(CU_BRM_VERBOSE);
diff --git a/loader/shp2pgsql-cli.c b/loader/shp2pgsql-cli.c
index 149ed55c2..209c0745d 100644
--- a/loader/shp2pgsql-cli.c
+++ b/loader/shp2pgsql-cli.c
@@ -86,9 +86,11 @@ main (int argc, char **argv)
int ret, i;
#ifdef ENABLE_NLS
+#ifdef PGSQL_LOCALEDIR
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, PGSQL_LOCALEDIR);
textdomain (PACKAGE);
+#endif
#endif
/* If no options are specified, display usage */
diff --git a/raster/Makefile.in b/raster/Makefile.in
index d8a12d0bf..401723346 100644
--- a/raster/Makefile.in
+++ b/raster/Makefile.in
@@ -25,6 +25,8 @@ LDFLAGS = @LDFLAGS@
all: @RT_CORE_LIB@ @RT_PG_LIB@ @RT_LOADER@ @RT_POSTGIS_SQL@
+with_pg = @RT_PG_LIB@
+
corelib:
$(MAKE) -C rt_core
@@ -38,28 +40,36 @@ rtpostgis.sql:
$(MAKE) -C rt_pg rtpostgis.sql
install: all
- $(MAKE) -C rt_pg install
$(MAKE) -C loader install
+ifdef with_pg
+ $(MAKE) -C rt_pg install
$(MAKE) -C scripts install
+endif
uninstall:
- $(MAKE) -C rt_pg uninstall
$(MAKE) -C loader uninstall
+ifdef with_pg
+ $(MAKE) -C rt_pg uninstall
$(MAKE) -C scripts uninstall
+endif
clean:
$(MAKE) -C rt_core $@
- $(MAKE) -C rt_pg $@
$(MAKE) -C loader $@
$(MAKE) -C test $@
+ifdef with_pg
+ $(MAKE) -C rt_pg $@
$(MAKE) -C scripts $@
+endif
distclean: clean
$(MAKE) -C rt_core $@
- $(MAKE) -C rt_pg $@
$(MAKE) -C loader $@
$(MAKE) -C test $@
+ifdef with_pg
+ $(MAKE) -C rt_pg $@
$(MAKE) -C scripts $@
+endif
rm -f raster_config.h Makefile
check check-unit check-regress core-check:
diff --git a/raster/loader/Makefile.in b/raster/loader/Makefile.in
index 5fc6b6038..250dac361 100644
--- a/raster/loader/Makefile.in
+++ b/raster/loader/Makefile.in
@@ -24,6 +24,9 @@ top_builddir = @top_builddir@
builddir = @builddir@
top_srcdir = @top_srcdir@
srcdir = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+bindir = @bindir@
VPATH = $(srcdir)
@@ -86,13 +89,13 @@ $(RASTER2PGSQL): ../rt_core/librtcore.a raster2pgsql.o
$(LIBTOOL) --mode=link $(CC) $(CFLAGS) $^ $(LDFLAGS) -o $@
installdir:
- @mkdir -p $(DESTDIR)$(PGSQL_BINDIR)
+ @mkdir -p $(DESTDIR)$(bindir)
install: installdir
- $(LIBTOOL) --mode=install $(INSTALL) $(RASTER2PGSQL) "$(DESTDIR)$(PGSQL_BINDIR)/$(RASTER2PGSQL)"
+ $(LIBTOOL) --mode=install $(INSTALL) $(RASTER2PGSQL) "$(DESTDIR)$(bindir)/$(RASTER2PGSQL)"
uninstall:
- $(LIBTOOL) --mode=uninstall $(RM) "$(DESTDIR)$(PGSQL_BINDIR)/$(RASTER2PGSQL)"
+ $(LIBTOOL) --mode=uninstall $(RM) "$(DESTDIR)$(bindir)/$(RASTER2PGSQL)"
../rt_core/librtcore.a:
$(MAKE) -C $(buidldir)/../rt_core
diff --git a/raster/test/Makefile.in b/raster/test/Makefile.in
index fd0ae4021..5a8b381fa 100644
--- a/raster/test/Makefile.in
+++ b/raster/test/Makefile.in
@@ -18,8 +18,12 @@ core-check: check-unit
check-unit:
$(MAKE) -C cunit check
+ifneq (@PG_CONFIG@,no)
check-regress:
$(MAKE) -C regress check
+else
+check-regress:
+endif
clean:
$(MAKE) -C cunit $@
-----------------------------------------------------------------------
Summary of changes:
.woodpecker/tools.yml | 13 +++++++++++++
GNUmakefile.in | 10 +++++++---
configure.ac | 31 +++++++++++++++++++------------
loader/Makefile.in | 23 +++++++++++++++++------
loader/cunit/Makefile.in | 12 ++++++++++--
loader/cunit/cu_tester.c | 3 +++
loader/shp2pgsql-cli.c | 2 ++
raster/Makefile.in | 18 ++++++++++++++----
raster/loader/Makefile.in | 9 ++++++---
raster/test/Makefile.in | 4 ++++
10 files changed, 95 insertions(+), 30 deletions(-)
create mode 100644 .woodpecker/tools.yml
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list