Skip to content

Commit

Permalink
app-admin/syslog-ng: fix building with dev-libs/json-c-0.13
Browse files Browse the repository at this point in the history
Closes: https://bugs.gentoo.org/641688
Package-Manager: Portage-2.3.18, Repoman-2.3.6
  • Loading branch information
hydrapolic authored and Whissi committed Dec 20, 2017
1 parent 4592b65 commit d03a886
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
From 1b824dd6389e209eab752d5a698c6093f311e3e3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <[email protected]>
Date: Mon, 11 Dec 2017 15:46:06 +0100
Subject: [PATCH] modules/json: Adaptions for json-c v0.13

---
modules/json/json-parser.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/modules/json/json-parser.c b/modules/json/json-parser.c
index 0368ed8f7..356df48b9 100644
--- a/modules/json/json-parser.c
+++ b/modules/json/json-parser.c
@@ -20,6 +20,8 @@
* COPYING for details.
*/

+#define JSON_C_VER_013 (13 << 8)
+
#include "json-parser.h"
#include "dot-notation.h"
#include "scratch-buffers.h"
@@ -28,7 +30,10 @@
#include <ctype.h>

#include <json.h>
+
+#if (!defined(JSON_C_VERSION_NUM)) || (JSON_C_VERSION_NUM < JSON_C_VER_013)
#include <json_object_private.h>
+#endif

typedef struct _JSONParser
{
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ DEPEND="${RDEPEND}
sys-devel/flex
virtual/pkgconfig"

PATCHES=(
"${FILESDIR}"/patches/${PN}-3.12.1-json-c-0.13+.patch
)

S=${WORKDIR}/${PN}-${MY_PV}

pkg_setup() {
Expand All @@ -59,7 +63,6 @@ src_prepare() {

if use !json ; then
sed -i -e '/cim/d' scl/Makefile.am || die
eautoreconf
fi

for f in "${FILESDIR}"/*logrotate*.in ; do
Expand All @@ -73,6 +76,8 @@ src_prepare() {
done

default

eautoreconf
}

src_configure() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ DEPEND="${RDEPEND}
sys-devel/flex
virtual/pkgconfig"

PATCHES=(
"${FILESDIR}"/patches/${PN}-3.12.1-json-c-0.13+.patch
)

S=${WORKDIR}/${PN}-${MY_PV}

pkg_setup() {
Expand All @@ -60,7 +64,6 @@ src_prepare() {
# drop scl modules requiring json
if use !json; then
sed -i -r '/cim|ewmm|graylog2/d' scl/Makefile.am || die
eautoreconf
fi

# use gentoo default path
Expand All @@ -80,6 +83,8 @@ src_prepare() {
done

default

eautoreconf
}

src_configure() {
Expand Down

0 comments on commit d03a886

Please sign in to comment.