summaryrefslogtreecommitdiff
blob: 6383c14d96f2f8a38762c79f0c88ebba3044b30c (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
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI="5"

inherit eutils games

DESCRIPTION="a frog, and a platform game"
HOMEPAGE="http://frogatto.com/"
SRC_URI="http://github.com/frogatto/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="GPL-3 free-noncomm"
SLOT="0"
KEYWORDS="~amd64 ~x86"

IUSE="extras"

DEPEND="dev-libs/boost
	media-libs/glew
	media-libs/libpng:0
	media-libs/libsdl[X,audio,joystick,opengl,video]
	media-libs/sdl-image[png]
	media-libs/sdl-mixer[vorbis]
	media-libs/sdl-ttf
	sys-libs/zlib
	virtual/opengl
	virtual/glu"
RDEPEND="${DEPEND}"

src_prepare() {
	# drop some CXXFLAGS
	sed -i \
		-e '/BASE_CXXFLAGS/s/-Werror //' \
		-e '/BASE_CXXFLAGS/s/-g //' \
		Makefile || die 'sed on Makefile failed'

	epatch_user
}

src_compile() {
	emake USE_CCACHE="no" OPTIMIZE="no"
}

src_install() {
	insinto "${GAMES_DATADIR}/${PN}"
	newgamesbin game "${PN}.orig"
	doins -r data images music *.ttf

	if use extras; then
		# Install all modules
		doins -r modules
	else
		# Install only frogatto module by default
		insinto "${GAMES_DATADIR}/${PN}/modules"
		doins -r modules/frogatto
	fi

	newicon images/window-icon.png "${PN}.png"

	games_make_wrapper "${PN}" "${GAMES_BINDIR}/${PN}.orig" "${GAMES_DATADIR}/${PN}"
	make_desktop_entry "${PN}" "Frogatto and Friends"

	prepgamesdirs
}