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

EAPI=5

inherit eutils check-reqs gnome2-utils games

DESCRIPTION="Leisure Suit Larry Reloaded"
HOMEPAGE="https://www.replaygamesinc.com"
SRC_URI="LarryReloadedLinux.tar.gz"

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

QA_PREBUILT="${GAMES_PREFIX_OPT#/}/${PN}/Larry-Linux
	${GAMES_PREFIX_OPT#/}/${PN}/Larry-Linux_Data/Mono/x86/libmono.so"
CHECKREQS_DISK_VAR="4500M"
CHECKREQS_DISK_USR="4500M"

S=${WORKDIR}

pkg_nofetch() {
	einfo "Please buy & download ${SRC_URI} from:"
	einfo "  ${HOMEPAGE}"
	einfo "and move it to ${DISTDIR}"
	einfo
}

src_prepare() {
	sed \
		-e "s#@GAMES_DIR@#${GAMES_PREFIX_OPT}/${PN}#" \
		"${FILESDIR}"/${PN}-wrapper > "${S}"/larry || die
}

src_install() {
	newicon -s 128 Larry/Larry-Linux_Data/Resources/UnityPlayer.png ${PN}.png
	make_desktop_entry ${PN}

	dogamesbin larry
	# move it, over 4gb
	dodir "${GAMES_PREFIX_OPT}"/${PN}
	mv Larry/* "${ED%/}/${GAMES_PREFIX_OPT}"/${PN}/ || die

	fperms +x "${GAMES_PREFIX_OPT}"/${PN}/Larry-Linux

	prepgamesdirs
}

pkg_preinst() {
	games_pkg_preinst
	gnome2_icon_savelist
}

pkg_postinst() {
	games_pkg_postinst
	gnome2_icon_cache_update
}

pkg_postrm() {
	gnome2_icon_cache_update
}