summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacho Ramos <pacho@gentoo.org>2018-05-01 21:08:58 +0200
committerPacho Ramos <pacho@gentoo.org>2018-05-01 21:35:55 +0200
commit2de88f03f39f8ef50015dd7b1c87fc7b32119f5f (patch)
treed9c39eafd322b2737f14e0d4d77e35b5d5969339 /games-strategy/dopewars
parentgames-strategy/crimson: Drop old (diff)
downloadgentoo-2de88f03f39f8ef50015dd7b1c87fc7b32119f5f.tar.gz
gentoo-2de88f03f39f8ef50015dd7b1c87fc7b32119f5f.tar.bz2
gentoo-2de88f03f39f8ef50015dd7b1c87fc7b32119f5f.zip
games-strategy/dopewars: Stop using games.eclass
Package-Manager: Portage-2.3.31, Repoman-2.3.9
Diffstat (limited to 'games-strategy/dopewars')
-rw-r--r--games-strategy/dopewars/dopewars-1.5.12-r3.ebuild64
-rw-r--r--games-strategy/dopewars/files/dopewars-1.5.12-CVE-2009-3591.patch4
2 files changed, 66 insertions, 2 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
+}
diff --git a/games-strategy/dopewars/files/dopewars-1.5.12-CVE-2009-3591.patch b/games-strategy/dopewars/files/dopewars-1.5.12-CVE-2009-3591.patch
index d657bf8744f1..3b8b066a81cd 100644
--- a/games-strategy/dopewars/files/dopewars-1.5.12-CVE-2009-3591.patch
+++ b/games-strategy/dopewars/files/dopewars-1.5.12-CVE-2009-3591.patch
@@ -3,8 +3,8 @@ Patch for CVE-2009-3591 -- bug 288295.
Fetched from upstream SVN:
http://dopewars.svn.sourceforge.net/viewvc/dopewars/dopewars/trunk/src/serverside.c?r1=1033&r2=1032&pathrev=1033
---- dopewars/trunk/src/serverside.c 2009/03/10 07:18:49 1032
-+++ dopewars/trunk/src/serverside.c 2009/10/05 04:11:32 1033
+--- trunk/src/serverside.c 2009/03/10 07:18:49 1032
++++ trunk/src/serverside.c 2009/10/05 04:11:32 1033
@@ -504,6 +504,12 @@
break;
case C_REQUESTJET: