aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>2022-02-19 22:31:10 +0500
committerAnna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>2022-02-21 00:01:49 +0500
commitd612df4dc1178cd4cedd431f30db61730281ad90 (patch)
treece039c4aa8cc900e5076107edfc354170f4a99ae /net-news
parentnet-news/sfeed: more flexible theme handling (diff)
downloadguru-d612df4dc1178cd4cedd431f30db61730281ad90.tar.gz
guru-d612df4dc1178cd4cedd431f30db61730281ad90.tar.bz2
guru-d612df4dc1178cd4cedd431f30db61730281ad90.zip
net-news/sfeed: revbump to add slot operator
sync live Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>
Diffstat (limited to 'net-news')
-rw-r--r--net-news/sfeed/sfeed-1.2-r1.ebuild (renamed from net-news/sfeed/sfeed-1.2.ebuild)2
-rw-r--r--net-news/sfeed/sfeed-9999.ebuild42
2 files changed, 36 insertions, 8 deletions
diff --git a/net-news/sfeed/sfeed-1.2.ebuild b/net-news/sfeed/sfeed-1.2-r1.ebuild
index ea650ce68..4f364eedb 100644
--- a/net-news/sfeed/sfeed-1.2.ebuild
+++ b/net-news/sfeed/sfeed-1.2-r1.ebuild
@@ -23,7 +23,7 @@ THEMES=( mono{,-highlight} newsboat templeos )
IUSE="+ncurses +$(printf "theme-%s " ${THEMES[@]})"
REQUIRED_USE="ncurses? ( ^^ ( $(printf "theme-%s " ${THEMES[@]}) ) )"
-DEPEND="ncurses? ( sys-libs/ncurses )"
+DEPEND="ncurses? ( sys-libs/ncurses:= )"
RDEPEND="${DEPEND}
ncurses? ( !net-news/sfeed_curses )
"
diff --git a/net-news/sfeed/sfeed-9999.ebuild b/net-news/sfeed/sfeed-9999.ebuild
index 95c50fc04..4f364eedb 100644
--- a/net-news/sfeed/sfeed-9999.ebuild
+++ b/net-news/sfeed/sfeed-9999.ebuild
@@ -1,9 +1,9 @@
-# Copyright 2020 Gentoo Authors
+# Copyright 2020-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-inherit toolchain-funcs
+inherit toolchain-funcs savedconfig
DESCRIPTION="simple RSS and Atom parser"
HOMEPAGE="https://www.codemadness.org/sfeed.html"
@@ -12,24 +12,52 @@ if [[ ${PV} == 9999 ]]; then
inherit git-r3
EGIT_REPO_URI="git://git.codemadness.org/sfeed"
else
- SRC_URI="https://www.codemadness.org/releases/sfeed/sfeed-${PV}.tar.gz"
+ SRC_URI="https://www.codemadness.org/releases/${PN}/${P}.tar.gz"
KEYWORDS="~amd64"
fi
LICENSE="ISC"
SLOT="0"
+THEMES=( mono{,-highlight} newsboat templeos )
+IUSE="+ncurses +$(printf "theme-%s " ${THEMES[@]})"
+REQUIRED_USE="ncurses? ( ^^ ( $(printf "theme-%s " ${THEMES[@]}) ) )"
+
+DEPEND="ncurses? ( sys-libs/ncurses:= )"
+RDEPEND="${DEPEND}
+ ncurses? ( !net-news/sfeed_curses )
+"
+BDEPEND="virtual/pkgconfig"
+
+src_configure() {
+ for name in "${THEMES[@]}"; do
+ if use theme-${name}; then
+ SFEED_THEME="${name//-/_}"
+ fi
+ done
+
+ use ncurses && SFEED_CURSES="sfeed_curses"
+
+ restore_config $(printf "themes/%s.h " ${THEMES[@]//-/_})
+}
+
src_compile() {
tc-export AR CC
- emake RANLIB=$(tc-getRANLIB)
+ emake RANLIB=$(tc-getRANLIB) \
+ SFEED_CURSES="${SFEED_CURSES}" \
+ SFEED_THEME="${SFEED_THEME}" \
+ SFEED_CURSES_LDFLAGS="${LDFLAGS} $(pkg-config --libs ncurses)"
}
src_install() {
DESTDIR="${D}" \
emake install \
- PREFIX="/usr" \
- MANPREFIX="/usr/share/man" \
- DOCPREFIX="/usr/share/doc/${P}"
+ SFEED_CURSES="${SFEED_CURSES}" \
+ PREFIX="${EPREFIX}/usr" \
+ MANPREFIX="${EPREFIX}/usr/share/man" \
+ DOCPREFIX="${EPREFIX}/usr/share/doc/${PF}"
einstalldocs
+
+ save_config $(printf "themes/%s.h " ${THEMES[@]//-/_})
}