1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 inherit eutils multilib toolchain-funcs games flag-o-matic
9 DESCRIPTION
="Yet another Z-machine interpreter"
10 HOMEPAGE
="http://www.spellbreaker.org/~chrender/fizmo/"
11 SRC_URI
="http://www.spellbreaker.org/~chrender/fizmo/source/${P}.tar.gz"
15 KEYWORDS
="~amd64 ~x86"
16 IUSE
="X glk ncurses sdl xml"
17 # only the ncurses UI supports these two features
18 REQUIRED_USE
="sdl? ( ncurses )
21 RDEPEND
="X? ( media-libs/libpng
24 glk? ( dev-games/glkloader )
25 ncurses? ( sys-libs/ncurses[unicode] )
26 sdl? ( media-libs/libsdl
27 media-libs/libsndfile )
28 xml? ( dev-libs/libxml2 )"
31 glk? ( dev-games/glk-headers )"
34 epatch
"${FILESDIR}"/fizmo-0.7
.2-build-system.
patch
38 filter-ldflags
-Wl,--as-needed
39 cp config.default.mk config.mk || die
"cp config.mk failed"
41 -e "s|@CC@|$(tc-getCC)|" \
42 -e "s|@CFLAGS@|${CFLAGS}|" \
43 -e "s|@LDFLAGS@|${LDFLAGS}|" \
44 -e "s|@DISABLE_BABEL@|$(usex xml "" 1)|" \
45 -e "s|@ENABLE_X11_IMAGES@|$(usex X 1 "")|" \
46 -e "s|@SOUND_INTERFACE_NAME@|$(usex sdl libsndifsdl "")|" \
47 config.mk || die
"sed failed"
51 emake
-j1 fizmo-console
52 use glk
&& { emake
-j1 fizmo-glktermw
; }
53 use ncurses
&& { emake
-j1 fizmo-ncursesw
; }
57 emake
-j1 DESTDIR
="${D}" install-locales install-fizmo-console
58 use glk
&& { emake
-j1 DESTDIR
="${D}" install-fizmo-glktermw
; }
59 use ncurses
&& { emake
-j1 DESTDIR
="${D}" install-fizmo-ncursesw
; }
61 dodoc README.txt README-0.7.txt CHANGELOG.txt