# 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="openal? (media-libs/openal) !openal? (media-libs/fmod)" DEPEND="virtual/opengl dev-util/scons media-libs/sdl-image media-libs/sdl-net ${RDEPEND}" S=${WORKDIR}/${MY_P} src_unpack() { unpack ${A} cd "${S}" epatch "${FILESDIR}"/${P}-gentoo-compile.patch # We need our CXXFLAGS # Using our libfmod instead of the one provided with the package sed -i \ -e "/CCFLAGS/s:-O2\|-Wno-non-virtual-dtor:${CXXFLAGS// /\' ,\'}:" \ -e "s:lib/libfmod-3.74.so:/usr/\0:" \ 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/textures/small/icons/vdrift-64x64.png ${PN}.png make_desktop_entry ${PN} "VDrift" ${PN}.png prepgamesdirs }