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

EAPI=7

inherit desktop gnome2-utils unpacker wrapper

DESCRIPTION="Throw your toys into your fire, and play with them as they burn"
HOMEPAGE="http://tomorrowcorporation.com/"
SRC_URI="LittleInferno-${PV}.sh"

LICENSE="Gameplay-Group-EULA"
SLOT="0"
KEYWORDS="-* ~amd64 ~x86"
IUSE="bundled-libs"

RESTRICT="bindist fetch bundled-libs? ( splitdebug )"

MYGAMEDIR=opt/${PN}
QA_PREBUILT="${MYGAMEDIR#/}/LittleInferno.bin.x86
	${MYGAMEDIR#/}/lib/*"

RDEPEND="
	>=net-misc/curl-7.37.0-r1[abi_x86_32(-)]
	x11-libs/libX11[abi_x86_32(-)]
	virtual/opengl[abi_x86_32(-)]
	!bundled-libs? (
		>=media-libs/libogg-1.3.1[abi_x86_32(-)]
		>=media-libs/libvorbis-1.3.3-r1[abi_x86_32(-)]
		>=media-libs/openal-1.15.1-r1[abi_x86_32(-)]
	)
"
BDEPEND="app-arch/xz-utils"

src_unpack() {
	unpack_makeself ${A}

	mkdir ${P} || die
	cd ${P} || die

	local i
	for i in instarchive_{,linux_}all ; do
		mv ../"${i}" ../"${i}".tar.xz || die
		unpack ./../"${i}".tar.xz
	done
}

src_prepare() {
	if ! use bundled-libs ; then
		rm -rv lib || die
	fi
}

src_install() {
	insinto ${MYGAMEDIR}
	doins -r *

	doicon -s 128 LittleInferno.png
	make_desktop_entry ${PN} "Little Inferno" LittleInferno
	make_wrapper ${PN} "./LittleInferno.bin.x86" "${MYGAMEDIR}" "${MYGAMEDIR}/lib"

	fperms +x ${MYGAMEDIR}/LittleInferno.bin.x86
}

pkg_preinst() {
	gnome2_icon_savelist
}

pkg_postinst() {
	gnome2_icon_cache_update
}

pkg_postrm() {
	gnome2_icon_cache_update
}