summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Strogin <stefan.strogin@gmail.com>2019-03-04 20:32:49 +0200
committerJames Le Cuirot <chewi@gentoo.org>2019-03-09 22:16:12 +0000
commita075426e95a45f7cb03888bc57f26c2228115479 (patch)
tree5bc06985406242d83414b313c911c675357fc760 /games-roguelike/angband/angband-4.1.3.ebuild
parentgames-roguelike/angband: drop pkg-config hack (diff)
downloadgentoo-a075426e95a45f7cb03888bc57f26c2228115479.tar.gz
gentoo-a075426e95a45f7cb03888bc57f26c2228115479.tar.bz2
gentoo-a075426e95a45f7cb03888bc57f26c2228115479.zip
games-roguelike/angband: rework USE flag logic
Add REQUIRED_USE "at least one of" X or ncurses, thanks to it we can drop some tricky conditions in src_configure and RDEPEND. Besides that angband simply cannot build with USE="-X -ncurses". Add sound? ( sdl ) to REQUIRED_USE as SDL is needed for sound. Add media-fonts/font-misc-misc to RDEPEND with USE=X. Default USE flags in accordance with the upstream configure options: set +X, +ncurses; disable sound. Package-Manager: Portage-2.3.62, Repoman-2.3.12 Signed-off-by: Stefan Strogin <stefan.strogin@gmail.com> Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Diffstat (limited to 'games-roguelike/angband/angband-4.1.3.ebuild')
-rw-r--r--games-roguelike/angband/angband-4.1.3.ebuild38
1 files changed, 18 insertions, 20 deletions
diff --git a/games-roguelike/angband/angband-4.1.3.ebuild b/games-roguelike/angband/angband-4.1.3.ebuild
index 34d75a13d94..830cddc683f 100644
--- a/games-roguelike/angband/angband-4.1.3.ebuild
+++ b/games-roguelike/angband/angband-4.1.3.ebuild
@@ -14,9 +14,15 @@ SRC_URI="https://rephial.org/downloads/${MAJOR_PV}/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-IUSE="ncurses sdl +sound X"
+IUSE="+ncurses sdl sound +X"
-RDEPEND="!ncurses? ( !X? ( !sdl? ( sys-libs/ncurses:0=[unicode] ) ) )
+REQUIRED_USE="sound? ( sdl )
+ || ( X ncurses )"
+
+RDEPEND="X? (
+ media-fonts/font-misc-misc
+ x11-libs/libX11
+ )
ncurses? ( sys-libs/ncurses:0=[unicode] )
sdl? (
media-libs/libsdl[video,X]
@@ -26,8 +32,7 @@ RDEPEND="!ncurses? ( !X? ( !sdl? ( sys-libs/ncurses:0=[unicode] ) ) )
media-libs/libsdl[sound]
media-libs/sdl-mixer[mp3]
)
- )
- X? ( x11-libs/libX11 )"
+ )"
DEPEND="${RDEPEND}
dev-python/docutils
virtual/pkgconfig"
@@ -54,23 +59,16 @@ src_prepare() {
}
src_configure() {
- local myconf
-
- if use sdl; then
- myconf="$(use_enable sound sdl-mixer)"
- else
- myconf="--disable-sdl-mixer"
- fi
+ local myconf=(
+ --bindir="${EPREFIX}"/usr/bin
+ --with-private-dirs
+ $(use_enable X x11)
+ $(use_enable sdl)
+ $(use_enable sound sdl-mixer)
+ $(use_enable ncurses curses)
+ )
- econf \
- --bindir="${EPREFIX}"/usr/bin \
- --with-private-dirs \
- $(use_enable X x11) \
- $(use_enable sdl) \
- $(use_enable ncurses curses) \
- $(use !sdl && use !ncurses && use !X && \
- echo --enable-curses) \
- ${myconf}
+ econf "${myconf[@]}"
}
src_install() {