From 5204b6669520106e3be02e13c04d2079cd6597ef Mon Sep 17 00:00:00 2001 From: Chaoting Liu Date: Sat, 10 Mar 2018 18:14:23 +0000 Subject: [PATCH] postgis: rebuild with new json-c, add compatibility patch --- postgis/PKGBUILD | 13 ++++++-- postgis/json-0.13-compatibility.patch | 44 +++++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 3 deletions(-) create mode 100644 postgis/json-0.13-compatibility.patch diff --git a/postgis/PKGBUILD b/postgis/PKGBUILD index 0721307e1..d006a65cf 100644 --- a/postgis/PKGBUILD +++ b/postgis/PKGBUILD @@ -2,15 +2,22 @@ pkgname=postgis pkgver=2.4.3 -pkgrel=1 +pkgrel=2 pkgdesc="Adds support for geographic objects to PostgreSQL" arch=('x86_64') url="http://postgis.refractions.net/" license=('GPL') options=('!makeflags') depends=('postgresql' 'gdal' 'json-c' 'proj' 'protobuf-c') -source=(http://download.osgeo.org/postgis/source/$pkgname-$pkgver.tar.gz) -sha256sums=('ea5374c5db6b645ba5628ddcb08f71d3b3d90a464d366b4e1d20d5a268bde4b9') +source=(https://download.osgeo.org/postgis/source/$pkgname-$pkgver.tar.gz + json-0.13-compatibility.patch) +sha256sums=('ea5374c5db6b645ba5628ddcb08f71d3b3d90a464d366b4e1d20d5a268bde4b9' + 'a7d3a6005cf776d69dc6df0fc4f31a366049487fcde7939a1849e724d0d78c36') + +prepare() { + cd ${pkgname}-${pkgver} + patch -Np1 -i $srcdir/json-0.13-compatibility.patch +} build() { cd ${srcdir}/$pkgname-$pkgver diff --git a/postgis/json-0.13-compatibility.patch b/postgis/json-0.13-compatibility.patch new file mode 100644 index 000000000..d9e179511 --- /dev/null +++ b/postgis/json-0.13-compatibility.patch @@ -0,0 +1,44 @@ +From ccb7b1c48b26256a81a264baeb4ab9d06cf7221e Mon Sep 17 00:00:00 2001 +From: Darafei Praliaskouski +Date: Sat, 16 Dec 2017 10:40:06 +0000 +Subject: [PATCH] Do not include private header for json-c >= 0.13 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Patch by Björn Esser + +Closes #3942 +Closes https://github.com/postgis/postgis/pull/173 + + + +git-svn-id: http://svn.osgeo.org/postgis/trunk@16155 b70326c6-7e19-0410-871a-916f4a2858ee +--- + liblwgeom/lwin_geojson.c | 6 ++++++ + 2 files changed, 7 insertions(+) + +diff --git a/liblwgeom/lwin_geojson.c b/liblwgeom/lwin_geojson.c +index 749d03374..ef907ee79 100644 +--- a/liblwgeom/lwin_geojson.c ++++ b/liblwgeom/lwin_geojson.c +@@ -31,13 +31,19 @@ + + #if defined(HAVE_LIBJSON) || defined(HAVE_LIBJSON_C) /* --{ */ + ++#define JSON_C_VERSION_013 (13 << 8) ++ + #ifdef HAVE_LIBJSON_C + #include ++#if !defined(JSON_C_VERSION_NUM) || JSON_C_VERSION_NUM < JSON_C_VERSION_013 + #include ++#endif + #else + #include ++#if !defined(JSON_C_VERSION_NUM) || JSON_C_VERSION_NUM < JSON_C_VERSION_013 + #include + #endif ++#endif + + #ifndef JSON_C_VERSION + /* Adds support for libjson < 0.10 */