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

EAPI=6

inherit desktop eutils gnome2-utils

DESCRIPTION="Atmospheric side-scrolling action adventure platformer set in a gorgeous forest"
HOMEPAGE="http://badlandgame.com"
SRC_URI="Badland_GotY_${PV}.tar
	https://dev.gentoo.org/~chewi/distfiles/${PN}.png"
LICENSE="all-rights-reserved"
SLOT="0"
KEYWORDS="-* ~amd64 ~x86"
RESTRICT="bindist splitdebug"

QA_PREBUILT="opt/${PN}/*"

DEPEND="
	app-admin/chrpath
"

RDEPEND="
	dev-db/sqlite:3[abi_x86_32]
	media-libs/fontconfig:1.0[abi_x86_32]
	media-libs/freetype:2[abi_x86_32]
	media-libs/libpng:1.2[abi_x86_32]
	media-libs/libsdl2[abi_x86_32,joystick,opengl,sound,threads,video]
	net-misc/curl[abi_x86_32]
	>=sys-devel/gcc-4.6[cxx]
	>=sys-libs/glibc-2.14
	virtual/opengl[abi_x86_32]
	x11-libs/libX11[abi_x86_32]
"

S="${WORKDIR}"

pkg_nofetch() {
	einfo "Please buy and download ${SRC_URI} from:"
	einfo "  https://www.humblebundle.com/store/badland-game-of-the-year-humble-deluxe-edition"
	einfo "and move it to your distfiles directory."
}

src_prepare() {
	default

	# Replace insecure RPATH.
	chrpath -r '$ORIGIN' ${PN} || die
}

src_install() {
	local dir=/opt/${PN}

	insinto "${dir}"
	doins -r Resources

	exeinto "${dir}"
	doexe ${PN} *.so

	make_wrapper ${PN} "./${PN}" "${dir}"
	make_desktop_entry ${PN} "Badland"

	doicon -s 128 "${DISTDIR}"/${PN}.png
}

pkg_postinst() { gnome2_icon_cache_update; }
pkg_postrm() { gnome2_icon_cache_update; }