summaryrefslogtreecommitdiff
blob: 52e8ba67a166773665590771caf1c900b7db713e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Copyright 1999-2004 Gentoo Technologies, Inc.
# 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.4 2004/02/27 19:30:37 vapier 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}-data.tgz
	mirror://sourceforge/torcs/TORCS-${PV}-data-tracks-road.tgz
	mirror://sourceforge/torcs/TORCS-${PV}-data-tracks-dirt.tgz
	mirror://sourceforge/torcs/TORCS-${PV}-src-robots-base.tgz
	mirror://sourceforge/torcs/TORCS-${PV}-data-cars-extra.tgz
	mirror://sourceforge/torcs/TORCS-${PV}-data-cars-nascar.tgz
	mirror://sourceforge/torcs/TORCS-${PV}-src-robots-K1999.tgz
	mirror://sourceforge/torcs/TORCS-${PV}-src-robots-astigot.tgz
	mirror://sourceforge/torcs/TORCS-${PV}-src-robots-berniw.tgz
	mirror://sourceforge/torcs/TORCS-${PV}-src-robots-billy.tgz
	mirror://sourceforge/torcs/TORCS-${PV}-src-robots-bt.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
	mirror://sourceforge/torcs/TORCS-${PV}-data-tracks-oval.tgz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="x86"

RDEPEND=">=media-libs/plib-1.6
	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 || 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
}