#modified by the_mgt to switch between shareware and fullversion mode via a useflag inherit eutils games DESCRIPTION="Rise of the Triad for Linux!" HOMEPAGE="http://www.icculus.org/rott/" SRC_URI="http://www.icculus.org/rott/releases/${P}.tar.gz http://filesingularity.timedoctor.org/swdata.zip" LICENSE="GPL-2" SLOT="0" KEYWORDS="~ppc x86" IUSE="fullversion" RDEPEND="media-libs/libsdl media-libs/sdl-mixer" DEPEND="${RDEPEND} app-arch/unzip" S=${WORKDIR}/${P}/rott src_unpack() { unpack ${A} epatch "${FILESDIR}"/${PV}-custom-datapath.patch if fullversion ; then sed 's:SHAREWARE 1:SHAREWARE 0:'<${S}/develop.h>${S}/develop.h_tmp sed 's:SUPERROTT 0:SUPERROTT 1:'<${S}/develop.h_tmp>${S}/develop.h fi } src_compile() { make clean || die emake -j1 EXTRACFLAGS="${CFLAGS} -DDATADIR=\\\"${GAMES_DATADIR}/${PN}/\\\"" \ || die "emake failed" } src_install() { dogamesbin rott || die "dogamesbin failed" dodoc *.txt ../{README,readme.txt} cd "${WORKDIR}" insinto "${GAMES_DATADIR}"/${PN} doins *.dmo huntbgin.* remote1.rts || die "doins failed" prepgamesdirs } pkg_postinst() { games_pkg_postinst if use !fullversion ; then einfo "The shareware version has been installed." einfo "To play the full version, emerge with 'fullversion' as USE-flag " fi einfo "For the full version you need to copy the original data files to ${GAMES_DATADIR}/${PN}/" }