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

EAPI=7

inherit desktop unpacker xdg-utils

DESCRIPTION="Metroidvania-style action-platformer set in a magical Mexican-inspired world"
HOMEPAGE="https://guacamelee.com"
SRC_URI="Guacamelee_linux_1393037377.sh"
S="${WORKDIR}/data"

LICENSE="all-rights-reserved"
SLOT="0"
KEYWORDS="-* ~amd64 ~x86"
RESTRICT="bindist fetch splitdebug"

RDEPEND="
	media-libs/libsdl2[abi_x86_32,joystick,opengl,sound,threads,video]
	virtual/opengl[abi_x86_32]
"

DIR="/opt/${PN}"
QA_PREBUILT="${DIR}/*"

pkg_nofetch() {
	einfo "This package requires the Guacamelee! Gold Edition file included in"
	einfo "Humble Indie Bundle 11. If you have it then please move"
	einfo "${SRC_URI} to your distfiles directory. If you"
	einfo "missed it then the game is also available to buy from GOG but the"
	einfo "package will need adapting first. Please contact the Gentoo Games team"
	einfo "if you bought it from GOG."
}

src_unpack() {
	unpack_zip ${A}
}

src_install() {
	exeinto "${DIR}"
	newexe x86/game-bin ${PN}
	dosym "${DIR}"/${PN} /usr/bin/${PN}

	insinto "${DIR}"
	doins -r noarch/{*.dat*,media/}

	exeinto "${DIR}/lib32"
	doexe x86/lib32/libfmod*.so

	dodoc noarch/README.linux

	newicon -s 512 noarch/Guacamelee.png ${PN}.png
	make_desktop_entry ${PN} "Guacamelee"
}

pkg_postinst() { xdg_icon_cache_update; }
pkg_postrm() { xdg_icon_cache_update; }