Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 415913
Collapse All | Expand All

(-)/usr/portage/games-sports/speed-dreams/speed-dreams-1.4.0.ebuild (-45 / +54 lines)
Lines 1-31 Link Here
1
# Copyright 1999-2012 Gentoo Foundation
1
# Copyright 1999-2012 Gentoo Foundation
2
# Distributed under the terms of the GNU General Public License v2
2
# Distributed under the terms of the GNU General Public License v2
3
# $Header: /var/cvsroot/gentoo-x86/games-sports/speed-dreams/speed-dreams-1.4.0.ebuild,v 1.8 2012/03/16 20:04:54 tupone Exp $
3
# $Header: $
4
4
5
EAPI=2
5
EAPI=5
6
inherit autotools eutils versionator games
6
7
inherit versionator games cmake-utils
8
9
REV="4687"
7
10
8
DESCRIPTION="A fork of the famous open racing car simulator TORCS"
11
DESCRIPTION="A fork of the famous open racing car simulator TORCS"
9
HOMEPAGE="http://speed-dreams.sourceforge.net/"
12
HOMEPAGE="http://speed-dreams.sourceforge.net/"
10
SRC_URI="mirror://sourceforge/speed-dreams/${P}-r2307-src.tar.bz2"
13
SRC_URI="mirror://sourceforge/${PN}/${PV}/${PN}-src-base-${PV}-r${REV}.tar.xz
14
	 mirror://sourceforge/${PN}/${PV}/${PN}-src-partial-build-patch-${PV}-r${REV}.tar.xz
15
	 hq? ( mirror://sourceforge/${PN}/${PV}/${PN}-src-hq-cars-and-tracks-${PV}-r${REV}.tar.xz )
16
	 more-hq? ( mirror://sourceforge/${PN}/${PV}/${PN}-src-more-hq-cars-and-tracks-${PV}-r${REV}.tar.xz )
17
	 unmaintained? ( mirror://sourceforge/${PN}/${PV}/${PN}-src-unmaintained-${PV}-r${REV}.tar.xz )
18
	 wip? ( mirror://sourceforge/${PN}/${PV}/${PN}-src-wip-cars-and-tracks-${PV}-r${REV}.tar.xz )"
11
19
12
LICENSE="GPL-2"
20
LICENSE="GPL-2"
13
SLOT="0"
21
SLOT="2"
14
KEYWORDS="amd64 x86"
22
KEYWORDS="~amd64 ~x86"
15
IUSE="xrandr"
23
IUSE="hq more-hq profiling schedule_spy +trace +unload_ssggraph unmaintained wip +xrandr"
16
24
17
RDEPEND="virtual/opengl
25
RDEPEND="media-libs/freeglut
18
	virtual/glu
26
	>=media-libs/libpng-1.2.40
19
	media-libs/freeglut
20
	media-libs/openal
27
	media-libs/openal
21
	media-libs/freealut
28
	media-libs/freealut
22
	x11-libs/libX11
29
	x11-libs/libX11
23
	x11-libs/libXxf86vm
30
	x11-libs/libXxf86vm
24
	xrandr? ( x11-libs/libXrandr )
25
	sys-libs/zlib
31
	sys-libs/zlib
26
	>=media-libs/libpng-1.2.40"
32
	virtual/glu
33
	virtual/opengl"
27
DEPEND="${RDEPEND}
34
DEPEND="${RDEPEND}
35
	media-libs/libsdl
28
	>=media-libs/plib-1.8.3
36
	>=media-libs/plib-1.8.3
37
	net-libs/enet
38
	virtual/jpeg
29
	x11-proto/xproto
39
	x11-proto/xproto
30
	x11-libs/libXext
40
	x11-libs/libXext
31
	x11-libs/libICE
41
	x11-libs/libICE
Lines 36-83 Link Here
36
	x11-libs/libXrender
46
	x11-libs/libXrender
37
	xrandr? ( x11-proto/randrproto )"
47
	xrandr? ( x11-proto/randrproto )"
38
48
39
S=${WORKDIR}/${PN}-$(get_version_component_range 1-3)-src
49
S=${WORKDIR}
40
50
41
src_prepare() {
51
src_unpack() {
42
	# http://sourceforge.net/apps/trac/speed-dreams/ticket/111
52
	unpack ${PN}-src-base-${PV}-r${REV}.tar.xz
43
	MAKEOPTS="${MAKEOPTS} -j1"
53
	use hq && unpack ${PN}-src-hq-cars-and-tracks-${PV}-r${REV}.tar.xz
44
54
	use more-hq && unpack ${PN}-src-more-hq-cars-and-tracks-${PV}-r${REV}.tar.xz
45
	epatch \
55
	use unmaintained && unpack ${PN}-src-unmaintained-${PV}-r${REV}.tar.xz
46
			"${FILESDIR}"/${P}-asneeded.patch \
56
	use wip && unpack ${PN}-src-wip-cars-and-tracks-${PV}-r${REV}.tar.xz
47
			"${FILESDIR}"/${P}-automake.patch \
57
	if ( use !hq || use !more-hq || use !unmaintained || use !wip ) ; then
48
			"${FILESDIR}"/${P}-libpng15.patch
58
		unpack ${PN}-src-partial-build-patch-${PV}-r${REV}.tar.xz
49
59
	fi
50
	sed -i \
51
		-e '/ADDCFLAGS/s: -O2::' \
52
		configure.in || die
53
	sed -i \
54
		-e '/COPYING/s:=.*:= \\:' \
55
		Makefile || die
56
	sed -i \
57
		-e "/^datadir/s:=.*:= ${GAMES_DATADIR}/${PN}:" \
58
		Make-config.in || die
59
60
	eautoreconf
61
}
60
}
62
61
63
src_configure() {
62
src_configure() {
64
	addpredict $(echo /dev/snd/controlC? | sed 's/ /:/g')
63
65
	[[ -e /dev/dsp ]] && addpredict /dev/dsp
64
	local mycmakeargs=(
66
	egamesconf \
65
		$(cmake-utils_use profiling OPTION_PROFILER)
67
		--prefix=/usr \
66
		$(cmake-utils_use schedule_spy OPTION_SCHEDULE_SPY)
68
		--bindir="${GAMES_BINDIR}" \
67
		$(cmake-utils_use trace OPTION_TRACE)
69
		$(use_enable xrandr)
68
		$(cmake-utils_use unload_ssggraph OPTION_UNLOAD_SSGGRAPH)
69
		$(cmake-utils_use xrandr OPTION_XRANDR)
70
		-DOPTION_OFFICIAL_ONLY=ON
71
		-DSD_BINDIR:PATH=games/bin
72
		-DSD_DATADIR:PATH=share/games/speed-dreams-2
73
		-DSD_INCLUDEDIR:PATH=include/speed-dreams-2
74
		-DSD_LIBDIR:PATH=$(games_get_libdir)/speed-dreams-2
75
	)
76
77
	cmake-utils_src_configure
70
}
78
}
71
79
72
src_install() {
80
src_install() {
73
	emake DESTDIR="${D}" install datainstall || die
81
	cmake-utils_src_install
74
75
	find "${D}" -name Makefile -exec rm -f {} +
76
82
77
	dodoc CHANGES README TODO
83
	# NOTE: We don't usually install INSTALL.txt, but I'm including it here because it
84
	# explains the unload_ssggraph option as a workaround for bugs in some setups.
85
	dodoc CHANGES.txt INSTALL.txt README.txt TODO.txt
86
	dohtml -r doc/faq doc/userman
78
87
79
	newicon icon.svg ${PN}.svg
88
	newicon data/data/icons/icon.png ${PN}-2.svg
80
	make_desktop_entry ${PN} "Speed Dreams"
89
	make_desktop_entry "speed-dreams-2" "Speed Dreams" "${PN}-2"
81
90
82
	prepgamesdirs
91
	prepgamesdirs
83
}
92
}

Return to bug 415913