1 |
commit: 5b992a86ad44740a6a3509c8a6fd10d7c33db97b |
2 |
Author: Peter Levine <plevine457 <AT> gmail <DOT> com> |
3 |
AuthorDate: Sat Jul 22 23:20:47 2017 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jul 30 09:09:21 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5b992a86 |
7 |
|
8 |
games-strategy/s25rttr: Fix building with GCC-6 |
9 |
|
10 |
Bug: https://bugs.gentoo.org/show_bug.cgi?id=610972 |
11 |
Package-Manager: Portage-2.3.6, Repoman-2.3.2 |
12 |
Closes: https://github.com/gentoo/gentoo/pull/5177 |
13 |
|
14 |
.../s25rttr/files/s25rttr-0.8.1-gcc6.patch | 84 ++++++++++++++++++++++ |
15 |
games-strategy/s25rttr/s25rttr-0.8.1-r2.ebuild | 5 +- |
16 |
2 files changed, 87 insertions(+), 2 deletions(-) |
17 |
|
18 |
diff --git a/games-strategy/s25rttr/files/s25rttr-0.8.1-gcc6.patch b/games-strategy/s25rttr/files/s25rttr-0.8.1-gcc6.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..957ecf4ddf5 |
21 |
--- /dev/null |
22 |
+++ b/games-strategy/s25rttr/files/s25rttr-0.8.1-gcc6.patch |
23 |
@@ -0,0 +1,84 @@ |
24 |
+Bug: https://bugs.gentoo.org/610972 |
25 |
+Commit: https://github.com/Return-To-The-Roots/mygettext/commit/3b902a46322b7e88e9d2cdf85ee0912c6565f9a2 |
26 |
+ |
27 |
+--- a/driver/audio/SDL/src/SDL.cpp |
28 |
++++ b/driver/audio/SDL/src/SDL.cpp |
29 |
+@@ -175,23 +175,23 @@ |
30 |
+ |
31 |
+ char file[512]; |
32 |
+ if(!tempname(file, 512)) |
33 |
+- return false; |
34 |
++ return NULL; |
35 |
+ |
36 |
+ strncat(file, ".wav", 512); |
37 |
+ |
38 |
+ FILE *dat = fopen(file, "wb"); |
39 |
+ if(!dat) |
40 |
+- return false; |
41 |
++ return NULL; |
42 |
+ |
43 |
+ if(fwrite(data, 1, size, dat) != size) |
44 |
+- return false; |
45 |
++ return NULL; |
46 |
+ |
47 |
+ fclose(dat); |
48 |
+ |
49 |
+ switch(data_type) |
50 |
+ { |
51 |
+ default: |
52 |
+- return false; |
53 |
++ return NULL; |
54 |
+ |
55 |
+ case AudioDriver::AD_WAVE: |
56 |
+ { |
57 |
+@@ -233,12 +233,12 @@ |
58 |
+ |
59 |
+ char file[512]; |
60 |
+ if(!tempname(file, 512)) |
61 |
+- return false; |
62 |
++ return NULL; |
63 |
+ |
64 |
+ switch(data_type) |
65 |
+ { |
66 |
+ default: |
67 |
+- return false; |
68 |
++ return NULL; |
69 |
+ |
70 |
+ case AudioDriver::AD_MIDI: |
71 |
+ { |
72 |
+@@ -266,10 +266,10 @@ |
73 |
+ |
74 |
+ FILE *dat = fopen(file, "wb"); |
75 |
+ if(!dat) |
76 |
+- return false; |
77 |
++ return NULL; |
78 |
+ |
79 |
+ if(fwrite(data, 1, size, dat) != size) |
80 |
+- return false; |
81 |
++ return NULL; |
82 |
+ |
83 |
+ fclose(dat); |
84 |
+ |
85 |
+--- a/src/VideoDriverWrapper.cpp |
86 |
++++ b/src/VideoDriverWrapper.cpp |
87 |
+@@ -481,7 +481,7 @@ |
88 |
+ if(videodriver == NULL) |
89 |
+ { |
90 |
+ fatal_error("Kein Videotreiber ausgewaehlt!\n"); |
91 |
+- return false; |
92 |
++ return NULL; |
93 |
+ } |
94 |
+ |
95 |
+ return videodriver->GetFunction(extension); |
96 |
+--- a/mygettext/src/mygettext.h |
97 |
++++ b/mygettext/src/mygettext.h |
98 |
+@@ -21,6 +21,9 @@ |
99 |
+ |
100 |
+ #pragma once |
101 |
+ |
102 |
++// necessarily here |
103 |
++#include <locale> |
104 |
++ |
105 |
+ const char *mysetlocale(int category, const char *locale); |
106 |
+ |
107 |
+ #undef gettext |
108 |
|
109 |
diff --git a/games-strategy/s25rttr/s25rttr-0.8.1-r2.ebuild b/games-strategy/s25rttr/s25rttr-0.8.1-r2.ebuild |
110 |
index 33047efc962..9ecfd153901 100644 |
111 |
--- a/games-strategy/s25rttr/s25rttr-0.8.1-r2.ebuild |
112 |
+++ b/games-strategy/s25rttr/s25rttr-0.8.1-r2.ebuild |
113 |
@@ -1,4 +1,4 @@ |
114 |
-# Copyright 1999-2016 Gentoo Foundation |
115 |
+# Copyright 1999-2017 Gentoo Foundation |
116 |
# Distributed under the terms of the GNU General Public License v2 |
117 |
|
118 |
EAPI=5 |
119 |
@@ -32,7 +32,8 @@ src_prepare() { |
120 |
"${FILESDIR}"/${P}-fpic.patch \ |
121 |
"${FILESDIR}"/${P}-format.patch \ |
122 |
"${FILESDIR}"/${P}-miniupnpc-api-14.patch \ |
123 |
- "${FILESDIR}"/${P}-cmake-3.patch |
124 |
+ "${FILESDIR}"/${P}-cmake-3.patch \ |
125 |
+ "${FILESDIR}"/${P}-gcc6.patch |
126 |
} |
127 |
|
128 |
src_configure() { |