From 66c00df044aa06d9076020159ebb9811a05258c7 Mon Sep 17 00:00:00 2001 From: B. Watson Date: Tue, 4 Jul 2017 13:54:35 -0400 Subject: games/torcs: Fix build on -current. Signed-off-by: B. Watson --- games/torcs/gcc7.diff | 12 ++++++++++++ games/torcs/torcs.SlackBuild | 4 ++++ 2 files changed, 16 insertions(+) create mode 100644 games/torcs/gcc7.diff (limited to 'games/torcs') diff --git a/games/torcs/gcc7.diff b/games/torcs/gcc7.diff new file mode 100644 index 0000000000..705e9abb1c --- /dev/null +++ b/games/torcs/gcc7.diff @@ -0,0 +1,12 @@ +diff -Naur torcs-1.3.7/src/drivers/olethros/geometry.cpp torcs-1.3.7.patched/src/drivers/olethros/geometry.cpp +--- torcs-1.3.7/src/drivers/olethros/geometry.cpp 2006-01-06 10:22:29.000000000 -0500 ++++ torcs-1.3.7.patched/src/drivers/olethros/geometry.cpp 2017-07-04 17:00:06.727000000 -0400 +@@ -27,6 +27,8 @@ + #ifdef WIN32 + #include + #define isnan _isnan ++#else ++#define isnan std::isnan + #endif + + diff --git a/games/torcs/torcs.SlackBuild b/games/torcs/torcs.SlackBuild index 07b419adb1..76ee0f1fae 100644 --- a/games/torcs/torcs.SlackBuild +++ b/games/torcs/torcs.SlackBuild @@ -6,6 +6,8 @@ # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. +# 20170704 bkw: fix build on -current + PRGNAM=torcs VERSION=${VERSION:-1.3.7} BUILD=${BUILD:-1} @@ -53,6 +55,8 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +patch -p1 < $CWD/gcc7.diff + CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ -- cgit v1.2.3