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

EAPI=6

inherit desktop

DESCRIPTION="A 3d dungeon crawling adventure in the spirit of NetHack"
HOMEPAGE="http://egoboo.sourceforge.net/"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"

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

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

src_prepare() {
	default
	sed -i \
		-e "s:@GENTOO_CONFDIR@:/etc/${PN}:" \
		-e "s:@GENTOO_DATADIR@:/usr/share/${PN}:" \
		src/game/platform/file_linux.c || die "sed failed"
	rm -rf src/enet || die
}

src_compile() {
	emake -C src/game PROJ_NAME=egoboo-2.x
}

src_install() {
	dodoc BUGS.txt Changelog.txt doc/*.txt doc/*.pdf

	insinto /usr/share/${PN}
	doins -r basicdat modules
	insinto /etc/${PN}
	doins -r controls.txt setup.txt

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

	newicon basicdat/icon.bmp ${PN}.bmp
	make_desktop_entry ${PN} Egoboo /usr/share/pixmaps/${PN}.bmp
}