games-action/btanks: Fix building with -Werror=terminate in GCC-6
authorPeter Levine <plevine457@gmail.com>
Mon, 24 Jul 2017 04:26:42 +0000 (00:26 -0400)
committerDavid Seifert <soap@gentoo.org>
Sun, 30 Jul 2017 09:09:50 +0000 (11:09 +0200)
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
games-action/btanks/files/btanks-0.9.8083-gcc6.patch [new file with mode: 0644]

index c080022faa951218f182fa36187a5d3ad839be95..9da95ffb8f3057b614fa532fe93f261d9f69ea74 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
@@ -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 (file)
index 0000000..5f11379
--- /dev/null
@@ -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&);