# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils python games MY_P="${PN}-${PV:0:4}-${PV:4:2}-${PV:6}-src" DESCRIPTION="A driving simulation made with drift racing in mind" HOMEPAGE="http://vdrift.net/" SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.bz2" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" IUSE="openal debug" RDEPEND="virtual/opengl openal? (media-libs/openal) !openal? (media-libs/fmod) media-libs/sdl-image" DEPEND="dev-util/scons ${RDEPEND}" S=${WORKDIR}/build/${MY_P} src_unpack() { unpack ${A} cd "${S}" epatch "${FILESDIR}"/${P}-gentoo-compile.patch # We need our CXXFLAGS sed -i \ -e "/CCFLAGS/s:-O2:${CXXFLAGS// /\' ,\'}:g" \ SConstruct \ || die "sed failed" } src_compile() { local myconf use openal || myconf="fmod=1" use debug || myconf="${myconf} release=1" myconf="${myconf} prefix=${GAMES_DATADIR}" scons ${MAKEOPTS/j/j } ${myconf} \ || die "scons failed" } src_install() { dogamesbin build/${PN} insinto "${GAMES_DATADIR}"/${PN} doins -r data/* || die "doins failed" dodoc docs/* newicon data/tex/splash.png ${PN}.png make_desktop_entry ${PN} "VDrift" ${PN}.png prepgamesdirs }