Skip to content

Commit

Permalink
games-arcade/insaneodyssey: Fix building with GCC-6
Browse files Browse the repository at this point in the history
Bug: https://bugs.gentoo.org/show_bug.cgi?id=600894
Package-Manager: Portage-2.3.6, Repoman-2.3.2
Closes: gentoo#5263
  • Loading branch information
Peter-Levine authored and SoapGentoo committed Aug 13, 2017
1 parent 391f27b commit 84a1b51
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
21 changes: 21 additions & 0 deletions games-arcade/insaneodyssey/files/insaneodyssey-000311-gcc6.patch
Original file line number Diff line number Diff line change
@@ -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;
5 changes: 4 additions & 1 deletion games-arcade/insaneodyssey/insaneodyssey-000311.ebuild
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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:" \
Expand Down

0 comments on commit 84a1b51

Please sign in to comment.