From 92fcfc8a83452d0a69dcb64ffe806d4f0993d561 Mon Sep 17 00:00:00 2001 From: termux-pacman-bot Date: Sun, 27 Nov 2022 13:05:32 +0000 Subject: [PATCH] postgis: Bump to 3.3.2 --- packages/postgis/build.sh | 22 +--- packages/postgis/configure.diff | 170 ------------------------------- packages/postgis/configure.patch | 11 ++ 3 files changed, 14 insertions(+), 189 deletions(-) delete mode 100644 packages/postgis/configure.diff create mode 100644 packages/postgis/configure.patch diff --git a/packages/postgis/build.sh b/packages/postgis/build.sh index 4f389eed96..a801e7d736 100644 --- a/packages/postgis/build.sh +++ b/packages/postgis/build.sh @@ -2,27 +2,11 @@ TERMUX_PKG_HOMEPAGE=https://postgis.net TERMUX_PKG_DESCRIPTION="Spatial database extender for PostgreSQL object-relational database" TERMUX_PKG_LICENSE="GPL-2.0" TERMUX_PKG_MAINTAINER="@termux" -TERMUX_PKG_VERSION=3.1.8 +TERMUX_PKG_VERSION=3.3.2 TERMUX_PKG_SRCURL=https://download.osgeo.org/postgis/source/postgis-$TERMUX_PKG_VERSION.tar.gz -TERMUX_PKG_SHA256=54254fb57070ce44d1da9434f472e0a82df0ef24321c2b9a22c449f756e278e7 -TERMUX_PKG_DEPENDS="gdal, json-c, libc++, libiconv, libprotobuf-c, libxml2, pcre, postgresql, proj" +TERMUX_PKG_SHA256=9a2a219da005a1730a39d1959a1c7cec619b1efb009b65be80ffc25bad299068 +TERMUX_PKG_DEPENDS="gdal, json-c, libc++, libgeos, libiconv, libprotobuf-c, libxml2, pcre2, postgresql, proj" # both configure script and Makefile(s) look for files in current # directory rather than srcdir, so need to build in source TERMUX_PKG_BUILD_IN_SRC=true - -termux_step_pre_configure() { - # Configure script wants to run a cross-compiled program to - # get proj and protobuf version, which won't work for us. - local proj_version=$(. $TERMUX_SCRIPTDIR/packages/proj/build.sh; echo $TERMUX_PKG_VERSION) - # 8.1.1 -> 81 - proj_version=${proj_version:0:1}${proj_version:2:1} - local protobuf_version=$(. $TERMUX_SCRIPTDIR/packages/libprotobuf-c/build.sh; echo $TERMUX_PKG_VERSION) - # 1.3.3 -> 1003003 - protobuf_version=${protobuf_version:0:1}00${protobuf_version:2:1}00${protobuf_version:4:1} - echo "Patching configure script" - sed -e "s|@TERMUX_PREFIX@|${TERMUX_PREFIX}|g" \ - -e "s|@PROJ_VERSION@|${proj_version}|g" \ - -e "s|@PROTOBUF_VERSION@|${protobuf_version}|g" \ - $TERMUX_PKG_BUILDER_DIR/configure.diff | patch -Np1 -} diff --git a/packages/postgis/configure.diff b/packages/postgis/configure.diff deleted file mode 100644 index 7a6d9f4bcd..0000000000 --- a/packages/postgis/configure.diff +++ /dev/null @@ -1,170 +0,0 @@ ---- ../configure.orig 2021-12-05 10:26:50.984021147 +0000 -+++ ./configure 2021-12-05 10:49:16.032713588 +0000 -@@ -14497,7 +14497,7 @@ - esac - - CPPFLAGS_SAVE="$CPPFLAGS" --CPPFLAGS="$XML2_CPPFLAGS" -+CPPFLAGS="$XML2_CPPFLAGS -I@TERMUX_PREFIX@/include" - for ac_header in libxml/tree.h libxml/parser.h libxml/xpath.h libxml/xpathInternals.h - do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -@@ -16989,106 +16989,7 @@ - - - -- -- ac_fn_c_check_header_mongrel "$LINENO" "proj.h" "ac_cv_header_proj_h" "$ac_includes_default" --if test "x$ac_cv_header_proj_h" = xyes; then : -- -- if test "$cross_compiling" = yes; then : -- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 --$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} --as_fn_error $? "cannot run test program while cross compiling --See \`config.log' for more details" "$LINENO" 5; } --else -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ -- -- -- #ifdef HAVE_STDINT_H -- #include -- #endif -- #include "proj.h" -- --int --main () --{ -- -- FILE *fp; -- int vernum; -- -- fp = fopen("conftest.out", "w"); -- vernum = (100 * PROJ_VERSION_MAJOR) + (10 * PROJ_VERSION_MINOR) + PROJ_VERSION_PATCH; -- fprintf(fp, "%d\n", vernum); -- fclose(fp); -- -- ; -- return 0; --} -- --_ACEOF --if ac_fn_c_try_run "$LINENO"; then : -- -- POSTGIS_PROJ_VERSION=`cat conftest.out | sed 's/\([0-9]\)\([0-9]\)\([0-9]\)/\1\2/'` -- --else -- -- POSTGIS_PROJ_VERSION="" -- --fi --rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ -- conftest.$ac_objext conftest.beam conftest.$ac_ext --fi -- -- --else -- -- if test "$cross_compiling" = yes; then : -- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 --$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} --as_fn_error $? "cannot run test program while cross compiling --See \`config.log' for more details" "$LINENO" 5; } --else -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ -- -- #ifdef HAVE_STDINT_H -- #include -- #endif -- #include "proj_api.h" -- --int --main () --{ -- -- FILE *fp; -- -- fp = fopen("conftest.out", "w"); -- fprintf(fp, "%d\n", PJ_VERSION); -- fclose(fp); -- -- ; -- return 0; --} -- --_ACEOF --if ac_fn_c_try_run "$LINENO"; then : -- -- POSTGIS_PROJ_VERSION=`cat conftest.out | sed 's/\([0-9]\)\([0-9]\)\([0-9]\)/\1\2/'` -- --else -- -- POSTGIS_PROJ_VERSION="" -- --fi --rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ -- conftest.$ac_objext conftest.beam conftest.$ac_ext --fi -- -- --fi -- -- -- -- -+POSTGIS_PROJ_VERSION=@PROJ_VERSION@ - cat >>confdefs.h <<_ACEOF - #define POSTGIS_PROJ_VERSION $POSTGIS_PROJ_VERSION - _ACEOF -@@ -17709,49 +17610,7 @@ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking protobuf-c version" >&5 - $as_echo_n "checking protobuf-c version... " >&6; } - -- -- if test "$cross_compiling" = yes; then : -- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 --$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} --as_fn_error $? "cannot run test program while cross compiling --See \`config.log' for more details" "$LINENO" 5; } --else -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ -- -- -- #ifdef HAVE_STDINT_H -- #include -- #endif -- #include "protobuf-c/protobuf-c.h" -- --int --main () --{ -- -- FILE *fp = fopen("conftest.out", "w"); -- fprintf(fp, "%d\n", PROTOBUF_C_VERSION_NUMBER); -- fclose(fp); -- -- ; -- return 0; --} -- --_ACEOF --if ac_fn_c_try_run "$LINENO"; then : -- -- PROTOC_VERSION=`cat conftest.out` -- --else -- -- PROTOC_VERSION="0" -- --fi --rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ -- conftest.$ac_objext conftest.beam conftest.$ac_ext --fi -- -- -+PROTOC_VERSION=@PROTOBUF_VERSION@ - - if test ! "$PROTOC_VERSION" -ge 1001000; then - as_fn_error $? "\"Old protobuf-c release found but 1.1.0 is required. You can disable MVT and Geobuf support using --without-protobuf\"" "$LINENO" 5 diff --git a/packages/postgis/configure.patch b/packages/postgis/configure.patch new file mode 100644 index 0000000000..7a96e609dc --- /dev/null +++ b/packages/postgis/configure.patch @@ -0,0 +1,11 @@ +--- ../configure.orig 2021-12-05 10:26:50.984021147 +0000 ++++ ./configure 2021-12-05 10:49:16.032713588 +0000 +@@ -14497,7 +14497,7 @@ + esac + + CPPFLAGS_SAVE="$CPPFLAGS" +-CPPFLAGS="$XML2_CPPFLAGS" ++CPPFLAGS="$XML2_CPPFLAGS -I@TERMUX_PREFIX@/include" + for ac_header in libxml/tree.h libxml/parser.h libxml/xpath.h libxml/xpathInternals.h + do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`