games-sports/torcs: Fix building with GCC-6
authorPeter Levine <plevine457@gmail.com>
Sat, 27 May 2017 21:05:20 +0000 (17:05 -0400)
committerDavid Seifert <soap@gentoo.org>
Fri, 2 Jun 2017 06:56:49 +0000 (08:56 +0200)
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 [new file with mode: 0644]
games-sports/torcs/torcs-1.3.6-r1.ebuild
games-sports/torcs/torcs-1.3.6.ebuild

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 (file)
index 0000000..6daf22a
--- /dev/null
@@ -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
+ 
+ 
index da2ecb7763bc3f3e98c107bcfcd38c9e0d03a071..c92083f6cbc03a22366c78ccda53453c5db477e3 100644 (file)
@@ -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() {
index e447c13937afca2e5cc13dbd618a39353664d5f5..c3716983355518a56e993c91473f9f5fa6d304ee 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
@@ -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
 }