blob: 7d06e4db88b4cd146cdf420975d526bf07dd64d4 (
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
|
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=6
inherit cmake-utils
DESCRIPTION="2D car crashing game similar to the old classic Destruction Derby."
HOMEPAGE="https://github.com/petarov/savagewheels"
GAMEDATA="${PN}-gamedata-1.4.0"
SRC_URI="
https://github.com/petarov/savagewheels/archive/${PV}.tar.gz -> ${P}.tar.gz
https://github.com/petarov/savagewheels/releases/download/v1.4/${PN}-gamedata.tar.gz -> ${GAMEDATA}.tar.gz
"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"
IUSE="fmod sound"
RDEPEND="
media-libs/libsdl
sound? (
!fmod? ( media-libs/sdl-mixer[mod,modplug] )
fmod? ( >=media-libs/fmod-4.38.00 )
)"
DEPEND="${RDEPEND}"
REQUIRED_USE="fmod? ( sound )"
src_unpack() {
unpack ${P}.tar.gz
cp "${FILESDIR}/${PN}.in" "${S}" || die
mkdir "${WORKDIR}/${GAMEDATA}" ||
die "Failed to make directory: ${WORKDIR}/${GAMEDATA}"
cd "${WORKDIR}/${GAMEDATA}" ||
die "Unable to change into directory: ${WORKDIR}/${GAMEDATA}"
unpack "${GAMEDATA}.tar.gz"
}
src_configure() {
local mycmakeargs=(
-DCMAKE_INSTALL_DATADIR=share/${PN}
-DCMAKE_INSTALL_LIBEXECDIR=libexec/${PN}
$(usex sound $(usex fmod '-DSOUND=FMOD -DFMOD_PATH=/opt/fmodex/api' '-DSOUND=YES') '-DSOUND=NO')
)
cmake-utils_src_configure
}
src_install() {
cmake-utils_src_install
insinto /usr/share/${PN}
doins -r "${WORKDIR}/${GAMEDATA}/."
}
|