net-news/newsboat: apply json-c-0.14 fix

Closes: https://bugs.gentoo.org/730420
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: David Denoncin <ddenoncin@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/16601
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
David Denoncin
2020-07-01 23:34:19 +02:00
committed by Sam James
parent 37665f1284
commit 8ca902514c
2 changed files with 39 additions and 1 deletions

View File

@@ -0,0 +1,37 @@
Patch merged upstream for future versions of newsboat: https://github.com/newsboat/newsboat/pull/883
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 {

View File

@@ -1,4 +1,4 @@
# Copyright 1999-2018 Gentoo Authors
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -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() {