summaryrefslogtreecommitdiff
blob: bbf601b4f88fa936291504af9d98815dee94524f (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-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=6

[[ ${PV} = 9999* ]] && GIT="git-r3"

inherit ${GIT} cmake-utils

DESCRIPTION="Rally game focused on closed rally tracks with possible stunt elements."
HOMEPAGE="http://stuntrally.tuxfamily.org/"

SLOT="0"
LICENSE="GPL-3"
IUSE="dedicated +game editor"

if [[ ${PV} = 9999* ]]; then
	SRC_URI=""
	KEYWORDS=""
	EGIT_REPO_URI="https://github.com/stuntrally/stuntrally"
#	^ dead
#	EGIT_REPO_URI="https://github.com/akien-mga/stuntrally"
#	EGIT_BRANCH="ogre-1.11"
#	^ TODO (ogre-1.11 is hardmasked for now)
	LIVE_PDEPEND="~${CATEGORY}/${PN}-tracks-${PV}"
else
	KEYWORDS="~amd64 ~x86"
	SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tgz"
fi

DEPEND="
	game? (
		dev-games/ogre[cg,boost,ois,freeimage,opengl,zip,-double-precision]
		dev-games/mygui[ogre,plugins]
		media-libs/libsdl2[haptic]
		media-libs/libvorbis
		media-libs/libogg
		media-libs/openal
		sci-physics/bullet[bullet3,extras]
	)
	dev-libs/boost
	net-libs/enet:1.3
	virtual/libstdc++
"
RDEPEND="${DEPEND}
	~games-sports/stuntrally-tracks-${PV}
"
PDEPEND="${LIVE_PDEPEND}"

REQUIRED_USE="editor? ( game )"

DOCS=(Readme.txt)

src_configure() {
	local mycmakeargs=(
		-DBUILD_MASTER_SERVER=$(usex dedicated)
		-DBUILD_GAME=$(usex game)
		-DBUILD_EDITOR=$(usex editor)
		-DBUILD_SHARED_LIBS=OFF
		-DSHARE_INSTALL="share/stuntrally"
	)
	cmake-utils_src_configure
}