You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
1.4 KiB
65 lines
1.4 KiB
6 years ago
|
# Copyright 1999-2018 Gentoo Foundation
|
||
13 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
6 years ago
|
EAPI=6
|
||
|
inherit desktop
|
||
13 years ago
|
|
||
|
DESCRIPTION="Re-Write of the game Drug Wars"
|
||
|
HOMEPAGE="http://dopewars.sourceforge.net/"
|
||
|
SRC_URI="mirror://sourceforge/dopewars/${P}.tar.gz"
|
||
|
|
||
|
LICENSE="GPL-2"
|
||
|
SLOT="0"
|
||
7 years ago
|
KEYWORDS="~amd64 ~x86"
|
||
13 years ago
|
IUSE="nls ncurses gtk gnome sdl"
|
||
|
|
||
6 years ago
|
RDEPEND="
|
||
|
ncurses? ( >=sys-libs/ncurses-5.2:0= )
|
||
13 years ago
|
gtk? ( x11-libs/gtk+:2 )
|
||
|
dev-libs/glib:2
|
||
|
nls? ( virtual/libintl )
|
||
|
sdl? (
|
||
|
media-libs/libsdl
|
||
|
media-libs/sdl-mixer
|
||
6 years ago
|
)
|
||
|
"
|
||
13 years ago
|
DEPEND="${RDEPEND}
|
||
13 years ago
|
virtual/pkgconfig
|
||
6 years ago
|
nls? ( sys-devel/gettext )
|
||
|
"
|
||
13 years ago
|
|
||
|
src_prepare() {
|
||
6 years ago
|
default
|
||
|
eapply "${FILESDIR}"/${P}-CVE-2009-3591.patch
|
||
13 years ago
|
sed -i \
|
||
6 years ago
|
-e "/priv_hiscore/ s:DPDATADIR:\"/var/lib\":" \
|
||
13 years ago
|
-e "/\/doc\// s:DPDATADIR:\"/usr/share\":" \
|
||
|
-e 's:index.html:html/index.html:' \
|
||
10 years ago
|
src/dopewars.c || die
|
||
13 years ago
|
}
|
||
|
|
||
|
src_configure() {
|
||
|
local myservconf
|
||
|
|
||
|
if ! use gtk ; then
|
||
|
myservconf="--disable-gui-client --disable-gui-server --disable-glibtest --disable-gtktest"
|
||
|
fi
|
||
|
|
||
6 years ago
|
econf \
|
||
13 years ago
|
$(use_enable ncurses curses-client) \
|
||
|
$(use_enable nls) \
|
||
|
$(use_with sdl) \
|
||
|
--without-esd \
|
||
|
--enable-networking \
|
||
|
--enable-plugins \
|
||
|
${myservconf}
|
||
|
}
|
||
|
|
||
|
src_install() {
|
||
6 years ago
|
emake DESTDIR="${D}" install
|
||
|
rm -r "${ED}"/usr/share/gnome || die
|
||
|
rm -rf "${ED}"/usr/share/doc
|
||
|
make_desktop_entry "${PN}" "Dopewars" /usr/share/pixmaps/dopewars-weed.png
|
||
|
HTML_DOCS="doc/*html" einstalldocs
|
||
13 years ago
|
}
|