initial buildroot for linux 5.15
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
From 7bf2fc388df10bc1760cd06594f50da0c78ee3a2 Mon Sep 17 00:00:00 2001
|
||||
From: fidomax <adobegitler@gmail.com>
|
||||
Date: Tue, 26 Jan 2021 07:33:17 +0300
|
||||
Subject: [PATCH] Add HAVE_VASPRINTF HAVE_ASPRINTF templates
|
||||
|
||||
It fixes autoreconf error:
|
||||
autoheader: warning: missing template: HAVE_ASPRINTF
|
||||
autoheader: Use AC_DEFINE([HAVE_ASPRINTF], [], [Description])
|
||||
autoheader: warning: missing template: HAVE_VASPRINTF
|
||||
|
||||
Signed-off-by: Maxim Kochetkov <fido_max@inbox.ru>
|
||||
Fetch from: https://github.com/postgis/postgis/commit/d0ac5df49961d1d1a74b894f9941b973c0695c11.patch
|
||||
---
|
||||
configure.ac | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 9ac7051bb..dddb3aef7 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -11,6 +11,8 @@ dnl **********************************************************************
|
||||
|
||||
AC_INIT()
|
||||
AC_CONFIG_HEADERS([postgis_config.h])
|
||||
+AH_TEMPLATE([HAVE_VASPRINTF])
|
||||
+AH_TEMPLATE([HAVE_ASPRINTF])
|
||||
AC_CONFIG_MACRO_DIR([macros])
|
||||
AC_CONFIG_AUX_DIR([build-aux])
|
||||
AC_PROG_INSTALL
|
||||
--
|
||||
2.30.0
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
From 97d0cb4f4a6f3bec50729e3f896d4a84b796c5c6 Mon Sep 17 00:00:00 2001
|
||||
From: fidomax <adobegitler@gmail.com>
|
||||
Date: Tue, 26 Jan 2021 09:17:17 +0300
|
||||
Subject: [PATCH] Add POSTGIS_DEBUG_LEVEL define to configure.ac
|
||||
|
||||
In case of using autoreconf "#define POSTGIS_DEBUG_LEVEL 0" is removed from postgis_config.h.in so build failed with undefined POSTGIS_DEBUG_LEVEL.
|
||||
|
||||
Signed-off-by: Maxim Kochetkov <fido_max@inbox.ru>
|
||||
Fetch from: https://github.com/postgis/postgis/commit/2b2c2cb159cfcaacb75a4e74f17bd2834d61acd0.patch
|
||||
---
|
||||
configure.ac | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index dddb3aef7..86e1597ee 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -1131,6 +1131,8 @@ else
|
||||
CPPFLAGS="-DNDEBUG $CPPFLAGS"
|
||||
fi
|
||||
|
||||
+AC_DEFINE([POSTGIS_DEBUG_LEVEL], [0], [Define debug level. Default 0])
|
||||
+
|
||||
dnl ===========================================================================
|
||||
dnl Allow the developer to disable the automatic updates of postgis_revision.h
|
||||
dnl with --without-phony-revision
|
||||
--
|
||||
2.30.0
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
From 845c18c1288b7a96592901baadb198f96dd71c46 Mon Sep 17 00:00:00 2001
|
||||
From: fidomax <adobegitler@gmail.com>
|
||||
Date: Tue, 26 Jan 2021 09:49:19 +0300
|
||||
Subject: [PATCH] Disable forced static linking of liblwgeom
|
||||
|
||||
In case of shared libs build fails:
|
||||
ld: cannot find -lgeos_c
|
||||
ld: attempted static link of dynamic object `/usr/lib/libproj.so'
|
||||
|
||||
Signed-off-by: Maxim Kochetkov <fido_max@inbox.ru>
|
||||
Fetch from: https://github.com/postgis/postgis/commit/98070faad220e12fcaed9a583a70a37c510b7c6b.patch
|
||||
---
|
||||
loader/Makefile.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/loader/Makefile.in b/loader/Makefile.in
|
||||
index 9aebfe07f..9a0c90d3a 100644
|
||||
--- a/loader/Makefile.in
|
||||
+++ b/loader/Makefile.in
|
||||
@@ -44,7 +44,7 @@ ICONV_CFLAGS=@ICONV_CFLAGS@
|
||||
|
||||
# liblwgeom
|
||||
LIBLWGEOM=../liblwgeom/liblwgeom.la
|
||||
-LDFLAGS += -static $(LIBLWGEOM)
|
||||
+LDFLAGS += $(LIBLWGEOM)
|
||||
|
||||
# GTK includes and libraries
|
||||
GTK_CFLAGS = @GTK_CFLAGS@ @IGE_MAC_CFLAGS@
|
||||
--
|
||||
2.30.0
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
From 876a04a795fcb179e0dc802e260353012c4890f9 Mon Sep 17 00:00:00 2001
|
||||
From: Maxim Kochetkov <adobegitler@gmail.com>
|
||||
Date: Thu, 28 Jan 2021 08:12:57 +0300
|
||||
Subject: [PATCH] Use pkg-config to get PROJ version if available
|
||||
|
||||
In case of cross-compile AC_PROJ_VERSION([POSTGIS_PROJ_VERSION]) fails.
|
||||
So try to get version by pkg-config first
|
||||
|
||||
Signed-off-by: Maxim Kochetkov <fido_max@inbox.ru>
|
||||
Fetch from: https://github.com/postgis/postgis/commit/671a878982550e3c590d642620a6621b52c230c7.patch
|
||||
---
|
||||
configure.ac | 7 +++++--
|
||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 86e1597ee..016f81c7d 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -866,6 +866,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/'`
|
||||
],
|
||||
[
|
||||
PROJ_LDFLAGS="-lproj"
|
||||
@@ -887,8 +888,10 @@ AC_CHECK_HEADER([proj_api.h],
|
||||
)]
|
||||
)
|
||||
|
||||
-dnl Return the PROJ.4 version number
|
||||
-AC_PROJ_VERSION([POSTGIS_PROJ_VERSION])
|
||||
+dnl Return the PROJ.4 version number if not detected by pkg-config
|
||||
+if test "x$POSTGIS_PROJ_VERSION" = "x"; then
|
||||
+ AC_PROJ_VERSION([POSTGIS_PROJ_VERSION])
|
||||
+fi
|
||||
AC_DEFINE_UNQUOTED([POSTGIS_PROJ_VERSION], [$POSTGIS_PROJ_VERSION], [PROJ library version])
|
||||
AC_SUBST([POSTGIS_PROJ_VERSION])
|
||||
CPPFLAGS="$CPPFLAGS_SAVE"
|
||||
--
|
||||
2.30.0
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
From 8b80c4bd848ff3d71b998dc8a4bd42627ed72581 Mon Sep 17 00:00:00 2001
|
||||
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Date: Sat, 17 Apr 2021 11:58:19 +0200
|
||||
Subject: [PATCH] configure.ac: fix cross-compilation with protobuf-c
|
||||
|
||||
Try to retrieve the version from pkg-config to avoid the following
|
||||
error:
|
||||
|
||||
checking protobuf-c version... configure: error: in `/home/fabrice/buildroot/output/build/postgis-3.1.1':
|
||||
configure: error: cannot run test program while cross compiling
|
||||
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
[Retrieved from:
|
||||
https://github.com/postgis/postgis/commit/8b80c4bd848ff3d71b998dc8a4bd42627ed72581]
|
||||
---
|
||||
configure.ac | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 48ba070a40..df75fe6601 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -1004,6 +1004,7 @@ if test "$CHECK_PROTOBUF" != "no"; then
|
||||
PKG_CHECK_MODULES([PROTOBUFC], [libprotobuf-c >= 1.1.0], [
|
||||
PROTOBUF_CPPFLAGS="$PROTOBUFC_CFLAGS";
|
||||
PROTOBUF_LDFLAGS="$PROTOBUFC_LIBS";
|
||||
+ PROTOC_VERSION=`$PKG_CONFIG libprotobuf-c --modversion | sed 's/\([[0-9]]\).*\([[0-9]]\).*\([[0-9]]\)/\100\200\3/'`
|
||||
], [
|
||||
AC_MSG_RESULT([libprotobuf-c not found in pkg-config])
|
||||
])
|
||||
@@ -1054,7 +1055,10 @@ if test "$CHECK_PROTOBUF" != "no"; then
|
||||
[])
|
||||
|
||||
AC_MSG_CHECKING([protobuf-c version])
|
||||
- AC_PROTOBUFC_VERSION([PROTOC_VERSION])
|
||||
+ dnl Return the protobuf-c version number if not detected by pkg-config
|
||||
+ if test "x$PROTOC_VERSION" = "x"; then
|
||||
+ AC_PROTOBUFC_VERSION([PROTOC_VERSION])
|
||||
+ fi
|
||||
if test ! "$PROTOC_VERSION" -ge 1001000; then
|
||||
AC_MSG_ERROR("Old protobuf-c release found but 1.1.0 is required. You can disable MVT and Geobuf support using --without-protobuf")
|
||||
fi
|
||||
@@ -0,0 +1,28 @@
|
||||
config BR2_PACKAGE_POSTGIS
|
||||
bool "postgis"
|
||||
depends on BR2_PACKAGE_POSTGRESQL_FULL
|
||||
depends on !BR2_microblazeel && !BR2_microblazebe # ICE
|
||||
depends on BR2_INSTALL_LIBSTDCPP # proj
|
||||
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 # C++11, proj
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS # proj
|
||||
depends on BR2_USE_WCHAR # libgeos, proj
|
||||
depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_21464 # libgeos
|
||||
depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_27597 # libgeos
|
||||
select BR2_PACKAGE_LIBGEOS
|
||||
select BR2_PACKAGE_PROJ
|
||||
select BR2_PACKAGE_LIBXML2
|
||||
select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
|
||||
help
|
||||
PostGIS is a spatial database extender for PostgreSQL
|
||||
object-relational database. It adds support for
|
||||
geographic objects allowing location queries
|
||||
to be run in SQL.
|
||||
|
||||
https://postgis.net/
|
||||
|
||||
comment "postgis needs a toolchain w/ C++, threads, wchar, gcc >= 4.7, not binutils bug 21464, 27597"
|
||||
depends on !BR2_microblazeel && !BR2_microblazebe # ICE
|
||||
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 || \
|
||||
!BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR || \
|
||||
BR2_TOOLCHAIN_HAS_BINUTILS_BUG_21464 || \
|
||||
BR2_TOOLCHAIN_HAS_BINUTILS_BUG_27597
|
||||
@@ -0,0 +1,3 @@
|
||||
# Locally calculated
|
||||
sha256 dc8e3fe8bc532e422f5d724c5a7c437f6555511716f6410d4d2db9762e1a3796 postgis-3.1.4.tar.gz
|
||||
sha256 55b69f22e1752830dd565852dc7ff242daf289dbd3a6bfede5db43f90d2e28c9 LICENSE.TXT
|
||||
@@ -0,0 +1,49 @@
|
||||
################################################################################
|
||||
#
|
||||
# postgis
|
||||
#
|
||||
################################################################################
|
||||
|
||||
POSTGIS_VERSION = 3.1.4
|
||||
POSTGIS_SITE = https://download.osgeo.org/postgis/source
|
||||
# parallel build issues
|
||||
POSTGIS_MAKE = $(MAKE1)
|
||||
POSTGIS_LICENSE = GPL-2.0+ (PostGIS), BSD-2-Clause, MIT, Apache-2.0, ISC, BSL-1.0, CC-BY-SA-3.0
|
||||
POSTGIS_LICENSE_FILES = LICENSE.TXT
|
||||
POSTGIS_CPE_ID_VENDOR = postgis
|
||||
# configure.ac is patched so need to run autoreconf
|
||||
POSTGIS_AUTORECONF = YES
|
||||
|
||||
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
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBGDAL),y)
|
||||
POSTGIS_DEPENDENCIES += libgdal
|
||||
POSTGIS_CONF_OPTS += --with-raster
|
||||
else
|
||||
POSTGIS_CONF_OPTS += --without-raster
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_JSON_C),y)
|
||||
POSTGIS_DEPENDENCIES += json-c
|
||||
POSTGIS_CONF_OPTS += --with-json
|
||||
else
|
||||
POSTGIS_CONF_OPTS += --without-json
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_PCRE),y)
|
||||
POSTGIS_DEPENDENCIES += pcre
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_PROTOBUF_C),y)
|
||||
POSTGIS_DEPENDENCIES += protobuf-c
|
||||
POSTGIS_CONF_OPTS += --with-protobuf
|
||||
else
|
||||
POSTGIS_CONF_OPTS += --without-protobuf
|
||||
endif
|
||||
|
||||
$(eval $(autotools-package))
|
||||
Reference in New Issue
Block a user