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

EAPI=7

inherit desktop wrapper

DESCRIPTION="Perspective based puzzle game, where you flatten the view to move across gaps"
HOMEPAGE="https://stabyourself.net/orthorobot/"
SRC_URI="https://stabyourself.net/dl.php?file=${PN}/${PN}-source.zip -> ${P}.zip"
S="${WORKDIR}"

LICENSE="CC-BY-NC-ND-3.0"
SLOT="0"
KEYWORDS="~amd64 ~x86"

LVSLOT="0.8"
RDEPEND="games-engines/love:${LVSLOT}"
BDEPEND="app-arch/unzip"

src_unpack() {
	default

	# It is only one .love file (but with crappy name), so we can use asterisk
	mv *.love "${P}.zip" || die "mv failed"
	unpack "./${P}.zip"

	rm "${P}.zip" || die "rm failed"
}

src_prepare() {
	default
	# Fix error on quit
	sed -i -e 's/love.event.push("q")/love.event.push(fadegoal)/' menu.lua || die "sed failed"
}

src_install() {
	local dir=/usr/share/love/${PN}

	insinto ${dir}
	doins -r .

	make_wrapper "${PN}" "love-${LVSLOT} ${dir}"
	make_desktop_entry "${PN}"
}