Hola,

This diff updates newsbeuter to the latest. Most of the patches were
upstreamed here: https://github.com/akrennmair/newsbeuter/pull/97 so
those are removed.

New patches remove wordexp in favor of glob, similar to what
astro/celestia does.

I don't have a very extensive list of RSS feeds and I don't make full
use of newsbeuter's features, so more testing would give me warm
fuzzies!

Removed MAINTAINER at $MAINTAINER's request. Added gcc4 module as
newsbeuter is now -std=c++11. Also the devel/gettext seems to still be
needed as it craps out early in the build without it:

    msgfmt was called without gettext-tools dependency ***

OK? Clue sticks?

Cheers,
Aaron
Index: Makefile
===================================================================
RCS file: /cvs/ports/www/newsbeuter/Makefile,v
retrieving revision 1.7
diff -u -p -r1.7 Makefile
--- Makefile    23 Sep 2016 09:16:58 -0000      1.7
+++ Makefile    26 Jan 2017 22:22:16 -0000
@@ -1,23 +1,24 @@
 # $OpenBSD: Makefile,v 1.7 2016/09/23 09:16:58 sthen Exp $
 
 COMMENT =              open-source RSS/Atom feed reader for text terminals
-DISTNAME =             newsbeuter-2.7
-REVISION =             1
+DISTNAME =             newsbeuter-2.9
 CATEGORIES =           www
 
 HOMEPAGE =             http://newsbeuter.org/
 
-MAINTAINER =           Kyle Isom <k...@tyrfingr.is>
-
 # mit
 PERMIT_PACKAGE_CDROM = Yes
 
-WANTLIB += c crypto curl json-c m ncursesw pthread sqlite3
-WANTLIB += stdc++ stfl xml2
+WANTLIB += c crypto curl json-c m ncursesw pthread sqlite3 stfl
+WANTLIB += xml2
 
 MASTER_SITES =         http://newsbeuter.org/downloads/
 
-MODULES =              devel/gettext
+MODULES =              gcc4 \
+                       devel/gettext
+
+MODGCC4_LANGS = c c++
+MODGCC4_ARCHS = *
 
 LIB_DEPENDS =          databases/sqlite3 \
                        devel/stfl \
@@ -31,8 +32,5 @@ FAKE_FLAGS =          mandir=${PREFIX}/man
 USE_GMAKE =            Yes
 CONFIGURE_STYLE =      simple
 CONFIGURE_SCRIPT =     config.sh
-
-post-extract:
-       rm $(WRKSRC)/src/google*.cpp
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/www/newsbeuter/distinfo,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 distinfo
--- distinfo    16 Oct 2013 18:05:25 -0000      1.1.1.1
+++ distinfo    26 Jan 2017 22:22:16 -0000
@@ -1,2 +1,2 @@
-SHA256 (newsbeuter-2.7.tar.gz) = 5nINp6w/Xqg7w5zRe9Ycz0WLcWf1oXFwrjLHtuj/kDo=
-SIZE (newsbeuter-2.7.tar.gz) = 418848
+SHA256 (newsbeuter-2.9.tar.gz) = dKi/AZsJw7JwupWtwp8rvkjqH1XMBjQnayH8zh8EPcg=
+SIZE (newsbeuter-2.9.tar.gz) = 432763
Index: patches/patch-config_sh
===================================================================
RCS file: patches/patch-config_sh
diff -N patches/patch-config_sh
--- patches/patch-config_sh     16 Oct 2013 18:05:25 -0000      1.1.1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,18 +0,0 @@
-$OpenBSD: patch-config_sh,v 1.1.1.1 2013/10/16 18:05:25 abieber Exp $
-
-This is covered in the pull request sent upstream:
-       https://github.com/akrennmair/newsbeuter/pull/97
-
-If this pull request is merged, this patch will no longer apply.
-
---- config.sh.orig     Tue Aug 27 06:20:39 2013
-+++ config.sh  Tue Oct 15 18:15:15 2013
-@@ -103,7 +103,7 @@ check_pkg "stfl" || fail "stfl"
- 
- if [ `uname -s` = "Darwin" ]; then
-       check_custom "ncurses5.4" "ncurses5.4-config" || fail "ncurses5.4"
--else 
-+elif [ `uname -s` != "OpenBSD" ]; then
-       check_custom "ncursesw5" "ncursesw5-config" || fail "ncursesw5"
- fi
- check_ssl_implementation
Index: patches/patch-mk_newsbeuter_deps
===================================================================
RCS file: patches/patch-mk_newsbeuter_deps
diff -N patches/patch-mk_newsbeuter_deps
--- patches/patch-mk_newsbeuter_deps    16 Oct 2013 18:05:25 -0000      1.1.1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-mk_newsbeuter_deps,v 1.1.1.1 2013/10/16 18:05:25 abieber Exp $
-
-This is covered in the pull request sent upstream:
-       https://github.com/akrennmair/newsbeuter/pull/97
-
-If this pull request is merged, this patch will no longer apply.
-
---- mk/newsbeuter.deps.orig    Mon Oct 14 23:27:54 2013
-+++ mk/newsbeuter.deps Mon Oct 14 23:23:25 2013
-@@ -1 +1 @@
--newsbeuter.cpp src/cache.cpp  src/htmlrenderer.cpp src/urlreader.cpp 
src/logger.cpp src/view.cpp src/controller.cpp src/reloadthread.cpp 
src/tagsouppullparser.cpp src/downloadthread.cpp src/rss.cpp src/rss_parser.cpp 
src/formaction.cpp src/feedlist_formaction.cpp src/itemlist_formaction.cpp 
src/itemview_formaction.cpp src/help_formaction.cpp 
src/filebrowser_formaction.cpp src/urlview_formaction.cpp 
src/select_formaction.cpp src/history.cpp src/filtercontainer.cpp 
src/listformatter.cpp src/regexmanager.cpp src/dialogs_formaction.cpp 
src/googlereader_urlreader.cpp src/google_api.cpp src/ttrss_api.cpp 
src/ttrss_urlreader.cpp src/markreadthread.cpp
-+newsbeuter.cpp src/cache.cpp  src/htmlrenderer.cpp src/urlreader.cpp 
src/logger.cpp src/view.cpp src/controller.cpp src/reloadthread.cpp 
src/tagsouppullparser.cpp src/downloadthread.cpp src/rss.cpp src/rss_parser.cpp 
src/formaction.cpp src/feedlist_formaction.cpp src/itemlist_formaction.cpp 
src/itemview_formaction.cpp src/help_formaction.cpp 
src/filebrowser_formaction.cpp src/urlview_formaction.cpp 
src/select_formaction.cpp src/history.cpp src/filtercontainer.cpp 
src/listformatter.cpp src/regexmanager.cpp src/dialogs_formaction.cpp 
src/ttrss_api.cpp src/ttrss_urlreader.cpp src/markreadthread.cpp
Index: patches/patch-src_cache_cpp
===================================================================
RCS file: patches/patch-src_cache_cpp
diff -N patches/patch-src_cache_cpp
--- patches/patch-src_cache_cpp 5 Oct 2015 19:46:22 -0000       1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,77 +0,0 @@
-$OpenBSD: patch-src_cache_cpp,v 1.1 2015/10/05 19:46:22 jca Exp $
---- src/cache.cpp.orig Tue Aug 27 14:20:39 2013
-+++ src/cache.cpp      Sun Oct  4 19:56:03 2015
-@@ -80,7 +80,7 @@ static int lastmodified_callback(void * handler, int a
-       } else {
-               result->etag = "";
-       }
--      LOG(LOG_INFO, "lastmodified_callback: lastmodified = %d etag = %s", 
result->lastmodified, result->etag.c_str());
-+      LOG(LOG_INFO, "lastmodified_callback: lastmodified = %lld etag = %s", 
(long long)result->lastmodified, result->etag.c_str());
-       return 0;
- }
- 
-@@ -295,7 +295,7 @@ void cache::fetch_lastmodified(const std::string& feed
-       }
-       t = result.lastmodified;
-       etag = result.etag;
--      LOG(LOG_DEBUG, "cache::fetch_lastmodified: t = %d etag = %s", t, 
etag.c_str());
-+      LOG(LOG_DEBUG, "cache::fetch_lastmodified: t = %lld etag = %s", (long 
long)t, etag.c_str());
- }
- 
- void cache::update_lastmodified(const std::string& feedurl, time_t t, const 
std::string& etag) {
-@@ -306,7 +306,7 @@ void cache::update_lastmodified(const std::string& fee
-       scope_mutex lock(&mtx);
-       std::string query = "UPDATE rss_feed SET ";
-       if (t > 0)
--              query.append(utils::strprintf("lastmodified = '%d'", t));
-+              query.append(utils::strprintf("lastmodified = '%lld'", (long 
long)t));
-       if (etag.length() > 0)
-               query.append(utils::strprintf("%c etag = %s", (t > 0 ? ',' : ' 
'), prepare_query("'%q'", etag.c_str()).c_str()));
-       query.append(" WHERE rssurl = ");
-@@ -643,9 +643,9 @@ void cache::update_rssitem_unlocked(std::tr1::shared_p
-               }
-       } else {
-               std::string insert = prepare_query("INSERT INTO rss_item 
(guid,title,author,url,feedurl,pubDate,content,unread,enclosure_url,enclosure_type,enqueued,
 base) "
--                                                              "VALUES 
('%q','%q','%q','%q','%q','%u','%q','%d','%q','%q',%d, '%q')",
-+                                                              "VALUES 
('%q','%q','%q','%q','%q','%lld','%q','%d','%q','%q',%d, '%q')",
-                                                               
item->guid().c_str(), item->title_raw().c_str(), item->author_raw().c_str(), 
--                                                              
item->link().c_str(), feedurl.c_str(), item->pubDate_timestamp(), 
item->description_raw().c_str(), (item->unread() ? 1 : 0),
-+                                                              
item->link().c_str(), feedurl.c_str(), (long long)item->pubDate_timestamp(), 
item->description_raw().c_str(), (item->unread() ? 1 : 0),
-                                                               
item->enclosure_url().c_str(), item->enclosure_type().c_str(), item->enqueued() 
? 1 : 0, item->get_base().c_str());
-               LOG(LOG_DEBUG,"running query: %s", insert.c_str());
-               rc = sqlite3_exec(db,insert.c_str(),NULL,NULL,NULL);
-@@ -715,9 +715,9 @@ void cache::update_rssitem_unread_and_enqueued(rss_ite
-               }
-       } else {
-               std::string insert = prepare_query("INSERT INTO rss_item 
(guid,title,author,url,feedurl,pubDate,content,unread,enclosure_url,enclosure_type,enqueued,flags,base)
 "
--                                                                              
"VALUES ('%q','%q','%q','%q','%q','%u','%q','%d','%q','%q',%d, '%q', '%q')",
-+                                                                              
"VALUES ('%q','%q','%q','%q','%q','%lld','%q','%d','%q','%q',%d, '%q', '%q')",
-                                                                               
item->guid().c_str(), item->title_raw().c_str(), item->author_raw().c_str(), 
--                                                                              
item->link().c_str(), feedurl.c_str(), item->pubDate_timestamp(), 
item->description_raw().c_str(), item->unread() ? 1 : 0,
-+                                                                              
item->link().c_str(), feedurl.c_str(), (long long)item->pubDate_timestamp(), 
item->description_raw().c_str(), item->unread() ? 1 : 0,
-                                                                               
item->enclosure_url().c_str(), item->enclosure_type().c_str(), item->enqueued() 
? 1 : 0, item->flags().c_str(), 
-                                                                               
item->get_base().c_str());
-               LOG(LOG_DEBUG,"running query: %s", insert.c_str());
-@@ -753,9 +753,9 @@ void cache::update_rssitem_unread_and_enqueued(std::tr
-               }
-       } else {
-               std::string insert = prepare_query("INSERT INTO rss_item 
(guid,title,author,url,feedurl,pubDate,content,unread,enclosure_url,enclosure_type,enqueued,flags,base)
 "
--                                                                              
"VALUES ('%q','%q','%q','%q','%q','%u','%q','%d','%q','%q',%d, '%q', '%q')",
-+                                                                              
"VALUES ('%q','%q','%q','%q','%q','%lld','%q','%d','%q','%q',%d, '%q', '%q')",
-                                                                               
item->guid().c_str(), item->title_raw().c_str(), item->author_raw().c_str(), 
--                                                                              
item->link().c_str(), feedurl.c_str(), item->pubDate_timestamp(), 
item->description_raw().c_str(), (item->unread() ? 1 : 0),
-+                                                                              
item->link().c_str(), feedurl.c_str(), (long long)item->pubDate_timestamp(), 
item->description_raw().c_str(), (item->unread() ? 1 : 0),
-                                                                               
item->enclosure_url().c_str(), item->enclosure_type().c_str(), item->enqueued() 
? 1 : 0, item->flags().c_str(),
-                                                                               
item->get_base().c_str());
-               LOG(LOG_DEBUG,"running query: %s", insert.c_str());
-@@ -876,8 +876,8 @@ void cache::clean_old_articles() {
-       if (days > 0) {
-               time_t old_date = time(NULL) - days*24*60*60;
- 
--              std::string query(utils::strprintf("DELETE FROM rss_item WHERE 
pubDate < %d", old_date));
--              LOG(LOG_DEBUG, "cache::clean_old_articles: about to delete 
articles with a pubDate older than %d", old_date);
-+              std::string query(utils::strprintf("DELETE FROM rss_item WHERE 
pubDate < %lld", (long long)old_date));
-+              LOG(LOG_DEBUG, "cache::clean_old_articles: about to delete 
articles with a pubDate older than %lld", (long long)old_date);
-               int rc = sqlite3_exec(db, query.c_str(), NULL, NULL, NULL);
-               LOG(LOG_DEBUG, "cache::clean_old_artgicles: old article delete 
result: rc = %d", rc);
-       } else {
Index: patches/patch-src_controller_cpp
===================================================================
RCS file: patches/patch-src_controller_cpp
diff -N patches/patch-src_controller_cpp
--- patches/patch-src_controller_cpp    16 Oct 2013 18:05:25 -0000      1.1.1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,54 +0,0 @@
-$OpenBSD: patch-src_controller_cpp,v 1.1.1.1 2013/10/16 18:05:25 abieber Exp $
-
-This is covered in the pull request sent upstream:
-       https://github.com/akrennmair/newsbeuter/pull/97
-
-If this pull request is merged, this patch will no longer apply.
-
---- src/controller.cpp.orig    Mon Oct 14 23:28:46 2013
-+++ src/controller.cpp Mon Oct 14 23:23:25 2013
-@@ -434,10 +434,6 @@ void controller::run(int argc, char * argv[]) {
-       } else if (type == "opml") {
-               urlcfg = new opml_urlreader(&cfg);
-               real_offline_mode = offline_mode;
--      } else if (type == "googlereader") {
--              api = new googlereader_api(&cfg);
--              urlcfg = new googlereader_urlreader(&cfg, url_file, api);
--              real_offline_mode = offline_mode;
-       } else if (type == "ttrss") {
-               api = new ttrss_api(&cfg);
-               urlcfg = new ttrss_urlreader(&cfg, url_file, api);
-@@ -472,19 +468,6 @@ void controller::run(int argc, char * argv[]) {
-               if (!do_export && !silent) {
-                       std::cout << _("done.") << std::endl;
-               }
--              if (api && type == "googlereader") { // ugly hack!
--                      std::vector<google_replay_pair> actions = 
rsscache->get_google_replay();
--                      if (!actions.empty()) {
--                              std::cout << _("Updating Google Reader unread 
states...");
--                              std::cout.flush();
--
--                              std::vector<std::string> successful_guids = 
dynamic_cast<googlereader_api *>(api)->bulk_mark_articles_read(actions);
--
--                              
rsscache->delete_google_replay_by_guid(successful_guids);
--
--                              std::cout << _("done.") << std::endl;
--                      }
--              }
-       }
- 
-       if (urlcfg->get_urls().size() == 0) {
-@@ -669,12 +652,7 @@ void controller::catchup_all() {
- void controller::mark_article_read(const std::string& guid, bool read) {
-       if (api) {
-               if (offline_mode) {
--                      if (dynamic_cast<googlereader_api *>(api) != NULL) {
--                              LOG(LOG_DEBUG, "controller::mark_article_read: 
recording %s", guid.c_str());
--                              record_google_replay(guid, read);
--                      } else {
--                              LOG(LOG_DEBUG, "not on googlereader_api");
--                      }
-+                      LOG(LOG_DEBUG, "not on googlereader_api");
-               } else {
-                       api->mark_article_read(guid, read);
-               }
Index: patches/patch-src_feedhq_api_cpp
===================================================================
RCS file: patches/patch-src_feedhq_api_cpp
diff -N patches/patch-src_feedhq_api_cpp
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_feedhq_api_cpp    26 Jan 2017 22:22:16 -0000
@@ -0,0 +1,31 @@
+$OpenBSD$
+--- src/feedhq_api.cpp.orig    Tue Oct 11 09:07:30 2016
++++ src/feedhq_api.cpp Tue Oct 11 09:12:45 2016
+@@ -1,7 +1,7 @@
+ #include <vector>
+ #include <cstring>
+ #include <iostream>
+-#include <wordexp.h>
++#include <glob.h>
+ 
+ #include <feedhq_api.h>
+ #include <config.h>
+@@ -63,11 +63,13 @@ std::string feedhq_api::retrieve_auth() {
+ 
+       std::string pass = cfg->get_configvalue("feedhq-password");
+       if( pass == "" ) {
+-              wordexp_t exp;
+-              std::ifstream ifs;
+-              
wordexp(cfg->get_configvalue("feedhq-passwordfile").c_str(),&exp,0);
+-              ifs.open(exp.we_wordv[0]);
+-              wordfree(&exp);
++                glob_t exp;
++                std::ifstream ifs;
++                int res = 
glob(cfg->get_configvalue("feedhq-passwordfile").c_str(), GLOB_ERR, NULL, &exp);
++                if (!res && exp.gl_pathc == 1 && exp.gl_pathv) {
++                        ifs.open(exp.gl_pathv[0]);
++                }
++                globfree(&exp);
+               if (!ifs) {
+                       if(!flushed) {
+                               std::cout << std::endl;
Index: patches/patch-src_oldreader_api_cpp
===================================================================
RCS file: patches/patch-src_oldreader_api_cpp
diff -N patches/patch-src_oldreader_api_cpp
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_oldreader_api_cpp 26 Jan 2017 22:22:16 -0000
@@ -0,0 +1,31 @@
+$OpenBSD$
+--- src/oldreader_api.cpp.orig Tue Oct 11 09:07:35 2016
++++ src/oldreader_api.cpp      Tue Oct 11 09:11:49 2016
+@@ -1,7 +1,7 @@
+ #include <vector>
+ #include <cstring>
+ #include <iostream>
+-#include <wordexp.h>
++#include <glob.h>
+ 
+ #include <oldreader_api.h>
+ #include <config.h>
+@@ -65,11 +65,13 @@ std::string oldreader_api::retrieve_auth() {
+ 
+       std::string pass = cfg->get_configvalue("oldreader-password");
+       if( pass == "" ) {
+-              wordexp_t exp;
+-              std::ifstream ifs;
+-              
wordexp(cfg->get_configvalue("oldreader-passwordfile").c_str(),&exp,0);
+-              ifs.open(exp.we_wordv[0]);
+-              wordfree(&exp);
++                glob_t exp;
++                std::ifstream ifs;
++                int res = 
glob(cfg->get_configvalue("oldreader-passwordfile").c_str(), GLOB_ERR, NULL, 
&exp);
++                if (!res && exp.gl_pathc == 1 && exp.gl_pathv) {
++                        ifs.open(exp.gl_pathv[0]);
++                }
++                globfree(&exp);
+               if (!ifs) {
+                       if(!flushed) {
+                               std::cout << std::endl;
Index: patches/patch-src_ttrss_api_cpp
===================================================================
RCS file: patches/patch-src_ttrss_api_cpp
diff -N patches/patch-src_ttrss_api_cpp
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_ttrss_api_cpp     26 Jan 2017 22:22:16 -0000
@@ -0,0 +1,30 @@
+$OpenBSD$
+--- src/ttrss_api.cpp.orig     Tue Oct 11 09:07:40 2016
++++ src/ttrss_api.cpp  Tue Oct 11 09:10:44 2016
+@@ -4,7 +4,7 @@
+ #include <cstring>
+ #include <algorithm>
+ 
+-#include <wordexp.h>
++#include <glob.h>
+ #include <unistd.h>
+ #include <iostream>
+ 
+@@ -54,11 +54,13 @@ std::string ttrss_api::retrieve_sid() {
+ 
+       std::string pass = cfg->get_configvalue("ttrss-password");
+       if (pass == "") {
+-              wordexp_t exp;
++              glob_t exp;
+               std::ifstream ifs;
+-              
wordexp(cfg->get_configvalue("ttrss-passwordfile").c_str(),&exp,0);
+-              ifs.open(exp.we_wordv[0]);
+-              wordfree(&exp);
++              int res = 
glob(cfg->get_configvalue("ttrss-passwordfile").c_str(), GLOB_ERR, NULL, &exp);
++              if (!res && exp.gl_pathc == 1 && exp.gl_pathv) {
++                      ifs.open(exp.gl_pathv[0]);
++              }
++              globfree(&exp);
+               if (!ifs) {
+                       if(!flushed) {
+                               std::cout << std::endl;
Index: patches/patch-src_utils_cpp
===================================================================
RCS file: patches/patch-src_utils_cpp
diff -N patches/patch-src_utils_cpp
--- patches/patch-src_utils_cpp 16 Oct 2013 18:05:25 -0000      1.1.1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,18 +0,0 @@
-$OpenBSD: patch-src_utils_cpp,v 1.1.1.1 2013/10/16 18:05:25 abieber Exp $
-
-This is covered in the pull request sent upstream:
-       https://github.com/akrennmair/newsbeuter/pull/97
-
-If this pull request is merged, this patch will no longer apply.
-
---- src/utils.cpp.orig Tue Aug 27 06:20:39 2013
-+++ src/utils.cpp      Mon Oct 14 22:06:09 2013
-@@ -274,7 +274,7 @@ std::string utils::convert_text(const std::string& tex
-  * of all the Unix-like systems around there, only Linux/glibc seems to 
-  * come with a SuSv3-conforming iconv implementation.
-  */
--#if !(__linux) && !defined(__GLIBC__) && !defined(__APPLE__)
-+#if !(__linux) && !defined(__GLIBC__) && !defined(__APPLE__) && 
!defined(__OpenBSD__)
-       const char * inbufp;
- #else
-       char * inbufp;

Reply via email to