summaryrefslogtreecommitdiff
blob: 09c65664e2fcbd4abb0206a595f8e8abbc34347c (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
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-puzzle/wizznic/wizznic-0.9.ebuild,v 1.2 2010/09/03 17:15:52 nyhm Exp $

EAPI=2
inherit eutils games

EXTRA_PV="_feedback_version-src"
DESCRIPTION="Block-clearing puzzle game"
HOMEPAGE="http://wizznic.sourceforge.net/"
SRC_URI="mirror://sourceforge/wizznic/${P}${EXTRA_PV}.tar.bz2"

LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~x86"
IUSE=""

DEPEND="media-libs/libsdl[audio,joystick,video]
	media-libs/sdl-image[png]
	media-libs/sdl-mixer[vorbis]"

S=${WORKDIR}/${P}${EXTRA_PV}

src_prepare() {
	sed \
		-e '/^\(CC\|LD\|STRIP\)/d' \
		-e 's/(LD)/(CC)/g' \
		Makefile.linux > Makefile \
		|| die
}

src_compile() {
	emake \
		DATADIR="${GAMES_DATADIR}/${PN}/" \
		BINDIR="${GAMES_BINDIR}" \
		STRIP=true \
		|| die
}

src_install() {
	emake \
		DESTDIR="${D}" \
		DATADIR="${GAMES_DATADIR}/${PN}/" \
		BINDIR="${GAMES_BINDIR}" \
		install || die
	dodoc doc/{changelog.txt,credits.txt,media-licenses.txt,ports.txt,readme.txt}
	newicon data/wmicon.png ${PN}.png
	make_desktop_entry wizznic "Wizznic!"
	prepgamesdirs
}