summaryrefslogtreecommitdiff
blob: f42c0c2b4453a542fa96c4569fc254ff032bc202 (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
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-arcade/tecnoballz/tecnoballz-0.92.ebuild,v 1.7 2012/01/20 17:36:07 mr_bones_ Exp $

EAPI=2
inherit eutils autotools games

DESCRIPTION="An exciting Brick Breaker"
HOMEPAGE="http://linux.tlk.fr/games/TecnoballZ/"
SRC_URI="http://linux.tlk.fr/games/TecnoballZ/download/${P}.tgz"

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

DEPEND="media-libs/libsdl
	media-libs/sdl-mixer
	media-libs/sdl-image[png]
	media-libs/libmikmod:0"

src_prepare() {
	epatch "${FILESDIR}"/${P}-gcc43.patch \
		"${FILESDIR}"/${P}-automake.patch
	mv man/${PN}.fr.6 man/fr/${PN}.6 || die
	# don't combine explicit and implicit rules for make 3.82 (bug #334629)
	sed -i \
		-e '/supervisor.c /s/.c /.cc /' \
		src/Makefile.am || die
	eautoreconf
}

src_install() {
	emake DESTDIR="${D}" install || die
	dodoc AUTHORS CHANGES NEWS README
	fperms g+w "${GAMES_STATEDIR}"/${PN}.hi || die
	make_desktop_entry ${PN} Tecnoballz
	prepgamesdirs
}

pkg_postinst() {
	has_version "media-libs/sdl-mixer[mikmod]" \
		|| ewarn "To have background music, emerge sdl-mixer with USE=mikmod"
	games_pkg_postinst
}