diff options
author | Peter-Levine <plevine457@gmail.com> | 2017-03-21 18:08:42 -0400 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2017-03-25 13:47:59 +0100 |
commit | b6dce8e5520aeb34b66435133d9e5488bae1492f (patch) | |
tree | 0554d698f3a8dfd7f37166a5509e5fc75ae206af /games-board | |
parent | games-action/chromium-bsu: Fix GCC-6 build (diff) | |
download | gentoo-b6dce8e5520aeb34b66435133d9e5488bae1492f.tar.gz gentoo-b6dce8e5520aeb34b66435133d9e5488bae1492f.tar.bz2 gentoo-b6dce8e5520aeb34b66435133d9e5488bae1492f.zip |
games-board/pouetchess: Fix building with GCC-6
Bug: https://bugs.gentoo.org/show_bug.cgi?id=613428
Package-Manager: Portage-2.3.5, Repoman-2.3.2
Closes: https://github.com/gentoo/gentoo/pull/4278
Diffstat (limited to 'games-board')
-rw-r--r-- | games-board/pouetchess/files/pouetchess-0.2.0-gcc6-cmath.patch | 16 | ||||
-rw-r--r-- | games-board/pouetchess/pouetchess-0.2.0-r1.ebuild | 5 |
2 files changed, 19 insertions, 2 deletions
diff --git a/games-board/pouetchess/files/pouetchess-0.2.0-gcc6-cmath.patch b/games-board/pouetchess/files/pouetchess-0.2.0-gcc6-cmath.patch new file mode 100644 index 000000000000..4853eee81e1d --- /dev/null +++ b/games-board/pouetchess/files/pouetchess-0.2.0-gcc6-cmath.patch @@ -0,0 +1,16 @@ +--- pouetchess_src_0.2.0/src/sxmlgui/MathUtils.h.old 2006-05-26 21:22:57.000000000 -0400 ++++ pouetchess_src_0.2.0/src/sxmlgui/MathUtils.h 2017-03-21 18:01:15.569181229 -0400 +@@ -27,10 +27,13 @@ + return (x < min) ? min : (x > max) ? max : x;
+ }
+
++// Not used anywhere and conflicts with C++11 std::round(float)
++#if __cplusplus < 201103L
+ inline int round(float f)
+ {
+ return int(f + 0.5f);
+ }
++#endif
+
+ inline float getNextRandom(){
+ return (float)rand()/(RAND_MAX + 1);
diff --git a/games-board/pouetchess/pouetchess-0.2.0-r1.ebuild b/games-board/pouetchess/pouetchess-0.2.0-r1.ebuild index fd5a950149b0..5858f138eaf9 100644 --- a/games-board/pouetchess/pouetchess-0.2.0-r1.ebuild +++ b/games-board/pouetchess/pouetchess-0.2.0-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2014 Gentoo Foundation +# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI=5 @@ -27,7 +27,8 @@ src_prepare() { "${FILESDIR}/${P}-sconstruct-sandbox.patch" \ "${FILESDIR}/${P}-nvidia_glext.patch" \ "${FILESDIR}/${P}-segfaults.patch" \ - "${FILESDIR}/${P}-gcc43.patch" + "${FILESDIR}/${P}-gcc43.patch" \ + "${FILESDIR}/${P}-gcc6-cmath.patch" # Fix for LibSDL >= 1.2.10 detection sed -i \ -e "s:sdlver.split('.') >= \['1','2','8'\]:sdlver.split('.') >= [1,2,8]:" \ |