blob: abb40a2d14ca8031d2fd77cb45038ee6817935ca (
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit desktop eapi8-dosym toolchain-funcs xdg
DESCRIPTION="Clone of Super Monkey Ball using SDL/OpenGL"
HOMEPAGE="https://neverball.org"
SRC_URI="https://neverball.org/${P}.tar.gz"
LICENSE="GPL-2+ IJG"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="nls"
RESTRICT="test" # not a test suite, only starts ./neverball
DEPEND="
dev-games/physfs
media-libs/libpng:=
media-libs/libsdl2[joystick,opengl,sound,video]
media-libs/libvorbis
media-libs/sdl2-ttf
virtual/jpeg
virtual/opengl
nls? ( virtual/libintl )"
RDEPEND="
${DEPEND}
media-fonts/dejavu
media-fonts/wqy-microhei"
BDEPEND="nls? ( sys-devel/gettext )"
PATCHES=(
"${FILESDIR}"/${P}-gcc-10.patch
)
src_prepare() {
default
# adjust man page for namespaced mapc executable (bug #50538)
sed -i "s/mapc/${PN}-mapc/;s/MAPC/${PN^^}-MAPC/;1s/1/6/" dist/mapc.1 || die
}
src_compile() {
tc-export CC CXX
local emakeargs=(
DATADIR="${EPREFIX}"/usr/share/${PN}
LOCALEDIR="${EPREFIX}"/usr/share/locale
ENABLE_NLS=$(usex nls 1 0)
CFLAGS="${CFLAGS}"
CPPFLAGS="${CPPFLAGS}"
CXXFLAGS="${CXXFLAGS}"
)
emake "${emakeargs[@]}"
}
src_install() {
dobin neverball neverputt
newbin mapc ${PN}-mapc
doman dist/{neverball,neverputt}.6
newman dist/mapc.1 neverball-mapc.6
insinto /usr/share/${PN}
doins -r data/.
# unbundle fonts
dosym8 -r /usr/share/{fonts/dejavu,${PN}/ttf}/DejaVuSans-Bold.ttf
dosym8 -r /usr/share/{fonts/wqy-microhei,${PN}/ttf}/wqy-microhei.ttc
insinto /usr/share
[[ -d locale ]] && doins -r locale
dodoc README.md doc/{authors.txt,manual.txt,release-notes.md}
local name res
for name in ball putt; do
for res in 16 32 64 128 256; do
newicon -s ${res} dist/never${name}_${res}.png never${name}.png
done
done
domenu dist/{neverball,neverputt}.desktop
}
|