summaryrefslogtreecommitdiff
blob: cac9b4d6713582404686f8c0ca41ff608c0bb6c7 (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=7

inherit desktop unpacker wrapper

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

LICENSE="Gameplay-Group-EULA"
SLOT="0"
KEYWORDS="-* ~amd64 ~x86"
RESTRICT="bindist fetch"

QA_PREBUILT="
	opt/${PN}/LittleInferno.bin.x86
	opt/${PN}/lib/libogg.so.0
	opt/${PN}/lib/libvorbis.so.0"

RDEPEND="
	media-libs/openal[abi_x86_32(-)]
	net-misc/curl[abi_x86_32(-)]
	virtual/opengl[abi_x86_32(-)]
	x11-libs/libX11[abi_x86_32(-)]"

pkg_nofetch() {
	einfo "Please buy and download '${A}' from:"
	einfo "  ${HOMEPAGE}"
	einfo "and place it in your distfiles directory."
}

src_unpack() {
	unpack_makeself ${A}
	mv instarchive_all{,.tar.xz} || die
	mv instarchive_linux_all{,.tar.xz} || die
	unpack ./instarchive_{,linux_}all.tar.xz
}

src_install() {
	exeinto /opt/${PN}
	doexe LittleInferno.bin.x86

	insinto /opt/${PN}
	doins -r {debug,embed,frontend,resource}.pak shaders

	# game currently segfaults without bundled libvorbis
	exeinto /opt/${PN}/lib
	doexe lib/lib{ogg,vorbis}.so.0

	make_wrapper ${PN} ./LittleInferno.bin.x86 /opt/${PN}

	newicon LittleInferno.png ${PN}.png
	make_desktop_entry ${PN} "Little Inferno"
}