games-arcade/retrobattle: Fix building with GCC-6 (bug #614398)
authorPeter-Levine <plevine457@gmail.com>
Fri, 7 Apr 2017 20:51:24 +0000 (16:51 -0400)
committerDavid Seifert <soap@gentoo.org>
Sun, 16 Apr 2017 18:57:38 +0000 (20:57 +0200)
Package-Manager: Portage-2.3.5, Repoman-2.3.2
Closes: https://github.com/gentoo/gentoo/pull/4384

games-arcade/retrobattle/files/retrobattle-1.0.0-gcc6.patch [new file with mode: 0644]
games-arcade/retrobattle/retrobattle-1.0.0.ebuild

diff --git a/games-arcade/retrobattle/files/retrobattle-1.0.0-gcc6.patch b/games-arcade/retrobattle/files/retrobattle-1.0.0-gcc6.patch
new file mode 100644 (file)
index 0000000..19974e3
--- /dev/null
@@ -0,0 +1,22 @@
+--- a/src/GameLogic.h
++++ b/src/GameLogic.h
+@@ -52,8 +52,8 @@
+   /* Fixed interval time-based animation */
+   static const int maximumFrameRate = 60;
+   static const int minimumFrameRate = 15;
+-  static const float updateInterval = 1.0 / maximumFrameRate;
+-  static const float maxCyclesPerFrame = maximumFrameRate / minimumFrameRate;
++  static const float updateInterval;
++  static const float maxCyclesPerFrame;
+ 
+   float lastFrameTime;
+   float cyclesLeftOver;
+--- a/src/GameLogic.cc
++++ b/src/GameLogic.cc
+@@ -206,3 +206,6 @@
+ {
+   sprintf(buf, "%s/data/gfx/%s", datadir, file);
+ }
++
++const float GameLogic::updateInterval = 1.0 / maximumFrameRate;
++const float GameLogic::maxCyclesPerFrame = maximumFrameRate / minimumFrameRate;
index ad00348dd5994846ea9ba90df8528375ae715c6c..eed0252ed1e1a54428564199209b8459d8bb1e59 100644 (file)
@@ -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
@@ -22,7 +22,7 @@ RDEPEND="${DEPEND}"
 S=${WORKDIR}/${MY_P}/src
 
 src_prepare() {
-       epatch "${FILESDIR}"/${P}-{build,sound}.patch
+       epatch "${FILESDIR}"/${P}-{build,sound,gcc6}.patch
 }
 
 src_install() {