blob: 630a7deb95d9fd48bdb16bf13cd55e3208f31529 (
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
|
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-roguelike/hengband/hengband-1.6.2-r1.ebuild,v 1.3 2008/03/13 17:50:11 wolf31o2 Exp $
inherit toolchain-funcs eutils games
DESCRIPTION="An Angband variant, with a Japanese/fantasy theme"
HOMEPAGE="http://hengband.sourceforge.jp/en/"
SRC_URI="mirror://sourceforge.jp/hengband/10331/${P}.tar.bz2
mirror://gentoo/${P}-mispellings.patch.gz"
KEYWORDS="ppc x86 ~x86-fbsd"
LICENSE="Moria"
SLOT="0"
IUSE="X linguas_ja"
RDEPEND=">=sys-libs/ncurses-5
X? ( x11-libs/libX11 )"
DEPEND="${RDEPEND}
X? ( x11-libs/libXt )"
src_unpack() {
unpack ${A}
cd "${S}"
# Removing Xaw dependency as is not used
sed -i \
-e '/Xaw/d' src/main-xaw.c \
|| die "sed main-xaw failed"
sed -i \
-e 's|root\.|root:|' lib/*/Makefile.in \
|| die "sed Makefile.in failed"
sed -i \
-e 's:/games/:/:g' configure \
|| die "sed configure failed"
epatch "../${P}"-mispellings.patch \
"${FILESDIR}/${P}"-added_faq.patch
}
src_compile() {
local myconf
use linguas_ja || myconf="--disable-japanese"
tc-export CC
egamesconf \
--with-setgid=${GAMES_GROUP} \
`use_with X x` \
${myconf} \
|| die
emake || die "emake failed"
}
src_install() {
make DESTDIR="${D}" install || die "make install failed"
if use linguas_ja ; then
dodoc readme.txt autopick.txt readme_eng.txt autopick_eng.txt
else
newdoc readme_eng.txt readme.txt
newdoc autopick_eng.txt autopick.txt
fi
prepgamesdirs
# FIXME: we need to patch around this BS
fperms g+w "${GAMES_DATADIR}"/${PN}/lib/{apex,data,save,user}
}
|