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

EAPI=7

inherit desktop eutils multilib-minimal

TS="1381858841"

DESCRIPTION="Legendary Worms Game. SinglePlayer-only."
HOMEPAGE="http://www.team17.com/games/worms/worms-reloaded/"
SRC_URI="WormsReloaded_Linux_${TS}.sh"

RESTRICT="fetch strip"
LICENSE="all-rights-reserved"

SLOT="0"
KEYWORDS="-* ~amd64 ~x86"
IUSE=""

DEPEND=""
RDEPEND="
	media-libs/libsdl2[${MULTILIB_USEDEP}]
	media-libs/openal[${MULTILIB_USEDEP}]
	sys-libs/zlib[${MULTILIB_USEDEP}]
"

S="${WORKDIR}/data"

GAMEDIR="/opt/${PN}"

pkg_nofetch() {
	einfo ""
	einfo "Please buy and download \"${SRC_URI}\" from"
	einfo "HumbleIndieBundle or ${HOMEPAGE}"
	einfo "and move/link it to \"${DISTDIR}\""
	einfo ""
}

src_unpack() {
	unpack_zip ${A}
}

src_prepare() {
	default
	rm -r "${S}/x86/lib/libopenal.so.1"
}

src_install() {
	# Install documentation
	dodoc noarch/README.linux
	rm noarch/README.linux

	# Install data
	insinto "${GAMEDIR}"
	doins -r noarch/* x86/lib
	exeinto "${GAMEDIR}"
	doexe x86/WormsReloaded.bin.x86

	# Install icon and desktop file
	newicon "x86/WormsReloaded.png" "${PN}.png"
	make_desktop_entry "${PN}" "Worms Reloaded" "${PN}"
	make_wrapper "${PN}" "./WormsReloaded.bin.x86" "${GAMEDIR}" "${GAMEDIR}/lib"

	# Setting permissions.
}