blob: d87adf05402aacf44f9b564f52b388ac382820b1 (
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
|
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit cmake
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="sound"
RDEPEND="
media-libs/libsdl[joystick]
sound? ( media-libs/sdl-mixer[mod,modplug] )
"
DEPEND="${RDEPEND}"
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="${EPREFIX}"/usr/share/${PN}
-DCMAKE_INSTALL_LIBEXECDIR="${EPREFIX}"/usr/libexec/${PN}
-DSOUND=$(usex sound YES NO) # yes, 'NO' is important here. bug 773439
)
cmake_src_configure
}
src_install() {
cmake_src_install
insinto /usr/share/${PN}
doins -r "${WORKDIR}/${GAMEDATA}/."
}
|