# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/games-sports/torcs/torcs-1.2.2.ebuild,v 1.6 2004/06/24 23:25:31 agriffis Exp $ inherit games DESCRIPTION="The Open Racing Car Simulator" HOMEPAGE="http://torcs.org/" SRC_URI="mirror://sourceforge/torcs/TORCS-${PV}-src.tgz mirror://sourceforge/torcs/TORCS-${PV}-src-robots-base.tgz mirror://sourceforge/torcs/TORCS-${PV}-src-robots-berniw.tgz mirror://sourceforge/torcs/TORCS-${PV}-src-robots-olethros.tgz mirror://sourceforge/torcs/TORCS-${PV}-src-robots-bt.tgz mirror://sourceforge/torcs/TORCS-${PV}-data.tgz mirror://sourceforge/torcs/TORCS-${PV}-data-tracks-road.tgz mirror://sourceforge/torcs/TORCS-${PV}-data-cars-extra.tgz mirror://sourceforge/torcs/TORCS-${PV}-data-tracks-oval.tgz mirror://sourceforge/torcs/TORCS-${PV}-data-tracks-dirt.tgz mirror://sourceforge/torcs/TORCS-${PV}-data-cars-nascar.tgz mirror://sourceforge/torcs/TORCS-${PV}-data-cars-Patwo-Design.tgz mirror://sourceforge/torcs/TORCS-${PV}-data-cars-kcendra-gt.tgz mirror://sourceforge/torcs/TORCS-${PV}-data-cars-kcendra-roadsters.tgz mirror://sourceforge/torcs/TORCS-${PV}-data-cars-kcendra-sport.tgz mirror://sourceforge/torcs/TORCS-${PV}-data-cars-VM.tgz" LICENSE="GPL-2" SLOT="0" KEYWORDS="x86" IUSE="" RDEPEND=">=media-libs/plib-1.8.3 virtual/opengl virtual/glut media-libs/libpng sys-libs/zlib" DEPEND="${RDEPEND} >=sys-apps/sed-4" src_unpack() { unpack ${A} cd ${S} sed -i \ -e "/^datadir =/s:=.*:= ${GAMES_DATADIR}/${PN}:" \ Make-config.in \ || die "sed Make-config.in failed" } src_compile() { egamesconf --x-libraries=/usr/lib || die env HOME="${T}" emake -j1 || die } src_install() { make DESTDIR="${D}" install || die "make install failed" dosed "s:DATADIR=.*:DATADIR=${GAMES_DATADIR}/${PN}:" ${GAMES_BINDIR}/torcs cp -r ${WORKDIR}/{cars,categories,data,menu,tracks} \ "${D}/${GAMES_DATADIR}/${PN}/" \ || die "cp failed" dodoc README.linux dohtml *.html *.png prepgamesdirs }