fizmo: Add 0.7.4
[gentoo-interactive-fiction.git] / games-engines / fizmo / fizmo-0.7.3.ebuild
blob45d9a692bf509e4393d04eb9961ad8a574912e28
1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
5 EAPI=4
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"
13 LICENSE="BSD"
14 SLOT="0"
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 )
19 X? ( ncurses )"
21 RDEPEND="X? ( media-libs/libpng
22 virtual/jpeg
23 x11-libs/libX11 )
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 )"
29 DEPEND="${RDEPEND}
30 dev-util/pkgconfig
31 glk? ( dev-games/glk-headers )"
33 src_prepare() {
34 epatch "${FILESDIR}"/fizmo-0.7.2-build-system.patch
37 src_configure() {
38 filter-ldflags -Wl,--as-needed
39 cp config.default.mk config.mk || die "cp config.mk failed"
40 sed -i \
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"
50 src_compile() {
51 emake -j1 fizmo-console
52 use glk && { emake -j1 fizmo-glktermw; }
53 use ncurses && { emake -j1 fizmo-ncursesw; }
56 src_install() {
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
63 prepgamesdirs