From 6e124e349ae3fbcf8c944b608e3f7723d1a62486 Mon Sep 17 00:00:00 2001 From: Björn Esser Date: Dec 15 2017 13:30:40 +0000 Subject: Add patch for changes in json-c >= 0.13 --- diff --git a/postgis-2.4.1_json-c_013.patch b/postgis-2.4.1_json-c_013.patch new file mode 100644 index 0000000..f36e90d --- /dev/null +++ b/postgis-2.4.1_json-c_013.patch @@ -0,0 +1,33 @@ +From a079dba76b209b788e9ced3641e2289b0820216c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= +Date: Fri, 15 Dec 2017 13:35:40 +0100 +Subject: [PATCH] geojson: Do not include private header for json-c >= 0.13 + +--- + liblwgeom/lwin_geojson.c | 6 ++++++ + 1 file changed, 6 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 */ diff --git a/postgis.spec b/postgis.spec index 80ab544..feaee10 100644 --- a/postgis.spec +++ b/postgis.spec @@ -28,7 +28,7 @@ Summary: Geographic Information Systems Extensions to PostgreSQL Name: postgis Version: %majorversion.1 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ Group: Applications/Databases Source0: http://download.osgeo.org/%{name}/source/%{name}-%{version}.tar.gz @@ -40,6 +40,8 @@ Patch2: postgis-2.4.0-upgrade-2.3.3.patch Patch3: postgis-2.4.0-install-desktop.patch Patch4: postgis-2.4.0-code-check-only.patch Patch5: postgis-2.4.0-check-gdal.patch +# Upstreamed. +Patch6: %{name}-2.4.1_json-c_013.patch URL: http://www.postgis.net BuildRequires: perl-generators @@ -140,11 +142,13 @@ cd %{name}-%{prevversion} %patch1 -p0 -b .configureac21 ./autogen.sh %patch2 -p1 +%patch6 -p1 ) %endif %patch3 -p1 %patch4 -p1 %patch5 -p1 +%patch6 -p1 cp -p %{SOURCE2} . @@ -343,6 +347,9 @@ fi %changelog +* Fri Dec 15 2017 Björn Esser - 2.4.1-4 +- Add patch for changes in json-c >= 0.13 + * Sun Dec 10 2017 Björn Esser - 2.4.1-3 - Rebuilt for libjson-c.so.3