Skip to content

Commit

Permalink
net-news/newsboat: Apply json-c-0.14 fix
Browse files Browse the repository at this point in the history
Closes: https://bugs.gentoo.org/730420
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: David Denoncin <ddenoncin@gmail.com>
  • Loading branch information
David Denoncin committed Jul 5, 2020
1 parent 495d2ac commit e3f5ea9
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
34 changes: 34 additions & 0 deletions net-news/newsboat/files/newsboat-2.13-json-c-0.14.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
From db70049f436a965767e8a1273389e1be92e946fa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
Date: Mon, 13 Apr 2020 12:52:46 +0200
Subject: [PATCH] Add support for upcoming json-c 0.14.0.

TRUE/FALSE are not defined anymore. 1 and 0 are used instead.
---
src/newsblurapi.cpp | 13 +++++++++++++
1 file changed, 13 insertions(+)

diff --git a/src/newsblur_api.cpp b/src/newsblur_api.cpp
index 2d1acdae..e124852d 100644
--- a/src/newsblur_api.cpp
+++ b/src/newsblur_api.cpp
@@ -9,6 +9,19 @@
#include "strprintf.h"
#include "utils.h"

+/* json-c 0.13.99 does not define TRUE/FALSE anymore
+ * the json-c maintainers replaced them with pure 1/0
+ * https://github.com/json-c/json-c/commit/0992aac61f8b
+ */
+#if defined JSON_C_VERSION_NUM && JSON_C_VERSION_NUM >= ((13 << 8) | 99)
+#ifndef FALSE
+#define FALSE 0
+#endif
+#ifndef TRUE
+#define TRUE 1
+#endif
+#endif
+
#define NEWSBLUR_ITEMS_PER_PAGE 6

namespace newsboat {
3 changes: 2 additions & 1 deletion net-news/newsboat/newsboat-2.13.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ RDEPEND="
>=dev-db/sqlite-3.5:3
>=dev-libs/stfl-0.21
>=net-misc/curl-7.18.0
<dev-libs/json-c-0.14:=
>=dev-libs/json-c-0.11:=
dev-libs/libxml2
sys-libs/ncurses:0=[unicode]
"
Expand All @@ -36,6 +36,7 @@ DEPEND="${RDEPEND}

PATCHES=(
"${FILESDIR}"/${PN}-2.11-flags.patch
"${FILESDIR}"/${PN}-2.13-json-c-0.14.0.patch
)

src_configure() {
Expand Down

0 comments on commit e3f5ea9

Please sign in to comment.