postgis: Bump to 3.3.2

This commit is contained in:
Tee KOBAYASHI 2022-11-27 21:04:08 +09:00 committed by xtkoba
parent 4addd0c0cd
commit 62e0d769c0
3 changed files with 14 additions and 189 deletions

View File

@ -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
}

View File

@ -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 <stdio.h>
- #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 <stdio.h>
- #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 <stdio.h>
- #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

View File

@ -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`