# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit games DESCRIPTION="Fast 2d tank arcade game with multiplayer and split-screen modes" HOMEPAGE="http://btanks.sourceforge.net/" SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" IUSE="debug" DEPEND="dev-util/scons" RDEPEND=">=dev-libs/libsigc++-2.0 media-libs/libsdl media-libs/sdl-image media-libs/sdl-ttf media-libs/openal media-libs/freealut" BTANKS_DATADIR=${GAMES_DATADIR}/${P} S=${WORKDIR}/btanks-${PVR} src_compile() { if use debug; then scons mode=debug prefix=/usr resources_dir=${BTANKS_DATADIR} lib_dir=$(games_get_libdir) || die "scons failed" else scons prefix=/usr resources_dir=${BTANKS_DATADIR} lib_dir=$(games_get_libdir) || die "scons failed" fi } src_install() { newgamesbin bt btanks || die "installing the binary failed" dogameslib.so libmrt.so libbt.so libsdlx.so || die "installing libraries failed" insinto ${BTANKS_DATADIR} doins -r data || die "installing data failed" doins libbt_objects.so || die "installing libbt_objects.so failed" cd src mv bt.xpm btanks.xpm doicon btanks.xpm make_desktop_entry btanks "Battle Tanks" btanks.xpm prepgamesdirs }