commit:     ddc1a4cfd09f5429575c3eba483995b22907d9ef
Author:     Peter Levine <plevine457 <AT> gmail <DOT> com>
AuthorDate: Mon Jul 24 04:26:42 2017 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sun Jul 30 09:09:50 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ddc1a4cf

games-action/btanks: Fix building with -Werror=terminate in GCC-6

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

 games-action/btanks/btanks-0.9.8083.ebuild         |  5 ++--
 .../btanks/files/btanks-0.9.8083-gcc6.patch        | 34 ++++++++++++++++++++++
 2 files changed, 37 insertions(+), 2 deletions(-)

diff --git a/games-action/btanks/btanks-0.9.8083.ebuild 
b/games-action/btanks/btanks-0.9.8083.ebuild
index c080022faa9..9da95ffb8f3 100644
--- a/games-action/btanks/btanks-0.9.8083.ebuild
+++ b/games-action/btanks/btanks-0.9.8083.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
@@ -28,7 +28,8 @@ src_prepare() {
        rm -rf sdlx/gfx
        epatch "${FILESDIR}"/${P}-scons-blows.patch \
                "${FILESDIR}"/${P}-gcc46.patch \
-               "${FILESDIR}"/${P}-gcc47.patch
+               "${FILESDIR}"/${P}-gcc47.patch \
+               "${FILESDIR}"/${P}-gcc6.patch
 }
 
 src_compile() {

diff --git a/games-action/btanks/files/btanks-0.9.8083-gcc6.patch 
b/games-action/btanks/files/btanks-0.9.8083-gcc6.patch
new file mode 100644
index 00000000000..5f11379d805
--- /dev/null
+++ b/games-action/btanks/files/btanks-0.9.8083-gcc6.patch
@@ -0,0 +1,34 @@
+Bug: https://bugs.gentoo.org/609692
+
+--- a/mrt/timespy.cpp
++++ b/mrt/timespy.cpp
+@@ -43,7 +43,7 @@
+               throw_io(("gettimeofday"));
+ }
+ 
+-TimeSpy::~TimeSpy() {
++TimeSpy::~TimeSpy() DTOR_NOEXCEPT {
+       struct timeval now;
+       if (gettimeofday(&now, NULL) == -1)
+               throw_io(("gettimeofday"));
+--- a/mrt/timespy.h
++++ b/mrt/timespy.h
+@@ -37,11 +37,17 @@
+ #include "fmt.h"
+ #include "export_mrt.h"
+ 
++#if __cplusplus >= 201103L
++#define DTOR_NOEXCEPT noexcept(false)
++#else
++#define DTOR_NOEXCEPT
++#endif
++
+ namespace mrt {
+ class MRTAPI TimeSpy {
+ public: 
+       TimeSpy(const std::string &message);
+-      ~TimeSpy();
++      ~TimeSpy() DTOR_NOEXCEPT;
+ private: 
+       TimeSpy(const TimeSpy&);
+       const TimeSpy& operator=(const TimeSpy&);

Reply via email to