# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit games MY_PV="2005-10-02" DESCRIPTION="a driving simulation made with drift racing in mind" HOMEPAGE="http://vdrift.sourceforge.net/" SRC_URI="mirror://sourceforge/vdrift/${PN}-${MY_PV}-src.tar.bz2" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" IUSE="fmod debug" DEPEND="dev-util/scons fmod? ( media-libs/fmod ) !fmod? ( media-libs/openal )" S=${WORKDIR}/build/${PN}-${MY_PV}-src DOCS="README TODO" src_unpack() { unpack ${A} cd "${S}" mkdir build #epatch ${FILESDIR}/${P}-disable-install.patch } src_compile() { local myconf="bin=${GAMES_BINDIR} prefix=${GAMES_DATADIR}" if use fmod; then myconf="${myconf} fmod=1" else myconf="${myconf} fmod=0" fi if use debug; then myconf="${myconf} release=0" else myconf="${myconf} release=1" fi scons || die "scons failed" } src_install() { for datadirs in `ls ${S}/runtime/data`; do insinto ${GAMES_DATADIR}/${PN}/data/${datadirs} doins runtime/data/${datadirs}/* || die "failed installing ${datadirs}" done insinto ${GAMES_DATADIR}/${PN}/data/models/cars doins runtime/data/models/cars/* insinto ${GAMES_DATADIR}/${PN}/data/tex/cars doins runtime/data/tex/cars/* exeinto ${GAMES_DATADIR}/${PN} doexe src/vdrift dodoc ${DOCS} games_make_wrapper ${PN} ./${PN} ${GAMES_DATADIR}/${PN} prepgamesdirs }