- updated to 2.9 master auto/th/newsbeuter-2.9-1
authorJakub Bogusz <qboosh@pld-linux.org>
Thu, 17 May 2018 19:15:25 +0000 (21:15 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Thu, 17 May 2018 19:15:25 +0000 (21:15 +0200)
- added json_c patch (fix build with json-c 0.13 without deprecated APIs)

newsbeuter-compile-flags.patch [deleted file]
newsbeuter-json_c.patch [new file with mode: 0644]
newsbeuter.spec

diff --git a/newsbeuter-compile-flags.patch b/newsbeuter-compile-flags.patch
deleted file mode 100644 (file)
index 23b7663..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-diff -u newsbeuter-2.1.orig/config.sh newsbeuter-2.1/config.sh
---- newsbeuter-2.1.orig/config.sh      2009-12-08 22:37:05.000000000 +0100
-+++ newsbeuter-2.1/config.sh   2009-12-10 21:50:20.589265555 +0100
-@@ -78,5 +78,5 @@
- check_pkg "sqlite3" || fail "sqlite3"
- check_pkg "libcurl" || check_custom "libcurl" "curl-config" || fail "libcurl"
- check_pkg "libxml-2.0" || check_custom "libxml2" "xml2-config" || fail "libxml2"
--check_pkg "stfl" "" "--static" || fail "stfl"
-+check_pkg "stfl" || fail "stfl"
- all_aboard_the_fail_boat
-Subdirectoris comuns: newsbeuter-2.1.orig/contrib i newsbeuter-2.1/contrib
-Subdirectoris comuns: newsbeuter-2.1.orig/doc i newsbeuter-2.1/doc
-Subdirectoris comuns: newsbeuter-2.1.orig/filter i newsbeuter-2.1/filter
-Subdirectoris comuns: newsbeuter-2.1.orig/include i newsbeuter-2.1/include
-diff -u newsbeuter-2.1.orig/Makefile newsbeuter-2.1/Makefile
---- newsbeuter-2.1.orig/Makefile       2009-12-08 22:37:05.000000000 +0100
-+++ newsbeuter-2.1/Makefile    2009-12-10 21:52:25.935524817 +0100
-@@ -11,7 +11,7 @@
- # compiler and linker flags
- DEFINES=-DLOCALEDIR=\"$(localedir)\"
- WARNFLAGS=-Wall -Wextra
--CXXFLAGS+=-ggdb -I/sw/include -Iinclude -Istfl -Ifilter -I. -Irss $(WARNFLAGS) $(DEFINES)
-+CXXFLAGS+=$(OPTCXXFLAGS) -I/sw/include -Iinclude -Istfl -Ifilter -I. -Irss $(WARNFLAGS) $(DEFINES)
- LDFLAGS+=-L. -L/sw/lib
- PACKAGE=newsbeuter
-@@ -69,10 +69,10 @@
- NB_DEPS=$(MOFILES) $(LIB_OUTPUT) $(FILTERLIB_OUTPUT) $(NEWSBEUTER_OBJS) $(RSSPPLIB_OUTPUT)
- $(NEWSBEUTER): $(NB_DEPS)
--      $(CXX) $(CXXFLAGS) -o $(NEWSBEUTER) $(NEWSBEUTER_OBJS) $(NEWSBEUTER_LIBS) $(LDFLAGS)
-+      $(CXX) $(CXXFLAGS) $(REALLDFLAGS) -o $(NEWSBEUTER) $(NEWSBEUTER_OBJS) $(NEWSBEUTER_LIBS) $(LDFLAGS)
- $(PODBEUTER): $(MOFILES) $(LIB_OUTPUT) $(PODBEUTER_OBJS)
--      $(CXX) $(CXXFLAGS) -o $(PODBEUTER) $(PODBEUTER_OBJS) $(PODBEUTER_LIBS) $(LDFLAGS)
-+      $(CXX) $(CXXFLAGS) $(REALLDFLAGS) -o $(PODBEUTER) $(PODBEUTER_OBJS) $(PODBEUTER_LIBS) $(LDFLAGS)
- $(LIB_OUTPUT): $(LIB_OBJS)
-       $(RM) $@
-Subdirectoris comuns: newsbeuter-2.1.orig/po i newsbeuter-2.1/po
-Subdirectoris comuns: newsbeuter-2.1.orig/rss i newsbeuter-2.1/rss
-Subdirectoris comuns: newsbeuter-2.1.orig/src i newsbeuter-2.1/src
-Subdirectoris comuns: newsbeuter-2.1.orig/stfl i newsbeuter-2.1/stfl
-Subdirectoris comuns: newsbeuter-2.1.orig/test i newsbeuter-2.1/test
diff --git a/newsbeuter-json_c.patch b/newsbeuter-json_c.patch
new file mode 100644 (file)
index 0000000..96c2d58
--- /dev/null
@@ -0,0 +1,47 @@
+--- newsbeuter-2.9/src/ttrss_api.cpp.orig      2018-05-17 20:41:01.189862343 +0200
++++ newsbeuter-2.9/src/ttrss_api.cpp   2018-05-17 20:41:06.496528947 +0200
+@@ -113,19 +113,19 @@
+       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 == nullptr) {
+               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 == nullptr) {
+               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 == nullptr) {
+               LOG(LOG_ERROR, "ttrss_api::run_op: no content part in answer from server");
+               return NULL;
+       }
+--- newsbeuter-2.9/src/oldreader_api.cpp.orig  2015-02-19 11:56:59.000000000 +0100
++++ newsbeuter-2.9/src/oldreader_api.cpp       2018-05-17 20:43:12.683194179 +0200
+@@ -134,7 +134,7 @@
+       // TODO: parse result
+       struct json_object * reply = json_tokener_parse(result.c_str());
+-      if (is_error(reply)) {
++      if (reply == nullptr) {
+               LOG(LOG_ERROR, "oldreader_api::get_subscribed_urls: failed to parse response as JSON.");
+               return urls;
+       }
+--- newsbeuter-2.9/src/feedhq_api.cpp.orig     2015-02-19 11:56:59.000000000 +0100
++++ newsbeuter-2.9/src/feedhq_api.cpp  2018-05-17 20:45:04.159859569 +0200
+@@ -132,7 +132,7 @@
+       // TODO: parse result
+       struct json_object * reply = json_tokener_parse(result.c_str());
+-      if (is_error(reply)) {
++      if (reply == nullptr) {
+               LOG(LOG_ERROR, "feedhq_api::get_subscribed_urls: failed to parse response as JSON.");
+               return urls;
+       }
index 8864ff1..25afbae 100644 (file)
@@ -2,22 +2,26 @@ Summary:      Newsbeuter - an RSS feed reader for the text console
 Summary(hu.UTF-8):     Newsbeuter - egy RSS hírolvasó szöveges terminálra
 Summary(pl.UTF-8):     Newsbeuter - czytnik RSS dla terminala tekstowego
 Name:          newsbeuter
-Version:       2.8
+Version:       2.9
 Release:       1
 License:       MIT/X
 Group:         Applications/Networking
-Source0:       http://www.newsbeuter.org/downloads/%{name}-%{version}.tar.gz
-# Source0-md5: 5d8f1a5eed700beccfeb512ae003613d
-URL:           http://www.newsbeuter.org/
+#Source0Download: https://www.newsbeuter.org/download.html
+Source0:       https://www.newsbeuter.org/downloads/%{name}-%{version}.tar.gz
+# Source0-md5: 9cf332dc7e591023147bda7add430835
+Patch0:                %{name}-json_c.patch
+URL:           https://www.newsbeuter.org/
 BuildRequires: curl-devel
 BuildRequires: gettext-tools
-BuildRequires: libstdc++-devel
-BuildRequires: libxml2-devel
-BuildRequires: ncurses-devel
+BuildRequires: json-c-devel >= 0.11
+BuildRequires: libstdc++-devel >= 6:4.7
+BuildRequires: libxml2-devel >= 2
+BuildRequires: ncurses-devel >= 6
 BuildRequires: perl-base
 BuildRequires: pkgconfig
-BuildRequires: sqlite3-devel
+BuildRequires: sqlite3-devel >= 3
 BuildRequires: stfl-devel >= 0.21-4
+Requires:      json-c >= 0.11
 Suggests:      wwwbrowser
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -35,10 +39,13 @@ tekstowych w systemach uniksowych.
 
 %prep
 %setup -q
+%patch0 -p1
+
 %{__sed} -i "s@ncursesw5@ncursesw6@g" config.sh
 
 %build
-CXXFLAGS="%{rpmcxxflags}" %{__make} \
+CXXFLAGS="%{rpmcxxflags}" \
+%{__make} \
        CXX="%{__cxx}" \
        REALLDFLAGS="%{rpmldflags}" \
        prefix=%{_prefix}
@@ -49,9 +56,12 @@ rm -rf $RPM_BUILD_ROOT
 %{__make} install \
        prefix=$RPM_BUILD_ROOT%{_prefix}
 
+# packaged as %doc
+%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
+
 %{__mv} $RPM_BUILD_ROOT%{_datadir}/locale/zh{,_CN}
+# less up-to-date version of es
 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/locale/es_ES
-%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
 
 %find_lang %{name}
 
@@ -60,8 +70,8 @@ rm -rf $RPM_BUILD_ROOT
 
 %files -f %{name}.lang
 %defattr(644,root,root,755)
-%doc AUTHORS README TODO doc/*.txt doc/xhtml/*.html doc/example-config
-%attr(755,root,root) %{_bindir}/%{name}
+%doc AUTHORS CHANGES LICENSE README TODO doc/*.txt doc/xhtml/*.html doc/example-config
+%attr(755,root,root) %{_bindir}/newsbeuter
 %attr(755,root,root) %{_bindir}/podbeuter
-%{_mandir}/man1/%{name}*
-%{_mandir}/man1/podbeuter*
+%{_mandir}/man1/newsbeuter.1*
+%{_mandir}/man1/podbeuter.1*
This page took 0.143089 seconds and 4 git commands to generate.