summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron W. Swenson <titanofold@gentoo.org>2017-12-23 08:00:52 -0500
committerAaron W. Swenson <titanofold@gentoo.org>2017-12-23 08:00:52 -0500
commit2537c6ed079eca7a23f02321c0ef7670fa5a1aa0 (patch)
tree49271fb0e53f1e493fcb69401481a51552f80737 /dev-db/postgis
parentsys-devel/dev86: Drop old (diff)
downloadgentoo-2537c6ed079eca7a23f02321c0ef7670fa5a1aa0.tar.gz
gentoo-2537c6ed079eca7a23f02321c0ef7670fa5a1aa0.tar.bz2
gentoo-2537c6ed079eca7a23f02321c0ef7670fa5a1aa0.zip
dev-db/postgis: Add json-c-0.13 patch
Fix compilation failure when building against json-c-0.13. Thanks to Wojciech Myrda for submitting the patch to us, and Ștefan Talpalaru for confirming. Closes: https://bugs.gentoo.org/641978 Package-Manager: Portage-2.3.13, Repoman-2.3.3
Diffstat (limited to 'dev-db/postgis')
-rw-r--r--dev-db/postgis/files/postgis-2.4.2-jsonc_0.13.patch23
-rw-r--r--dev-db/postgis/postgis-2.4.2.ebuild3
2 files changed, 25 insertions, 1 deletions
diff --git a/dev-db/postgis/files/postgis-2.4.2-jsonc_0.13.patch b/dev-db/postgis/files/postgis-2.4.2-jsonc_0.13.patch
new file mode 100644
index 000000000000..b980e77333d6
--- /dev/null
+++ b/dev-db/postgis/files/postgis-2.4.2-jsonc_0.13.patch
@@ -0,0 +1,23 @@
+diff -Naur postgis-2.4.2.old/liblwgeom/lwin_geojson.c postgis-2.4.2/liblwgeom/lwin_geojson.c
+--- postgis-2.4.2.old/liblwgeom/lwin_geojson.c 2017-12-21 22:52:40.422802160 +0100
++++ postgis-2.4.2/liblwgeom/lwin_geojson.c 2017-12-21 22:55:36.605430945 +0100
+@@ -31,13 +31,19 @@
+
+ #if defined(HAVE_LIBJSON) || defined(HAVE_LIBJSON_C) /* --{ */
+
++#define JSON_C_VERSION_013 (13 << 8)
++
+ #ifdef HAVE_LIBJSON_C
+ #include <json-c/json.h>
++#if !defined(JSON_C_VERSION_NUM) || JSON_C_VERSION_NUM < JSON_C_VERSION_013
+ #include <json-c/json_object_private.h>
++#endif
+ #else
+ #include <json/json.h>
++#if !defined(JSON_C_VERSION_NUM) || JSON_C_VERSION_NUM < JSON_C_VERSION_013
+ #include <json/json_object_private.h>
+ #endif
++#endif
+
+ #ifndef JSON_C_VERSION
+ /* Adds support for libjson < 0.10 */
diff --git a/dev-db/postgis/postgis-2.4.2.ebuild b/dev-db/postgis/postgis-2.4.2.ebuild
index dca731bcd115..52c149a6122f 100644
--- a/dev-db/postgis/postgis-2.4.2.ebuild
+++ b/dev-db/postgis/postgis-2.4.2.ebuild
@@ -61,7 +61,8 @@ MAKEOPTS+=' -j1'
QA_FLAGS_IGNORED="usr/lib(64)?/(rt)?postgis-${PGIS}\.so"
src_prepare() {
- eapply "${FILESDIR}/${PN}-2.2.0-arflags.patch"
+ eapply "${FILESDIR}/${PN}-2.2.0-arflags.patch" \
+ "${FILESDIR}/postgis-2.4.2-jsonc_0.13.patch"
local AT_M4DIR="macros"
eautoreconf