# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils games DESCRIPTION="FX-Repton is a clone of the old BBC Micro Repton 3 game" HOMEPAGE="http://www.sigala.it/sandro/software.php#fxrepton" SRC_URI="http://www.sigala.it/sandro/files/fx/${P}.zip" LICENSE="GPL-2" SLOT="0" KEYWORDS="x86" IUSE="doc editor" DEPEND="app-arch/unzip =x11-libs/fox-1.2*" S="${WORKDIR}/${P}/${PN}" src_unpack() { unpack "${A}" cd "${S}" # Modify paths sed -i \ -e "s:/usr/local/share:${GAMES_DATADIR}:" \ -e "s:FX:.FX:" \ paths.h || die "sed paths.h failed" sed -i \ -e "s:local/include/fox:include/fox-1.2:" \ -e "s:FOX:FOX-1.2:" \ -e "s:/usr/local/bin:${D}${GAMES_BINDIR}:" \ -e "s:/usr/local/share:${D}${GAMES_DATADIR}:" \ -e "s:doc ::" \ -e "s:CFLAGS =:CFLAGS = ${CXXFLAGS}:" \ Makefile.unix || die "sed Makefile.unix failed" # Patch source to build with FOX-1.2 epatch ${FILESDIR}/${P}-fox-1.2.patch # Sound system is not yet implemented on Linux sed -i \ -e "s:wav::" \ Makefile.unix || die "sed Makefile.unix (sound) failed" if use editor; then cd ../fxreptoned # Modify paths sed -i \ -e "s:local/include/fox:include/fox-1.2:" \ -e "s:FOX:FOX-1.2:" \ -e "s:/usr/local/bin:${D}${GAMES_BINDIR}:" \ -e "s:CFLAGS =:CFLAGS = ${CXXFLAGS}:" \ Makefile.unix || die "sed Makefile.unix (editor) failed" # Patch source to build with FOX-1.2 epatch ${FILESDIR}/${P}-editor-fox-1.2.patch fi } src_compile() { emake -f Makefile.unix || die "emake failed" if use editor; then emake -C ../fxreptoned -f Makefile.unix || "die emake (editor) failed" fi } src_install() { make -f Makefile.unix install || die "make install failed" use doc && dohtml ../doc/* if use editor; then make -C ../fxreptoned -f Makefile.unix install || die "make install (editor) failed" fi prepgamesdirs }