# 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+data" 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="debug" RDEPEND="virtual/opengl media-libs/openal media-libs/sdl-image media-libs/sdl-net" DEPEND="${RDEPEND} dev-util/scons" S=${WORKDIR}/${MY_P} src_unpack() { unpack ${A} cd "${S}" # We need our CXXFLAGS sed -ri \ -e "/env.Append\(CCFLAGS/s:-O2:${CXXFLAGS// /\' ,\'}:" \ SConstruct \ || die "sed SConstruct failed" } src_compile() { local myconf use debug || myconf="${myconf} release=1" 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/textures/small/icons/vdrift-64x64.png ${PN}.png make_desktop_entry ${PN} "VDrift" ${PN}.png prepgamesdirs }