summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Levine <plevine457@gmail.com>2017-07-31 22:01:10 -0400
committerDavid Seifert <soap@gentoo.org>2017-08-13 13:08:45 +0200
commit84a1b512c23ba9923bf3162d78e888a1a1fdc901 (patch)
treec2c67b672bc9731d76519f53e333c81f0d72de1e /games-arcade
parentmedia-sound/audacious: Fix mixing of tabs and spaces in metadata.xml (diff)
downloadgentoo-84a1b512c23ba9923bf3162d78e888a1a1fdc901.tar.gz
gentoo-84a1b512c23ba9923bf3162d78e888a1a1fdc901.tar.bz2
gentoo-84a1b512c23ba9923bf3162d78e888a1a1fdc901.zip
games-arcade/insaneodyssey: Fix building with GCC-6
Bug: https://bugs.gentoo.org/show_bug.cgi?id=600894 Package-Manager: Portage-2.3.6, Repoman-2.3.2 Closes: https://github.com/gentoo/gentoo/pull/5263
Diffstat (limited to 'games-arcade')
-rw-r--r--games-arcade/insaneodyssey/files/insaneodyssey-000311-gcc6.patch21
-rw-r--r--games-arcade/insaneodyssey/insaneodyssey-000311.ebuild5
2 files changed, 25 insertions, 1 deletions
diff --git a/games-arcade/insaneodyssey/files/insaneodyssey-000311-gcc6.patch b/games-arcade/insaneodyssey/files/insaneodyssey-000311-gcc6.patch
new file mode 100644
index 000000000000..74b4bf644d49
--- /dev/null
+++ b/games-arcade/insaneodyssey/files/insaneodyssey-000311-gcc6.patch
@@ -0,0 +1,21 @@
+Bug: https://bugs.gentoo.org/600894
+
+--- a/insaneodyssey/io.cpp
++++ b/insaneodyssey/io.cpp
+@@ -22,6 +22,7 @@
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <string.h>
++#include <cmath>
+
+ #include <SDL/SDL.h>
+
+@@ -894,7 +895,7 @@
+ else
+ {
+ if ( jumping )
+- yspeed = -jumpheight - abs(xspeed)/4;
++ yspeed = -jumpheight - std::abs(xspeed)/4;
+ }
+
+ short TempX = (x + width/2) / TILESIZE;
diff --git a/games-arcade/insaneodyssey/insaneodyssey-000311.ebuild b/games-arcade/insaneodyssey/insaneodyssey-000311.ebuild
index 2963941b7267..74763f4692e3 100644
--- a/games-arcade/insaneodyssey/insaneodyssey-000311.ebuild
+++ b/games-arcade/insaneodyssey/insaneodyssey-000311.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
@@ -30,6 +30,9 @@ src_prepare() {
"${FILESDIR}"/${P}-datafiles.patch > "${T}"/datafiles.patch \
|| die
epatch "${T}"/datafiles.patch
+
+ epatch "${FILESDIR}"/${P}-gcc6.patch
+
sed -i \
-e "/lvl/s:^:${GAMES_DATADIR}/${PN}/:" \
-e "s:night:${GAMES_DATADIR}/${PN}/night:" \