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

EAPI=8

CHECKREQS_DISK_BUILD="767M"
inherit check-reqs desktop wrapper xdg

DESCRIPTION="Retro-inspired 2D Action RPG with a sci-fi story"
HOMEPAGE="https://radicalfishgames.itch.io/crosscode"
SRC_URI="crosscode-new-linux64.zip"

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

RDEPEND="
	>=dev-libs/nwjs-0.63.0
"

BDEPEND="
	app-arch/unzip
"

S="${WORKDIR}"
DIR="/usr/share/${PN}"

pkg_nofetch() {
	einfo "Please buy and download ${SRC_URI} from:"
	einfo "  ${HOMEPAGE}"
	einfo "and move it to your distfiles directory."
}

src_prepare() {
	default

	# Greenworks is only needed under Steam.
	rm -r assets/modules/ || die
}

src_install() {
	insinto "${DIR}"
	doins -r assets/ favicon.png natives_blob.bin package.json

	newicon assets/media/face/lore/lea.png ${PN}.png
	# --use-gl=egl is needed with recent NW.js versions.
	make_wrapper ${PN} "nwjs '${EPREFIX}${DIR}' --use-gl=egl"
	make_desktop_entry ${PN} CrossCode
}