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

EAPI=8

inherit desktop toolchain-funcs

DESCRIPTION="3D dungeon crawling adventure in the spirit of NetHack"
HOMEPAGE="http://egoboo.sourceforge.net/"
SRC_URI="
	mirror://sourceforge/${PN}/${P}.tar.gz
	https://dev.gentoo.org/~ionen/distfiles/${PN}.png"

LICENSE="GPL-3+"
SLOT="0"
KEYWORDS="~amd64 ~x86"

RDEPEND="
	dev-games/physfs
	media-libs/libsdl[joystick,opengl,video]
	media-libs/sdl-image[png]
	media-libs/sdl-mixer[vorbis]
	media-libs/sdl-ttf
	net-libs/enet:1.3=
	virtual/glu
	virtual/opengl"
DEPEND="${RDEPEND}"

PATCHES=(
	"${FILESDIR}"/${P}-gentoo.patch
	"${FILESDIR}"/${P}-enet-1.3.patch
	"${FILESDIR}"/${P}-keyboard-inputs.patch
)

src_prepare() {
	default

	sed -e "s|@GENTOO_CONFDIR@|${EPREFIX}/etc/${PN}|" \
		-e "s|@GENTOO_DATADIR@|${EPREFIX}/usr/share/${PN}|" \
		-i src/game/platform/file_linux.c || die
}

src_compile() {
	emake -C src/game PROJ_NAME=egoboo-2.x CC="$(tc-getCC)"
}

src_install() {
	newbin src/game/egoboo-2.x ${PN}

	dodoc BUGS.txt Changelog.txt doc/*.{txt,pdf}

	insinto /usr/share/${PN}
	doins -r basicdat modules

	insinto /etc/${PN}
	doins controls.txt setup.txt

	doicon "${DISTDIR}"/${PN}.png
	make_desktop_entry ${PN} Egoboo
}