pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/news/newsbeuter newsbeuter: Fix build with new json-c.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/3adbaa2802d5
branches:  trunk
changeset: 397698:3adbaa2802d5
user:      nia <nia%pkgsrc.org@localhost>
date:      Tue Jul 02 07:37:54 2019 +0000

description:
newsbeuter: Fix build with new json-c.

https://github.com/json-c/json-c/issues/304

XXX pullup?

diffstat:

 news/newsbeuter/Makefile                             |   4 +-
 news/newsbeuter/distinfo                             |   5 ++-
 news/newsbeuter/patches/patch-src_feedhq__api.cpp    |  17 ++++++++++
 news/newsbeuter/patches/patch-src_oldreader__api.cpp |  17 ++++++++++
 news/newsbeuter/patches/patch-src_ttrss__api.cpp     |  31 ++++++++++++++++++++
 5 files changed, 71 insertions(+), 3 deletions(-)

diffs (106 lines):

diff -r fc36479623dd -r 3adbaa2802d5 news/newsbeuter/Makefile
--- a/news/newsbeuter/Makefile  Tue Jul 02 07:32:58 2019 +0000
+++ b/news/newsbeuter/Makefile  Tue Jul 02 07:37:54 2019 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.22 2019/07/01 04:08:44 ryoon Exp $
+# $NetBSD: Makefile,v 1.23 2019/07/02 07:37:54 nia Exp $
 
 DISTNAME=      newsbeuter-2.9
-PKGREVISION=   20
+PKGREVISION=   21
 CATEGORIES=    news
 MASTER_SITES=  https://www.newsbeuter.org/downloads/
 
diff -r fc36479623dd -r 3adbaa2802d5 news/newsbeuter/distinfo
--- a/news/newsbeuter/distinfo  Tue Jul 02 07:32:58 2019 +0000
+++ b/news/newsbeuter/distinfo  Tue Jul 02 07:37:54 2019 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.2 2016/12/16 00:00:25 joerg Exp $
+$NetBSD: distinfo,v 1.3 2019/07/02 07:37:54 nia Exp $
 
 SHA1 (newsbeuter-2.9.tar.gz) = e0d61cda874ea9b77ed27f2edfea50a6ea471894
 RMD160 (newsbeuter-2.9.tar.gz) = b93adbf5305191c40f3e4b2d770d9984bb7c32e3
@@ -9,3 +9,6 @@
 SHA1 (patch-include_configcontainer.h) = 54c7756cf29550c60181c3cdf52e9178183b78ed
 SHA1 (patch-src_configcontainer.cpp) = 3f799235a4d36acbfa3938ed68abd48776eb143f
 SHA1 (patch-src_controller.cpp) = 927b11064deac38acbb577aa0d3f750f72c0e55a
+SHA1 (patch-src_feedhq__api.cpp) = 53d2807fc03cc048b6af928d304efcf9c6bd5c70
+SHA1 (patch-src_oldreader__api.cpp) = fccad7823870717eab2f0c87e3ab78465dbf8128
+SHA1 (patch-src_ttrss__api.cpp) = 60e0f71819c6a91d7d8ab44daf24e1df06029601
diff -r fc36479623dd -r 3adbaa2802d5 news/newsbeuter/patches/patch-src_feedhq__api.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/news/newsbeuter/patches/patch-src_feedhq__api.cpp Tue Jul 02 07:37:54 2019 +0000
@@ -0,0 +1,17 @@
+$NetBSD: patch-src_feedhq__api.cpp,v 1.1 2019/07/02 07:37:54 nia Exp $
+
+Update for newer json-c API.
+
+https://github.com/json-c/json-c/issues/304
+
+--- src/feedhq_api.cpp.orig    2015-02-19 10:56:59.000000000 +0000
++++ src/feedhq_api.cpp
+@@ -132,7 +132,7 @@ std::vector<tagged_feedurl> feedhq_api::
+       // TODO: parse result
+ 
+       struct json_object * reply = json_tokener_parse(result.c_str());
+-      if (is_error(reply)) {
++      if (reply == NULL) {
+               LOG(LOG_ERROR, "feedhq_api::get_subscribed_urls: failed to parse response as JSON.");
+               return urls;
+       }
diff -r fc36479623dd -r 3adbaa2802d5 news/newsbeuter/patches/patch-src_oldreader__api.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/news/newsbeuter/patches/patch-src_oldreader__api.cpp      Tue Jul 02 07:37:54 2019 +0000
@@ -0,0 +1,17 @@
+$NetBSD: patch-src_oldreader__api.cpp,v 1.1 2019/07/02 07:37:54 nia Exp $
+
+Update for newer json-c API.
+
+https://github.com/json-c/json-c/issues/304
+
+--- src/oldreader_api.cpp.orig 2015-02-19 10:56:59.000000000 +0000
++++ src/oldreader_api.cpp
+@@ -134,7 +134,7 @@ std::vector<tagged_feedurl> oldreader_ap
+       // TODO: parse result
+ 
+       struct json_object * reply = json_tokener_parse(result.c_str());
+-      if (is_error(reply)) {
++      if (reply == NULL) {
+               LOG(LOG_ERROR, "oldreader_api::get_subscribed_urls: failed to parse response as JSON.");
+               return urls;
+       }
diff -r fc36479623dd -r 3adbaa2802d5 news/newsbeuter/patches/patch-src_ttrss__api.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/news/newsbeuter/patches/patch-src_ttrss__api.cpp  Tue Jul 02 07:37:54 2019 +0000
@@ -0,0 +1,31 @@
+$NetBSD: patch-src_ttrss__api.cpp,v 1.1 2019/07/02 07:37:54 nia Exp $
+
+Update for newer json-c API.
+
+https://github.com/json-c/json-c/issues/304
+
+--- src/ttrss_api.cpp.orig     2015-02-19 10:56:59.000000000 +0000
++++ src/ttrss_api.cpp
+@@ -113,19 +113,19 @@ struct json_object * ttrss_api::run_op(c
+       LOG(LOG_DEBUG, "ttrss_api::run_op(%s,...): post=%s reply = %s", op.c_str(), req_data.c_str(), result.c_str());
+ 
+       struct json_object * reply = json_tokener_parse(result.c_str());
+-      if (is_error(reply)) {
++      if (reply == NULL) {
+               LOG(LOG_ERROR, "ttrss_api::run_op: reply failed to parse: %s", result.c_str());
+               return NULL;
+       }
+ 
+       struct json_object * status = json_object_object_get(reply, "status");
+-      if (is_error(status)) {
++      if (status == NULL) {
+               LOG(LOG_ERROR, "ttrss_api::run_op: no status code");
+               return NULL;
+       }
+ 
+       struct json_object * content = json_object_object_get(reply, "content");
+-      if (is_error(content)) {
++      if (content == NULL) {
+               LOG(LOG_ERROR, "ttrss_api::run_op: no content part in answer from server");
+               return NULL;
+       }



Home | Main Index | Thread Index | Old Index