blob: b0d7b7d89f5ea58f1bc0832ff063888249854027 (
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
64
65
66
67
68
69
70
71
72
73
74
75
76
|
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-strategy/dopewars/dopewars-1.5.9.ebuild,v 1.5 2004/01/06 05:16:02 avenj Exp $
inherit games
DESCRIPTION="Re-Write of the game Drug Wars"
HOMEPAGE="http://dopewars.sourceforge.net/"
SRC_URI="mirror://sourceforge/dopewars/${P}.tar.gz"
SLOT="0"
LICENSE="GPL-2"
KEYWORDS="x86 ppc ~amd64"
IUSE="nls ncurses gtk gtk2 gnome esd sdl"
DEPEND=">=sys-apps/sed-4
ncurses? ( >=sys-libs/ncurses-5.2 )
esd? ( media-sound/esound )
gtk? (
|| (
gtk2? ( =x11-libs/gtk+-2* )
=x11-libs/gtk+-1.2*
)
dev-libs/glib
)
nls? ( sys-devel/gettext )
sdl? ( media-libs/libsdl media-libs/sdl-mixer )"
src_unpack() {
unpack ${A}
cd ${S}
sed -i \
-e "/priv_hiscore/ s:DPDATADIR:\"${GAMES_STATEDIR}\":" \
-e "/\/doc\// s:DPDATADIR:\"/usr/share\":" \
-e 's:index.html:html/index.html:' \
src/dopewars.c || \
die "sed src/dopewars.c failed"
}
src_compile() {
local myservconf=""
if [ `use gtk` ] ; then
myservconf="--enable-gui-server `use_enable gtk2 glib2`"
else
myservconf="--disable-gui-client --disable-glibtest --disable-gtktest"
fi
egamesconf \
--disable-dependency-tracking \
`use_enable ncurses curses-client` \
`use_enable nls` \
`use_with sdl` \
`use_with esd` \
--enable-networking \
--enable-plugins \
${myservconf} \
|| die
emake || die "emake failed"
}
src_install() {
make DESTDIR="${D}" install || die "make install failed"
dodoc AUTHORS ChangeLog NEWS README TODO || die "dodoc failed"
cd "${D}/${GAMES_DATADIR}"
use gnome && mv gnome ../ || rm -rf gnome
mv pixmaps ../
dohtml -r doc/*/* || die "dohtml failed"
rm -rf doc
dodir "${GAMES_STATEDIR}" || die "dodir failed"
mv dopewars.sco "${D}/${GAMES_STATEDIR}"
fperms 664 "${GAMES_STATEDIR}/dopewars.sco" || die "fperms failed"
prepgamesdirs
}
|