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

EAPI=8

CHECKREQS_DISK_BUILD="1219M"
inherit check-reqs desktop prefix xdg

MY_PN="ASAMU"
MY_P="${MY_PN}_${PV}"
DESCRIPTION="First person platforming adventure about a boy who searches for his lost uncle"
HOMEPAGE="https://www.humblebundle.com/store/a-story-about-my-uncle"
SRC_URI="Linux-NoDRM-${MY_P}.zip
	fetch+https://dev.gentoo.org/~chewi/distfiles/${MY_PN}.png"

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

BDEPEND="
	app-arch/unzip
"

RDEPEND="
	media-libs/libsdl2[opengl,sound,video]
	sys-apps/bubblewrap
	>=sys-devel/gcc-3.4
	>=sys-libs/glibc-2.14
	virtual/opengl
"

S="${WORKDIR}"
DIR="/opt/${MY_PN}"
QA_PREBUILT="${DIR#/}/*"

pkg_nofetch() {
	einfo "Please buy and download Linux-NoDRM-${MY_P}.zip from:"
	einfo "  ${HOMEPAGE}"
	einfo "and move it to your distfiles directory."
}

src_prepare() {
	default
	rm -v Binaries/*/libSDL2-2.0.so.0 || die
}

src_install() {
	insinto "${DIR}"
	doins -r ${MY_PN}/ Engine/

	# The game resets the user config when the timestamps of the other config
	# files change, and doins does not preserve timestamps. Reduce the impact of
	# this by preserving the original timestamps with touch
	local file
	find -type f -name "*.ini" -print0 | while read -rd '' file; do
		touch -r "${file}" "${ED}${DIR}/${file}" || die
	done

	local platform=linux-$(usex amd64 amd64 x86)
	insinto "${DIR}"/Binaries/gentoo
	exeinto "${DIR}"/Binaries/gentoo
	doins Binaries/${platform}/steam_appid.txt
	doexe Binaries/${platform}/{${MY_PN},*.so*}

	keepdir "${DIR}"/${MY_PN}/Saves
	newbin $(prefixify_ro "${FILESDIR}"/wrapper.sh) ${MY_PN}

	doicon -s 64 "${DISTDIR}"/${MY_PN}.png
	make_desktop_entry ${MY_PN} "A Story About My Uncle" ${MY_PN}
}