Gentoo Archives: gentoo-commits

From: Anna Vyalkova <cyber+gentoo@×××××.in>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/guru:dev commit in: net-news/sfeed/
Date: Sun, 20 Feb 2022 19:02:09
Message-Id: 1645383708.5c2ef748c6d6d35d806db28fd9550e6b940312b5.cybertailor@gentoo
1 commit: 5c2ef748c6d6d35d806db28fd9550e6b940312b5
2 Author: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
3 AuthorDate: Sat Feb 19 17:30:03 2022 +0000
4 Commit: Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
5 CommitDate: Sun Feb 20 19:01:48 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=5c2ef748
7
8 net-news/sfeed: more flexible theme handling
9
10 Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in>
11
12 net-news/sfeed/sfeed-1.2.ebuild | 37 ++++++++++++-------------------------
13 1 file changed, 12 insertions(+), 25 deletions(-)
14
15 diff --git a/net-news/sfeed/sfeed-1.2.ebuild b/net-news/sfeed/sfeed-1.2.ebuild
16 index 64d5fe0fb..ea650ce68 100644
17 --- a/net-news/sfeed/sfeed-1.2.ebuild
18 +++ b/net-news/sfeed/sfeed-1.2.ebuild
19 @@ -12,21 +12,16 @@ if [[ ${PV} == 9999 ]]; then
20 inherit git-r3
21 EGIT_REPO_URI="git://git.codemadness.org/sfeed"
22 else
23 - SRC_URI="https://www.codemadness.org/releases/sfeed/sfeed-${PV}.tar.gz"
24 + SRC_URI="https://www.codemadness.org/releases/${PN}/${P}.tar.gz"
25 KEYWORDS="~amd64"
26 fi
27
28 LICENSE="ISC"
29 SLOT="0"
30
31 -IUSE="
32 - +ncurses
33 - +theme-mono
34 - theme-mono-highlight
35 - theme-newsboat
36 - theme-templeos
37 -"
38 -REQUIRED_USE="ncurses? ( ^^ ( theme-mono theme-mono-highlight theme-newsboat theme-templeos ) )"
39 +THEMES=( mono{,-highlight} newsboat templeos )
40 +IUSE="+ncurses +$(printf "theme-%s " ${THEMES[@]})"
41 +REQUIRED_USE="ncurses? ( ^^ ( $(printf "theme-%s " ${THEMES[@]}) ) )"
42
43 DEPEND="ncurses? ( sys-libs/ncurses )"
44 RDEPEND="${DEPEND}
45 @@ -35,23 +30,15 @@ RDEPEND="${DEPEND}
46 BDEPEND="virtual/pkgconfig"
47
48 src_configure() {
49 - if use theme-mono ; then
50 - SFEED_THEME="mono"
51 - elif use theme-mono-highlight ; then
52 - SFEED_THEME="mono_highlight"
53 - elif use theme-newsboat ; then
54 - SFEED_THEME="newsboat"
55 - elif use theme-templeos ; then
56 - SFEED_THEME="templeos"
57 - fi
58 + for name in "${THEMES[@]}"; do
59 + if use theme-${name}; then
60 + SFEED_THEME="${name//-/_}"
61 + fi
62 + done
63
64 - if use ncurses ; then
65 - SFEED_CURSES="sfeed_curses"
66 - else
67 - SFEED_CURSES=""
68 - fi
69 + use ncurses && SFEED_CURSES="sfeed_curses"
70
71 - restore_config themes/mono.h themes/mono_highlight.h themes/newsboat.h themes/templeos.h
72 + restore_config $(printf "themes/%s.h " ${THEMES[@]//-/_})
73 }
74
75 src_compile() {
76 @@ -72,5 +59,5 @@ src_install() {
77
78 einstalldocs
79
80 - save_config themes/mono.h themes/mono_highlight.h themes/newsboat.h themes/templeos.h
81 + save_config $(printf "themes/%s.h " ${THEMES[@]//-/_})
82 }