games-puzzle/cuyo: Fix building with GCC-6 (bug #614366)
authorPeter-Levine <plevine457@gmail.com>
Fri, 7 Apr 2017 22:13:13 +0000 (18:13 -0400)
committerDavid Seifert <soap@gentoo.org>
Sun, 16 Apr 2017 18:57:44 +0000 (20:57 +0200)
Package-Manager: Portage-2.3.5, Repoman-2.3.2
Closes: https://github.com/gentoo/gentoo/pull/4385

games-puzzle/cuyo/cuyo-2.1.1.ebuild
games-puzzle/cuyo/files/cuyo-2.1.1-gcc6.patch [new file with mode: 0644]

index c4fa72e8962e91ae969c8aca7c68abbff4dc09fd..76714e98faa7c2e62da2fe07c33213d9d4f73d0f 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
@@ -26,7 +26,8 @@ S=${WORKDIR}/${MY_P}
 src_prepare() {
        epatch \
                "${FILESDIR}"/${P}-gcc44.patch \
-               "${FILESDIR}"/${P}-gentoo.patch
+               "${FILESDIR}"/${P}-gentoo.patch \
+               "${FILESDIR}"/${P}-gcc6.patch
        eautoreconf
 }
 
diff --git a/games-puzzle/cuyo/files/cuyo-2.1.1-gcc6.patch b/games-puzzle/cuyo/files/cuyo-2.1.1-gcc6.patch
new file mode 100644 (file)
index 0000000..b1ba5b5
--- /dev/null
@@ -0,0 +1,45 @@
+--- a/src/pfaditerator.h
++++ b/src/pfaditerator.h
+@@ -21,6 +21,11 @@
+ #include "stringzeug.h"
+ 
+ 
++#if __cplusplus >= 201103L
++#define NOEXCEPT noexcept(false)
++#else
++#define NOEXCEPT
++#endif
+ 
+ 
+ /** Iteriert durch alle Pfade, an denen sich eine
+@@ -43,7 +48,7 @@
+ class PfadIterator {
+ public: 
+   PfadIterator(Str dat, bool auch_gz = false, bool setzDefault = false);
+-  ~PfadIterator();
++  ~PfadIterator() NOEXCEPT;
+   
+   /** N�chster Pfad */
+   PfadIterator & operator++();
+--- a/src/pfaditerator.cpp
++++ b/src/pfaditerator.cpp
+@@ -48,7 +48,7 @@
+      -1 und f�hren dann gleich ein ++ aus. */
+   ++(*this);
+ }
+-PfadIterator::~PfadIterator() {
++PfadIterator::~PfadIterator() NOEXCEPT {
+   /** Soll der default-Pfad gesetzt werden? */
+   if (mSetzDefault) {
+ 
+--- a/src/xpmladen.cpp
++++ b/src/xpmladen.cpp
+@@ -314,7 +314,7 @@
+   try {
+ 
+     /* Datei laden. Dabei werden gDatAnfang und gDatEnde gesetzt. */
+-    if (!ladeDatei(na)) return false;
++    if (!ladeDatei(na)) return NULL;
+ 
+ 
+     gDatBei = gDatAnfang;