summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Levine <plevine457@gmail.com>2017-07-22 19:20:47 -0400
committerDavid Seifert <soap@gentoo.org>2017-07-30 11:09:21 +0200
commit5b992a86ad44740a6a3509c8a6fd10d7c33db97b (patch)
tree0da6e056e3052b6e890d20a699123e5169f78d05 /games-strategy/s25rttr
parentgames-arcade/tecnoballz: Fix building with GCC-6 (diff)
downloadgentoo-5b992a86ad44740a6a3509c8a6fd10d7c33db97b.tar.gz
gentoo-5b992a86ad44740a6a3509c8a6fd10d7c33db97b.tar.bz2
gentoo-5b992a86ad44740a6a3509c8a6fd10d7c33db97b.zip
games-strategy/s25rttr: Fix building with GCC-6
Bug: https://bugs.gentoo.org/show_bug.cgi?id=610972 Package-Manager: Portage-2.3.6, Repoman-2.3.2 Closes: https://github.com/gentoo/gentoo/pull/5177
Diffstat (limited to 'games-strategy/s25rttr')
-rw-r--r--games-strategy/s25rttr/files/s25rttr-0.8.1-gcc6.patch84
-rw-r--r--games-strategy/s25rttr/s25rttr-0.8.1-r2.ebuild5
2 files changed, 87 insertions, 2 deletions
diff --git a/games-strategy/s25rttr/files/s25rttr-0.8.1-gcc6.patch b/games-strategy/s25rttr/files/s25rttr-0.8.1-gcc6.patch
new file mode 100644
index 000000000000..957ecf4ddf50
--- /dev/null
+++ b/games-strategy/s25rttr/files/s25rttr-0.8.1-gcc6.patch
@@ -0,0 +1,84 @@
+Bug: https://bugs.gentoo.org/610972
+Commit: https://github.com/Return-To-The-Roots/mygettext/commit/3b902a46322b7e88e9d2cdf85ee0912c6565f9a2
+
+--- a/driver/audio/SDL/src/SDL.cpp
++++ b/driver/audio/SDL/src/SDL.cpp
+@@ -175,23 +175,23 @@
+
+ char file[512];
+ if(!tempname(file, 512))
+- return false;
++ return NULL;
+
+ strncat(file, ".wav", 512);
+
+ FILE *dat = fopen(file, "wb");
+ if(!dat)
+- return false;
++ return NULL;
+
+ if(fwrite(data, 1, size, dat) != size)
+- return false;
++ return NULL;
+
+ fclose(dat);
+
+ switch(data_type)
+ {
+ default:
+- return false;
++ return NULL;
+
+ case AudioDriver::AD_WAVE:
+ {
+@@ -233,12 +233,12 @@
+
+ char file[512];
+ if(!tempname(file, 512))
+- return false;
++ return NULL;
+
+ switch(data_type)
+ {
+ default:
+- return false;
++ return NULL;
+
+ case AudioDriver::AD_MIDI:
+ {
+@@ -266,10 +266,10 @@
+
+ FILE *dat = fopen(file, "wb");
+ if(!dat)
+- return false;
++ return NULL;
+
+ if(fwrite(data, 1, size, dat) != size)
+- return false;
++ return NULL;
+
+ fclose(dat);
+
+--- a/src/VideoDriverWrapper.cpp
++++ b/src/VideoDriverWrapper.cpp
+@@ -481,7 +481,7 @@
+ if(videodriver == NULL)
+ {
+ fatal_error("Kein Videotreiber ausgewaehlt!\n");
+- return false;
++ return NULL;
+ }
+
+ return videodriver->GetFunction(extension);
+--- a/mygettext/src/mygettext.h
++++ b/mygettext/src/mygettext.h
+@@ -21,6 +21,9 @@
+
+ #pragma once
+
++// necessarily here
++#include <locale>
++
+ const char *mysetlocale(int category, const char *locale);
+
+ #undef gettext
diff --git a/games-strategy/s25rttr/s25rttr-0.8.1-r2.ebuild b/games-strategy/s25rttr/s25rttr-0.8.1-r2.ebuild
index 33047efc9622..9ecfd153901b 100644
--- a/games-strategy/s25rttr/s25rttr-0.8.1-r2.ebuild
+++ b/games-strategy/s25rttr/s25rttr-0.8.1-r2.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
@@ -32,7 +32,8 @@ src_prepare() {
"${FILESDIR}"/${P}-fpic.patch \
"${FILESDIR}"/${P}-format.patch \
"${FILESDIR}"/${P}-miniupnpc-api-14.patch \
- "${FILESDIR}"/${P}-cmake-3.patch
+ "${FILESDIR}"/${P}-cmake-3.patch \
+ "${FILESDIR}"/${P}-gcc6.patch
}
src_configure() {