summaryrefslogtreecommitdiff
blob: 4cc0b1500223fa91981b18afbb6a754d7f444863 (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
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-puzzle/bastet/bastet-0.41.ebuild,v 1.9 2009/02/08 18:27:16 tupone Exp $

EAPI=2
inherit toolchain-funcs eutils games

DESCRIPTION="a simple, evil, ncurses-based Tetris(R) clone"
HOMEPAGE="http://fph.altervista.org/prog/bastet.shtml"
SRC_URI="http://fph.altervista.org/prog/${P}.tgz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ppc ppc64 x86"
IUSE=""

DEPEND=">=sys-libs/ncurses-5"

src_prepare() {
	sed -i \
		-e '/^include/s/^/-/' \
		-e "/^CC/s/gcc/$(tc-getCC)/" \
		-e "/^DATA_PREFIX/s:=.*:=${GAMES_STATEDIR}/:" \
		-e '/^CFLAGS/s/=/+=/' \
		Makefile \
		|| die "sed failed"
	epatch "${FILESDIR}"/${P}-as-needed.patch

	sed -i \
		-e 's/ch;/ch = 0;/' \
		main.c game.c \
		|| die "sed failed"
}

src_install() {
	dogamesbin bastet || die "dogamesbin failed"
	doman bastet.6
	dodoc AUTHORS BUGS NEWS README* TODO
	dodir "${GAMES_STATEDIR}"
	touch "${D}${GAMES_STATEDIR}/bastet.scores" || die "touch failed"
	fperms 664 "${GAMES_STATEDIR}/bastet.scores"
	prepgamesdirs
}