forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
savagewheels-1.6.1-r1.ebuild
77 lines (59 loc) · 1.57 KB
/
savagewheels-1.6.1-r1.ebuild
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
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="debug 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}"
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=()
if use debug; then
CMAKE_BUILD_TYPE=Debug
fi
if use sound; then
if use fmod; then
mycmakeargs+=( -DSOUND=FMOD -DFMOD_PATH=/opt/fmodex/api )
else
mycmakeargs+=( -DSOUND=YES )
fi
else
mycmakeargs+=( -DSOUND=NO )
fi
mycmakeargs+=(
-DCMAKE_INSTALL_DATADIR=/usr/share/${PN}
-DCMAKE_INSTALL_LIBEXECDIR=/usr/libexec/${PN}
-DCMAKE_INSTALL_PREFIX=/usr
)
cmake-utils_src_configure
}
src_install() {
cmake-utils_src_install
insinto "/usr/share/${PN}"
doins -r "${WORKDIR}/${GAMEDATA}/."
}