summaryrefslogtreecommitdiff
path: root/games-strategy/dopewars/dopewars-1.5.12-r3.ebuild
diff options
context:
space:
mode:
Diffstat (limited to 'games-strategy/dopewars/dopewars-1.5.12-r3.ebuild')
-rw-r--r--games-strategy/dopewars/dopewars-1.5.12-r3.ebuild64
1 files changed, 64 insertions, 0 deletions
diff --git a/games-strategy/dopewars/dopewars-1.5.12-r3.ebuild b/games-strategy/dopewars/dopewars-1.5.12-r3.ebuild
new file mode 100644
index 000000000000..4d1c38437619
--- /dev/null
+++ b/games-strategy/dopewars/dopewars-1.5.12-r3.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit desktop
+
+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"
+KEYWORDS="~amd64 ~x86"
+IUSE="nls ncurses gtk gnome sdl"
+
+RDEPEND="
+ ncurses? ( >=sys-libs/ncurses-5.2:0= )
+ gtk? ( x11-libs/gtk+:2 )
+ dev-libs/glib:2
+ nls? ( virtual/libintl )
+ sdl? (
+ media-libs/libsdl
+ media-libs/sdl-mixer
+ )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+"
+
+src_prepare() {
+ default
+ eapply "${FILESDIR}"/${P}-CVE-2009-3591.patch
+ sed -i \
+ -e "/priv_hiscore/ s:DPDATADIR:\"/var/lib\":" \
+ -e "/\/doc\// s:DPDATADIR:\"/usr/share\":" \
+ -e 's:index.html:html/index.html:' \
+ src/dopewars.c || die
+}
+
+src_configure() {
+ local myservconf
+
+ if ! use gtk ; then
+ myservconf="--disable-gui-client --disable-gui-server --disable-glibtest --disable-gtktest"
+ fi
+
+ econf \
+ $(use_enable ncurses curses-client) \
+ $(use_enable nls) \
+ $(use_with sdl) \
+ --without-esd \
+ --enable-networking \
+ --enable-plugins \
+ ${myservconf}
+}
+
+src_install() {
+ 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
+}