1 |
# Copyright 1999-2004 Gentoo Foundation |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Header: /var/cvsroot/gentoo-x86/games-roguelike/tome/tome-2.2.6.ebuild,v 1.3 2004/07/01 05:21:55 mr_bones_ Exp $ |
4 |
|
5 |
inherit eutils games |
6 |
|
7 |
MY_PV=${PV//./} |
8 |
DESCRIPTION="save the world from Morgoth and battle evil (or become evil ;])" |
9 |
HOMEPAGE="http://t-o-m-e.net/" |
10 |
SRC_URI="http://t-o-m-e.net/dl/src/tome-${MY_PV}-src.tar.gz" |
11 |
|
12 |
LICENSE="Moria" |
13 |
SLOT="0" |
14 |
KEYWORDS="~x86 ~ppc ~amd64" |
15 |
IUSE="" |
16 |
|
17 |
RDEPEND="virtual/libc |
18 |
dev-lang/lua |
19 |
>=sys-libs/ncurses-5 |
20 |
virtual/x11" |
21 |
DEPEND="${RDEPEND} |
22 |
>=sys-apps/sed-4" |
23 |
|
24 |
S=${WORKDIR}/tome-${MY_PV}-src |
25 |
|
26 |
src_unpack() { |
27 |
unpack ${A} |
28 |
cd ${S}/src |
29 |
mv makefile.std makefile |
30 |
epatch "${FILESDIR}/${PV}-gentoo-paths.patch" |
31 |
sed -i \ |
32 |
-e "s:GENTOO_DIR:${GAMES_STATEDIR}:" files.c init2.c \ |
33 |
|| die "sed failed" |
34 |
} |
35 |
|
36 |
src_compile() { |
37 |
cd src |
38 |
make depend || die "make depend failed" |
39 |
emake -j1 \ |
40 |
COPTS="${CFLAGS}" \ |
41 |
BINDIR=${GAMES_BINDIR} \ |
42 |
LIBDIR=${GAMES_DATADIR}/${PN} \ |
43 |
|| die "emake failed" |
44 |
} |
45 |
|
46 |
src_install() { |
47 |
cd src |
48 |
emake -j1 \ |
49 |
OWNER=${GAMES_USER} \ |
50 |
BINDIR=${D}/${GAMES_BINDIR} \ |
51 |
LIBDIR=${D}/${GAMES_DATADIR}/${PN} install \ |
52 |
|| die "make install failed" |
53 |
cd ${S} |
54 |
dodoc *.txt |
55 |
|
56 |
dodir "${GAMES_STATEDIR}" |
57 |
touch "${D}/${GAMES_STATEDIR}/${PN}-scores.raw" |
58 |
prepgamesdirs |
59 |
fperms g+w "${GAMES_STATEDIR}/${PN}-scores.raw" |
60 |
fperms g+w "${GAMES_DATADIR}/${PN}/data" |
61 |
} |
62 |
|
63 |
pkg_postinst() { |
64 |
games_pkg_postinst |
65 |
echo |
66 |
ewarn "ToME ${PV} is not save-game compatible with previous versions." |
67 |
echo |
68 |
einfo "If you have older save files and you wish to continue those games," |
69 |
einfo "you'll need to remerge the version of ToME with which you started" |
70 |
einfo "those save-games." |
71 |
} |