summaryrefslogtreecommitdiff
blob: da8a8fe1b85d996c3a720605340e1807307c4c5c (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
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-misc/dont-starve/dont-starve-1.ebuild,v 1.2 2013/12/01 23:08:40 hasufell Exp $

EAPI=5

inherit eutils games

DESCRIPTION="Wilderness survival game full of science and magic"
HOMEPAGE="http://www.dontstarvegame.com/"
SRC_URI="amd64? ( dontstarve_x64_1383879308.tar.gz )
	x86? ( dontstarve_x32_1383879308.tar.gz )"

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

MYGAMEDIR=${GAMES_PREFIX_OPT}/${PN}
QA_PREBUILT="${MYGAMEDIR#/}/bin/dontstarve"
if [[ $ARCH == amd64 ]] ; then
	QA_PREBUILT="${QA_PREBUILT}
		${MYGAMEDIR#/}/bin/lib64/*"
elif [[ ${ARCH} == x86 ]] ; then
	QA_PREBUILT="${QA_PREBUILT}
		${MYGAMEDIR#/}/bin/lib32/*"
fi

RDEPEND="net-misc/curl
	virtual/opengl"

S=${WORKDIR}/dontstarve

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

src_install() {
	local libdir=lib$(usex amd64 "64" "32")

	insinto "${MYGAMEDIR}"
	doins -r data mods

	exeinto "${MYGAMEDIR}"/bin
	doexe bin/dontstarve
	exeinto "${MYGAMEDIR}"/bin/${libdir}
	doexe bin/${libdir}/libfmod*
	# unbundling libsdl2 breaks the menu, so you cannot start the game
	doexe bin/${libdir}/libSDL2*

	games_make_wrapper ${PN} "./dontstarve" "${MYGAMEDIR}/bin" "${MYGAMEDIR}/bin/${libdir}"
	make_desktop_entry ${PN}

	doicon dontstarve.xpm

	prepgamesdirs
}