Bug 223290

Summary: [new port] www/newsboat: fork of Newsbeuter, an RSS/Atom feed reader for the text console
Product: Ports & Packages Reporter: Marko Turk <mt-bugs>
Component: Individual Port(s)Assignee: Tilman Keskinoz <arved>
Status: Closed FIXED    
Severity: Affects Only Me CC: arved, david.morgan, joneum, tcberner, uzsolt
Priority: --- Keywords: needs-patch, needs-qa
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 222715    
Attachments:
Description Flags
patch
none
new-patch none

Description Marko Turk 2017-10-28 17:23:51 UTC
Created attachment 187543 [details]
patch

Hi,

from Newsboat's web page:
"Newsboat is a fork of Newsbeuter, an RSS/Atom feed reader for the text console. The only difference is that Newsboat is actively maintained while Newsbeuter isn't."

BR,
Marko
Comment 1 Jochen Neumeister freebsd_committer freebsd_triage 2017-11-04 18:29:25 UTC
Hi Marko,

can you please check this new Port? :-)

With FreeBSD 10.3 and 10.4 I get both i386 and amd64 clang_error (FreeBSD 11 and Current are ok):

=======================<phase: build          >============================
===>  Building for newsboat-2.10.1
gmake[1]: Entering directory '/wrkdirs/usr/ports/www/newsboat/work/newsboat-2cdd33c55664d3deae680c4b09d31c465f858490'
Checking for package sqlite3... found
Checking for package libcurl... found
Checking for package libxml-2.0... found
Checking for package stfl... found
Checking for package json... not found
Checking for package json-c... found
Checking for package ncursesw... not found
Checking for package ncursesw5 using ncursesw5-config... not found
Checking for package libcrypto... not found
c++ -O2 -pipe  -fstack-protector -fno-strict-aliasing  -std=gnu++11 -std=c++11 -ggdb -Iinclude -Istfl -Ifilter -I. -Irss -Werror -Wall -Wextra -Wunreachable-code -DLOCALEDIR=\"/usr/local/share/locale\" -I/usr/local/include  -I/usr/local/include  -I/usr/local/include/libxml2  -I/usr/local/include  -I/usr/local/include/json-c  -DHAVE_OPENSSL=1 -o src/configcontainer.o -c src/configcontainer.cpp
c++ -O2 -pipe  -fstack-protector -fno-strict-aliasing  -std=gnu++11 -std=c++11 -ggdb -Iinclude -Istfl -Ifilter -I. -Irss -Werror -Wall -Wextra -Wunreachable-code -DLOCALEDIR=\"/usr/local/share/locale\" -I/usr/local/include  -I/usr/local/include  -I/usr/local/include/libxml2  -I/usr/local/include  -I/usr/local/include/json-c  -DHAVE_OPENSSL=1 -o src/configparser.o -c src/configparser.cpp
c++ -O2 -pipe  -fstack-protector -fno-strict-aliasing  -std=gnu++11 -std=c++11 -ggdb -Iinclude -Istfl -Ifilter -I. -Irss -Werror -Wall -Wextra -Wunreachable-code -DLOCALEDIR=\"/usr/local/share/locale\" -I/usr/local/include  -I/usr/local/include  -I/usr/local/include/libxml2  -I/usr/local/include  -I/usr/local/include/json-c  -DHAVE_OPENSSL=1 -o src/colormanager.o -c src/colormanager.cpp
c++ -O2 -pipe  -fstack-protector -fno-strict-aliasing  -std=gnu++11 -std=c++11 -ggdb -Iinclude -Istfl -Ifilter -I. -Irss -Werror -Wall -Wextra -Wunreachable-code -DLOCALEDIR=\"/usr/local/share/locale\" -I/usr/local/include  -I/usr/local/include  -I/usr/local/include/libxml2  -I/usr/local/include  -I/usr/local/include/json-c  -DHAVE_OPENSSL=1 -o src/keymap.o -c src/keymap.cpp
c++ -O2 -pipe  -fstack-protector -fno-strict-aliasing  -std=gnu++11 -std=c++11 -ggdb -Iinclude -Istfl -Ifilter -I. -Irss -Werror -Wall -Wextra -Wunreachable-code -DLOCALEDIR=\"/usr/local/share/locale\" -I/usr/local/include  -I/usr/local/include  -I/usr/local/include/libxml2  -I/usr/local/include  -I/usr/local/include/json-c  -DHAVE_OPENSSL=1 -o src/stflpp.o -c src/stflpp.cpp
c++ -O2 -pipe  -fstack-protector -fno-strict-aliasing  -std=gnu++11 -std=c++11 -ggdb -Iinclude -Istfl -Ifilter -I. -Irss -Werror -Wall -Wextra -Wunreachable-code -DLOCALEDIR=\"/usr/local/share/locale\" -I/usr/local/include  -I/usr/local/include  -I/usr/local/include/libxml2  -I/usr/local/include  -I/usr/local/include/json-c  -DHAVE_OPENSSL=1 -o src/logger.o -c src/logger.cpp
c++ -O2 -pipe  -fstack-protector -fno-strict-aliasing  -std=gnu++11 -std=c++11 -ggdb -Iinclude -Istfl -Ifilter -I. -Irss -Werror -Wall -Wextra -Wunreachable-code -DLOCALEDIR=\"/usr/local/share/locale\" -I/usr/local/include  -I/usr/local/include  -I/usr/local/include/libxml2  -I/usr/local/include  -I/usr/local/include/json-c  -DHAVE_OPENSSL=1 -o src/exception.o -c src/exception.cpp
c++ -O2 -pipe  -fstack-protector -fno-strict-aliasing  -std=gnu++11 -std=c++11 -ggdb -Iinclude -Istfl -Ifilter -I. -Irss -Werror -Wall -Wextra -Wunreachable-code -DLOCALEDIR=\"/usr/local/share/locale\" -I/usr/local/include  -I/usr/local/include  -I/usr/local/include/libxml2  -I/usr/local/include  -I/usr/local/include/json-c  -DHAVE_OPENSSL=1 -o src/utils.o -c src/utils.cpp
c++ -O2 -pipe  -fstack-protector -fno-strict-aliasing  -std=gnu++11 -std=c++11 -ggdb -Iinclude -Istfl -Ifilter -I. -Irss -Werror -Wall -Wextra -Wunreachable-code -DLOCALEDIR=\"/usr/local/share/locale\" -I/usr/local/include  -I/usr/local/include  -I/usr/local/include/libxml2  -I/usr/local/include  -I/usr/local/include/json-c  -DHAVE_OPENSSL=1 -o src/fslock.o -c src/fslock.cpp
c++ -O2 -pipe  -fstack-protector -fno-strict-aliasing  -std=gnu++11 -std=c++11 -ggdb -Iinclude -Istfl -Ifilter -I. -Irss -Werror -Wall -Wextra -Wunreachable-code -DLOCALEDIR=\"/usr/local/share/locale\" -I/usr/local/include  -I/usr/local/include  -I/usr/local/include/libxml2  -I/usr/local/include  -I/usr/local/include/json-c  -DHAVE_OPENSSL=1 -o src/matcher.o -c src/matcher.cpp
c++ -O2 -pipe  -fstack-protector -fno-strict-aliasing  -std=gnu++11 -std=c++11 -ggdb -Iinclude -Istfl -Ifilter -I. -Irss -Werror -Wall -Wextra -Wunreachable-code -DLOCALEDIR=\"/usr/local/share/locale\" -I/usr/local/include  -I/usr/local/include  -I/usr/local/include/libxml2  -I/usr/local/include  -I/usr/local/include/json-c  -DHAVE_OPENSSL=1 -o src/formatstring.o -c src/formatstring.cpp
c++ -O2 -pipe  -fstack-protector -fno-strict-aliasing  -std=gnu++11 -std=c++11 -ggdb -Iinclude -Istfl -Ifilter -I. -Irss -Werror -Wall -Wextra -Wunreachable-code -DLOCALEDIR=\"/usr/local/share/locale\" -I/usr/local/include  -I/usr/local/include  -I/usr/local/include/libxml2  -I/usr/local/include  -I/usr/local/include/json-c  -DHAVE_OPENSSL=1 -o src/strprintf.o -c src/strprintf.cpp
c++ -O2 -pipe  -fstack-protector -fno-strict-aliasing  -std=gnu++11 -std=c++11 -ggdb -Iinclude -Istfl -Ifilter -I. -Irss -Werror -Wall -Wextra -Wunreachable-code -DLOCALEDIR=\"/usr/local/share/locale\" -I/usr/local/include  -I/usr/local/include  -I/usr/local/include/libxml2  -I/usr/local/include  -I/usr/local/include/json-c  -DHAVE_OPENSSL=1 -o filter/Scanner.o -c filter/Scanner.cpp
c++ -O2 -pipe  -fstack-protector -fno-strict-aliasing  -std=gnu++11 -std=c++11 -ggdb -Iinclude -Istfl -Ifilter -I. -Irss -Werror -Wall -Wextra -Wunreachable-code -DLOCALEDIR=\"/usr/local/share/locale\" -I/usr/local/include  -I/usr/local/include  -I/usr/local/include/libxml2  -I/usr/local/include  -I/usr/local/include/json-c  -DHAVE_OPENSSL=1 -o filter/Parser.o -c filter/Parser.cpp
c++ -O2 -pipe  -fstack-protector -fno-strict-aliasing  -std=gnu++11 -std=c++11 -ggdb -Iinclude -Istfl -Ifilter -I. -Irss -Werror -Wall -Wextra -Wunreachable-code -DLOCALEDIR=\"/usr/local/share/locale\" -I/usr/local/include  -I/usr/local/include  -I/usr/local/include/libxml2  -I/usr/local/include  -I/usr/local/include/json-c  -DHAVE_OPENSSL=1 -o filter/FilterParser.o -c filter/FilterParser.cpp
filter/Scanner.cpp:458:3: error: will never be executed [-Werror,-Wunreachable-code]
                wprintf(L"--- Too small COCO_HEAP_BLOCK_SIZE\n");
                ^~~~~~~
1 error generated.
gmake[1]: *** [Makefile:112: filter/Scanner.o] Error 1
gmake[1]: *** Waiting for unfinished jobs....
gmake[1]: Leaving directory '/wrkdirs/usr/ports/www/newsboat/work/newsboat-2cdd33c55664d3deae680c4b09d31c465f858490'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make: stopped in /usr/ports/www/newsboat

http://joneumbox.org/build.html?mastername=10amd64-ports&build=2017-11-04_18h10m27s

http://joneumbox.org/build.html?mastername=10i386-ports&build=2017-11-04_18h10m27s

http://joneumbox.org/build.html?mastername=104amd64-ports&build=2017-11-04_18h12m01s

http://joneumbox.org/build.html?mastername=104i386-ports&build=2017-11-04_18h12m07s
Comment 2 Marko Turk 2017-11-05 12:50:01 UTC
Created attachment 187756 [details]
new-patch
Comment 3 Marko Turk 2017-11-05 12:52:04 UTC
Hi,

I've uploaded a new patch that should fix compilation on FreeBSD 10.

It seems there is a difference between clang 3.4 and 4.0 in compile warnings. I've patched Newsboat's Makefile to not use -Werror for now.

/Marko
Comment 4 Tobias C. Berner freebsd_committer freebsd_triage 2017-11-11 20:45:33 UTC
Hi there

This patch can still need some work; for example:
* portlint (USE_GITHUB is way too hig)
* GH_ACCOUNT and GH_PROJECT can be dropped, as it is the default
* You can use DISTVERSIONPREFIX=r and just fetch the release tarball: https://github.com/newsboat/newsboat/releases without setting any GH_TAGNAME

mfg Tobias
Comment 5 Jochen Neumeister freebsd_committer freebsd_triage 2017-11-11 21:03:05 UTC
Hi mt :-)

i am sorry, but "portlint -AC" gives me a lot of errors.
Can you please fix this? :-)

:~/dev/ports/www/newsboat % portlint -AC
WARN: /usr/home/jochen/dev/ports/www/newsboat/pkg-plist: [21]: If and only if your port is DOCSDIR-safe (that is, a user can override DOCSDIR when building this port and the port will still work correctly) consider using DOCSDIR macro; if you are unsure if this this port is DOCSDIR-safe, then ignore this warning
WARN: /usr/home/jochen/dev/ports/www/newsboat/pkg-plist: [22]: If and only if your port is DOCSDIR-safe (that is, a user can override DOCSDIR when building this port and the port will still work correctly) consider using DOCSDIR macro; if you are unsure if this this port is DOCSDIR-safe, then ignore this warning
WARN: /usr/home/jochen/dev/ports/www/newsboat/pkg-plist: [23]: If and only if your port is DOCSDIR-safe (that is, a user can override DOCSDIR when building this port and the port will still work correctly) consider using DOCSDIR macro; if you are unsure if this this port is DOCSDIR-safe, then ignore this warning
WARN: /usr/home/jochen/dev/ports/www/newsboat/pkg-plist: [24]: If and only if your port is DOCSDIR-safe (that is, a user can override DOCSDIR when building this port and the port will still work correctly) consider using DOCSDIR macro; if you are unsure if this this port is DOCSDIR-safe, then ignore this warning
WARN: Makefile: Consider adding support for a NLS knob to conditionally disable gettext support.
FATAL: Makefile: extra item "USE_GITHUB" placed in the MAINTAINER section.
FATAL: Makefile: extra item "GH_ACCOUNT" placed in the MAINTAINER section.
FATAL: Makefile: extra item "GH_PROJECT" placed in the MAINTAINER section.
FATAL: Makefile: extra item "GH_TAGNAME" placed in the MAINTAINER section.
WARN: Makefile: COMMENT is set externally to this port's Makefile, but this port is not configured as a slave port.
FATAL: Makefile: extra item "MAINTAINER" placed in the LICENSE section.
FATAL: Makefile: extra item "COMMENT" placed in the LICENSE section.
WARN: Makefile: "LICENSE_FILE" has to appear earlier.
WARN: Makefile: "LICENSE_FILE" has to appear earlier.
WARN: Makefile: "LICENSE" has to appear earlier.
WARN: Makefile: "LICENSE_FILE" has to appear earlier.
WARN: Makefile: "LIB_DEPENDS" has to appear earlier.
WARN: Makefile: "BUILD_DEPENDS" has to appear earlier.
WARN: /usr/home/jochen/dev/ports/www/newsboat/files/patch-Makefile: patch was not generated using ``make makepatch''.  It is recommended to use ``make makepatch'' when you need to [re-]generate a patch to ensure proper patch format.
6 fatal errors and 13 warnings found.
Comment 6 commit-hook freebsd_committer freebsd_triage 2017-11-13 13:11:27 UTC
A commit references this bug:

Author: arved
Date: Mon Nov 13 13:10:51 UTC 2017
New revision: 454114
URL: https://svnweb.freebsd.org/changeset/ports/454114

Log:
  Add newsboat, a fork of newsbeuter, a console RSS reader

  PR:		223290
  Submitted by:	mt@markoturk.info

Changes:
  head/www/Makefile
  head/www/newsboat/
  head/www/newsboat/Makefile
  head/www/newsboat/distinfo
  head/www/newsboat/files/patch-598.diff
  head/www/newsboat/files/patch-controller.cpp
  head/www/newsboat/files/patch-pb_controller.cpp
  head/www/newsboat/files/patch-pb_view.cpp
  head/www/newsboat/files/patch-poddlthread
  head/www/newsboat/files/patch-src-utils.cpp
  head/www/newsboat/pkg-plist
Comment 7 Tilman Keskinoz freebsd_committer freebsd_triage 2017-11-13 13:13:18 UTC
committed, thanks.

I incorporated the change from tcberner, plus some changes from my original newsbeuter port.