commit:     1b99de510adbadfd03778f8cdf753ffd1b1e24db
Author:     Peter Levine <plevine457 <AT> gmail <DOT> com>
AuthorDate: Sat May 27 21:05:20 2017 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Fri Jun  2 06:56:49 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1b99de51

games-sports/torcs: Fix building with GCC-6

Bug: https://bugs.gentoo.org/show_bug.cgi?id=594670
Package-Manager: Portage-2.3.6, Repoman-2.3.2
Closes: https://github.com/gentoo/gentoo/pull/4780

 games-sports/torcs/files/torcs-1.3.6-gcc6.patch | 11 +++++++++++
 games-sports/torcs/torcs-1.3.6-r1.ebuild        |  3 ++-
 games-sports/torcs/torcs-1.3.6.ebuild           |  5 +++--
 3 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/games-sports/torcs/files/torcs-1.3.6-gcc6.patch 
b/games-sports/torcs/files/torcs-1.3.6-gcc6.patch
new file mode 100644
index 00000000000..6daf22a81b1
--- /dev/null
+++ b/games-sports/torcs/files/torcs-1.3.6-gcc6.patch
@@ -0,0 +1,11 @@
+--- a/src/drivers/olethros/geometry.cpp
++++ b/src/drivers/olethros/geometry.cpp
+@@ -27,6 +27,8 @@
+ #ifdef WIN32
+ #include <float.h>
+ #define isnan _isnan
++#elif __cplusplus >= 201103L
++using std::isnan;
+ #endif
+ 
+ 

diff --git a/games-sports/torcs/torcs-1.3.6-r1.ebuild 
b/games-sports/torcs/torcs-1.3.6-r1.ebuild
index da2ecb7763b..c92083f6cbc 100644
--- a/games-sports/torcs/torcs-1.3.6-r1.ebuild
+++ b/games-sports/torcs/torcs-1.3.6-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -33,6 +33,7 @@ PATCHES=(
        "${FILESDIR}"/${P}-flags.patch
        "${FILESDIR}"/${P}-format.patch
        "${FILESDIR}"/${P}-noXmuXt.patch
+       "${FILESDIR}"/${P}-gcc6.patch
 )
 
 src_prepare() {

diff --git a/games-sports/torcs/torcs-1.3.6.ebuild 
b/games-sports/torcs/torcs-1.3.6.ebuild
index e447c13937a..c3716983355 100644
--- a/games-sports/torcs/torcs-1.3.6.ebuild
+++ b/games-sports/torcs/torcs-1.3.6.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
@@ -33,7 +33,8 @@ src_prepare() {
                "${FILESDIR}"/${P}-as-needed.patch \
                "${FILESDIR}"/${P}-flags.patch \
                "${FILESDIR}"/${P}-format.patch \
-               "${FILESDIR}"/${P}-noXmuXt.patch
+               "${FILESDIR}"/${P}-noXmuXt.patch \
+               "${FILESDIR}"/${P}-gcc6.patch
        eautoreconf
        ecvs_clean
 }

Reply via email to