# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils games MY_PV="${PV:0:4}-${PV:4:2}-${PV:6}" DESCRIPTION="a driving simulation made with drift racing in mind" HOMEPAGE="http://vdrift.sourceforge.net/" SRC_URI="mirror://sourceforge/${PN}/${PN/vd/VD}-${MY_PV}.tar.bz2" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" IUSE="openal" DEPEND="virtual/opengl openal? (media-libs/openal) !openal? (media-libs/fmod) media-libs/sdl-image" S=${WORKDIR}/${PN}-${MY_PV} src_unpack() { unpack ${A} cd "${S}" use openal || epatch "${FILESDIR}"/${P}-gentoo-compile.patch epatch "${FILESDIR}"/${P}-gentoo-paths.patch echo "#define DATADIR \"${GAMES_DATADIR}/${PN}\"" >> include/utility.h } src_compile() { use openal && my_conf="--with-openal" || my_conf="--with-fmod" egamesconf ${my_conf} emake || die "emake failed" } src_install() { dogamesbin src/${PN} insinto "${GAMES_DATADIR}"/${PN} doins -r runtime/carsettings runtime/data runtime/lists \ || die "doins failed" dodoc README TODO VAMOS.txt newicon runtime/data/tex/splash.png ${PN}.png make_desktop_entry ${PN} "VDrift" ${PN}.png prepgamesdirs }