diff options
author | Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in> | 2022-02-19 22:30:03 +0500 |
---|---|---|
committer | Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in> | 2022-02-21 00:01:48 +0500 |
commit | 5c2ef748c6d6d35d806db28fd9550e6b940312b5 (patch) | |
tree | 89bb01d6a23a2ac1dcda03bede94c1435a5ef5ba /net-news | |
parent | net-news/sfeed: fix EPREFIX and doc dir (diff) | |
download | guru-5c2ef748c6d6d35d806db28fd9550e6b940312b5.tar.gz guru-5c2ef748c6d6d35d806db28fd9550e6b940312b5.tar.bz2 guru-5c2ef748c6d6d35d806db28fd9550e6b940312b5.zip |
net-news/sfeed: more flexible theme handling
Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>
Diffstat (limited to 'net-news')
-rw-r--r-- | net-news/sfeed/sfeed-1.2.ebuild | 37 |
1 files changed, 12 insertions, 25 deletions
diff --git a/net-news/sfeed/sfeed-1.2.ebuild b/net-news/sfeed/sfeed-1.2.ebuild index 64d5fe0fb..ea650ce68 100644 --- a/net-news/sfeed/sfeed-1.2.ebuild +++ b/net-news/sfeed/sfeed-1.2.ebuild @@ -12,21 +12,16 @@ 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" -IUSE=" - +ncurses - +theme-mono - theme-mono-highlight - theme-newsboat - theme-templeos -" -REQUIRED_USE="ncurses? ( ^^ ( theme-mono theme-mono-highlight theme-newsboat theme-templeos ) )" +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} @@ -35,23 +30,15 @@ RDEPEND="${DEPEND} BDEPEND="virtual/pkgconfig" src_configure() { - if use theme-mono ; then - SFEED_THEME="mono" - elif use theme-mono-highlight ; then - SFEED_THEME="mono_highlight" - elif use theme-newsboat ; then - SFEED_THEME="newsboat" - elif use theme-templeos ; then - SFEED_THEME="templeos" - fi + for name in "${THEMES[@]}"; do + if use theme-${name}; then + SFEED_THEME="${name//-/_}" + fi + done - if use ncurses ; then - SFEED_CURSES="sfeed_curses" - else - SFEED_CURSES="" - fi + use ncurses && SFEED_CURSES="sfeed_curses" - restore_config themes/mono.h themes/mono_highlight.h themes/newsboat.h themes/templeos.h + restore_config $(printf "themes/%s.h " ${THEMES[@]//-/_}) } src_compile() { @@ -72,5 +59,5 @@ src_install() { einstalldocs - save_config themes/mono.h themes/mono_highlight.h themes/newsboat.h themes/templeos.h + save_config $(printf "themes/%s.h " ${THEMES[@]//-/_}) } |