summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Levine <plevine457@gmail.com>2017-07-22 23:32:52 -0400
committerDavid Seifert <soap@gentoo.org>2017-07-30 11:09:38 +0200
commitb0d6d93eedcd429a3676066499c77d6c561501ea (patch)
treec5020b4713b16e46629d7d5e813bfd9744a35f0f /games-simulation/dangerdeep
parentgames-arcade/fishsupper: Fix building with GCC-6 (diff)
downloadgentoo-b0d6d93eedcd429a3676066499c77d6c561501ea.tar.gz
gentoo-b0d6d93eedcd429a3676066499c77d6c561501ea.tar.bz2
gentoo-b0d6d93eedcd429a3676066499c77d6c561501ea.zip
games-simulation/dangerdeep: Fix building with -Werror=terminate
Bug: https://bugs.gentoo.org/show_bug.cgi?id=610654 Package-Manager: Portage-2.3.6, Repoman-2.3.2 Closes: https://github.com/gentoo/gentoo/pull/5181
Diffstat (limited to 'games-simulation/dangerdeep')
-rw-r--r--games-simulation/dangerdeep/dangerdeep-0.3.0.ebuild5
-rw-r--r--games-simulation/dangerdeep/files/dangerdeep-0.3.0-gcc6.patch38
2 files changed, 41 insertions, 2 deletions
diff --git a/games-simulation/dangerdeep/dangerdeep-0.3.0.ebuild b/games-simulation/dangerdeep/dangerdeep-0.3.0.ebuild
index d6b4d755ed93..8534a6930714 100644
--- a/games-simulation/dangerdeep/dangerdeep-0.3.0.ebuild
+++ b/games-simulation/dangerdeep/dangerdeep-0.3.0.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
@@ -29,7 +29,8 @@ src_prepare() {
"${FILESDIR}"/${P}-build.patch \
"${FILESDIR}"/${P}-gcc43.patch \
"${FILESDIR}"/${P}-gcc47.patch \
- "${FILESDIR}"/${P}-gcc44.patch
+ "${FILESDIR}"/${P}-gcc44.patch \
+ "${FILESDIR}"/${P}-gcc6.patch
sed -i -e "/console_log.txt/ s:fopen.*:stderr;:" src/system.cpp || die
}
diff --git a/games-simulation/dangerdeep/files/dangerdeep-0.3.0-gcc6.patch b/games-simulation/dangerdeep/files/dangerdeep-0.3.0-gcc6.patch
new file mode 100644
index 000000000000..1634aa763e4c
--- /dev/null
+++ b/games-simulation/dangerdeep/files/dangerdeep-0.3.0-gcc6.patch
@@ -0,0 +1,38 @@
+Bug: https://bugs.gentoo.org/show_bug.cgi?id=610654
+Upstream Ticket: https://sourceforge.net/p/dangerdeep/patches/26/
+
+--- a/src/system.cpp
++++ b/src/system.cpp
+@@ -178,7 +178,7 @@
+ instance = this;
+ }
+
+-system::~system()
++system::~system() DTOR_NOEXCEPT
+ {
+ if (!instance) {
+ SDL_Quit();
+--- a/src/system.h
++++ b/src/system.h
+@@ -52,6 +52,12 @@
+ #define ASSERT(a,...)
+ #endif
+
++#if __cplusplus >= 201103L
++#define DTOR_NOEXCEPT noexcept(false)
++#else
++#define DTOR_NOEXCEPT
++#endif
++
+ class font;
+ class texture;
+
+@@ -61,7 +67,7 @@
+ public:
+ enum button_type { left_button=0x1, right_button=0x2, middle_button=0x4, wheel_up=0x8, wheel_down=0x10 };
+ system(double nearz_, double farz_, unsigned res_x=1024, unsigned res_y=768, bool fullscreen=true);
+- ~system();
++ ~system() DTOR_NOEXCEPT;
+ void set_video_mode(unsigned res_x_, unsigned res_y_, bool fullscreen);
+ void swap_buffers();
+