summaryrefslogtreecommitdiff
path: root/games-strategy/dopewars
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /games-strategy/dopewars
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'games-strategy/dopewars')
-rw-r--r--games-strategy/dopewars/Manifest4
-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.patch20
-rw-r--r--games-strategy/dopewars/metadata.xml11
4 files changed, 99 insertions, 0 deletions
diff --git a/games-strategy/dopewars/Manifest b/games-strategy/dopewars/Manifest
new file mode 100644
index 000000000000..c469820a201b
--- /dev/null
+++ b/games-strategy/dopewars/Manifest
@@ -0,0 +1,4 @@
+AUX dopewars-1.5.12-CVE-2009-3591.patch 696 BLAKE2B a627b4b714af717942f310411154a069b5ee9a9e98454f325e085354bf1d534528048404cf8c0f78150d5f6af9ca1f8e9aac2d95c90d864e3bea5de51546086d SHA512 3f9476db27f1de31363470688f8a5ec97fa51fda4eb6025da513a1ad1640e5faa802ee7202e0698970eb3bbcb0edadfd304d839f2a3643a64d50e7354c8a049e
+DIST dopewars-1.5.12.tar.gz 1419725 BLAKE2B 930a0406bbf36f874d3bb00c7883c7d47136022e0209ec3993302cd75979d9f80033c973e23d60c4db70a335bfd3b8ff99075af470cb382ded59fc9289ee0edc SHA512 cfabaf9326c847aed6210a852ace64c697df5845a66b3179b8dc8dea7b99a11e1f91358d4ee54929a56c70d5f3a76f9f7bb4079fdef765601f165b4cd06cba5a
+EBUILD dopewars-1.5.12-r3.ebuild 1403 BLAKE2B a213900d842e325726df7df70fc7f54b959c15fde83349bd342e9c6cedf441f168eaeb19b02e60cb4cd38729bdae8c7c8e8a2462558c125e98ca1a642e666cd1 SHA512 6892d2e0feb45c180e9430e2718571cfb01c2caa9274c9f1b7f8de1355f8745988aea987604770ec960c523d91141a8c0398beab66eba9f47d08f07c68ef4eb9
+MISC metadata.xml 331 BLAKE2B af8487e0de1082dcc36415bf1216b7fcfdf35a3caf93fe3e5a0f40de32978b442eac43dfc7283a82a5403e5abfc73ff2b48ee6fce3b489a6fbc88529c4db28ab SHA512 26259f05b18c933c638d693805a106d26288c96ba220a719d8ec12d65b28c9abdb1d120694d31c07194282081e92dd83522e936771ab71e2ce86ea12d629d5b4
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
new file mode 100644
index 000000000000..3b8b066a81cd
--- /dev/null
+++ b/games-strategy/dopewars/files/dopewars-1.5.12-CVE-2009-3591.patch
@@ -0,0 +1,20 @@
+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
+
+--- 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:
+ i = atoi(Data);
++ /* Make sure value is within range */
++ if (i < 0 || i >= NumLocation) {
++ dopelog(3, LF_SERVER, _("%s: DENIED jet to invalid location %s"),
++ GetPlayerName(Play), Data);
++ break;
++ }
+ if (Play->EventNum == E_FIGHT || Play->EventNum == E_FIGHTASK) {
+ if (CanRunHere(Play)) {
+ break;
diff --git a/games-strategy/dopewars/metadata.xml b/games-strategy/dopewars/metadata.xml
new file mode 100644
index 000000000000..17b7414b8c0f
--- /dev/null
+++ b/games-strategy/dopewars/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>games@gentoo.org</email>
+ <name>Gentoo Games Project</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">dopewars</remote-id>
+ </upstream>
+</pkgmetadata>