From a075426e95a45f7cb03888bc57f26c2228115479 Mon Sep 17 00:00:00 2001 From: Stefan Strogin Date: Mon, 4 Mar 2019 20:32:49 +0200 Subject: 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 Signed-off-by: James Le Cuirot --- games-roguelike/angband/angband-4.1.3.ebuild | 38 +++++++++++++--------------- 1 file changed, 18 insertions(+), 20 deletions(-) (limited to 'games-roguelike') diff --git a/games-roguelike/angband/angband-4.1.3.ebuild b/games-roguelike/angband/angband-4.1.3.ebuild index 34d75a13d94d..830cddc683f4 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() { -- cgit v1.2.3-65-gdbad