diff options
author | NRK <nrk@disroot.org> | 2024-02-15 21:38:53 +0000 |
---|---|---|
committer | Petr Vaněk <arkamar@gentoo.org> | 2024-02-16 09:45:42 +0100 |
commit | 79ac66b42f13bfc3889a9b20458c78537c6101d0 (patch) | |
tree | a6b9c9dd51b5bb635964fbe8f695cea2706c12e5 /net-news/sfeed/sfeed-2.0.ebuild | |
parent | net-proxy/haproxy: Bump to 2.9.5 (diff) | |
download | gentoo-79ac66b42f13bfc3889a9b20458c78537c6101d0.tar.gz gentoo-79ac66b42f13bfc3889a9b20458c78537c6101d0.tar.bz2 gentoo-79ac66b42f13bfc3889a9b20458c78537c6101d0.zip |
net-news/sfeed: add 2.0, drop old
Signed-off-by: NRK <nrk@disroot.org>
Closes: https://github.com/gentoo/gentoo/pull/35361
Signed-off-by: Petr Vaněk <arkamar@gentoo.org>
Diffstat (limited to 'net-news/sfeed/sfeed-2.0.ebuild')
-rw-r--r-- | net-news/sfeed/sfeed-2.0.ebuild | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/net-news/sfeed/sfeed-2.0.ebuild b/net-news/sfeed/sfeed-2.0.ebuild new file mode 100644 index 000000000000..ecbca4d83f64 --- /dev/null +++ b/net-news/sfeed/sfeed-2.0.ebuild @@ -0,0 +1,78 @@ +# Copyright 2022-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +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 ~arm ~arm64 ~hppa ~riscv ~sparc ~x86" + +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="" + use ncurses && ncurses_ldflags="$($(tc-getPKG_CONFIG) --libs ncurses || die)" + + emake \ + CC="$(tc-getCC)" \ + RANLIB="$(tc-getRANLIB)" \ + AR="$(tc-getAR)" \ + SFEED_CURSES="$(usev 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="$(usev 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 +} |