summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNickolas Raymond Kaczynski <nrk@disroot.org>2022-03-07 21:16:22 +0600
committerSam James <sam@gentoo.org>2022-03-09 15:14:10 +0000
commit03b4fbc065487ffc7447f1334dce20bb0f94a4b1 (patch)
tree074edd86045e661284d66d9ec16de0e3780fe410 /net-news/sfeed/sfeed-1.3.ebuild
parentdev-util/sysdig-kmod: drop 0.27.0 (diff)
downloadgentoo-03b4fbc065487ffc7447f1334dce20bb0f94a4b1.tar.gz
gentoo-03b4fbc065487ffc7447f1334dce20bb0f94a4b1.tar.bz2
gentoo-03b4fbc065487ffc7447f1334dce20bb0f94a4b1.zip
net-news/sfeed: bump to 1.3 and improvements
* removes unneeded dependencies, add them to optfeature * adds theme support via USE flag and savedconfig * downgrade to EAPI 7 (8 doesn't support savedconfig) * don't assume -ltinfo, use virtual/pkgconfig instead * fix document location * fix some quote and style issues Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Nickolas Raymond Kaczynski <nrk@disroot.org> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-news/sfeed/sfeed-1.3.ebuild')
-rw-r--r--net-news/sfeed/sfeed-1.3.ebuild79
1 files changed, 79 insertions, 0 deletions
diff --git a/net-news/sfeed/sfeed-1.3.ebuild b/net-news/sfeed/sfeed-1.3.ebuild
new file mode 100644
index 000000000000..2ffa8fc6c2ce
--- /dev/null
+++ b/net-news/sfeed/sfeed-1.3.ebuild
@@ -0,0 +1,79 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit toolchain-funcs savedconfig optfeature
+
+DESCRIPTION="simple RSS and Atom parser"
+HOMEPAGE="https://codemadness.org/sfeed-simple-feed-parser.html"
+SRC_URI="https://codemadness.org/releases/${PN}/${P}.tar.gz"
+
+LICENSE="ISC"
+SLOT="0"
+KEYWORDS="~amd64"
+
+THEMES=( mono{,-highlight} newsboat templeos )
+IUSE="+ncurses +${THEMES[@]/#/theme-}"
+REQUIRED_USE="ncurses? ( ^^ ( "${THEMES[@]/#/theme-}" ) )"
+
+DEPEND="ncurses? ( sys-libs/ncurses:= )"
+RDEPEND="${DEPEND}"
+BDEPEND="ncurses? ( virtual/pkgconfig )"
+
+src_configure() {
+ local name
+ for name in "${THEMES[@]}"; do
+ use "theme-${name}" && SFEED_THEME="${name//-/_}"
+ done
+
+ restore_config $(printf "themes/%s.h " "${THEMES[@]//-/_}")
+}
+
+src_compile() {
+ local ncurses_ldflags=""
+ if use ncurses; then
+ ncurses_ldflags="$("$(tc-getPKG_CONFIG)" --libs ncurses || die)"
+ fi
+ emake \
+ CC="$(tc-getCC)" \
+ RANLIB="$(tc-getRANLIB)" \
+ AR="$(tc-getAR)" \
+ SFEED_CURSES="$(usex ncurses "sfeed_curses" "")" \
+ SFEED_THEME="${SFEED_THEME}" \
+ SFEED_CURSES_LDFLAGS="${LDFLAGS} ${ncurses_ldflags}"
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ PREFIX="${EPREFIX}/usr" \
+ MANPREFIX="${EPREFIX}/usr/share/man" \
+ DOCPREFIX="${EPREFIX}/usr/share/doc/${PF}" \
+ SFEED_CURSES="$(usex ncurses "sfeed_curses" "")" \
+ install
+
+ save_config $(printf "themes/%s.h " "${THEMES[@]//-/_}")
+}
+
+pkg_postinst() {
+ local optmsg
+
+ if use ncurses; then
+ optmsg="yanking the URL or enclosure in sfeed_curses. "
+ optmsg+="See \$SFEED_YANKER to change it."
+ optfeature "${optmsg}" x11-misc/xclip
+
+ optmsg="plumbing the URL or enclosure in sfeed_curses. "
+ optmsg+="See \$SFEED_PLUMBER to change it."
+ optfeature "${optmsg}" x11-misc/xdg-utils
+ fi
+
+ optmsg="converting HTML content via sfeed_content. "
+ optmsg+="See the ENVIRONMENT VARIABLES section in the man page to change it."
+ optfeature "${optmsg}" www-client/lynx
+
+ optmsg="fetching feeds. Used by sfeed_update as default. "
+ optmsg+="See OVERRIDE FUNCTIONS section on sfeedrc manpage to change it."
+ optfeature "${optmsg}" net-misc/curl
+}