1 |
commit: 0784c759cc90c8ef58529eb8c0532a59c196ed79 |
2 |
Author: Pacho Ramos <pacho <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Apr 9 11:03:45 2017 +0000 |
4 |
Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Apr 9 11:04:26 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0784c759 |
7 |
|
8 |
dev-games/crystalspace: Fix gcc6 support (#594468 by Peter Levine) |
9 |
|
10 |
Package-Manager: Portage-2.3.5, Repoman-2.3.2 |
11 |
|
12 |
dev-games/crystalspace/crystalspace-2.0-r1.ebuild | 40 ++-- |
13 |
.../files/crystalspace-2.0-gcc52.patch | 12 +- |
14 |
.../crystalspace/files/crystalspace-2.0-gcc6.patch | 238 +++++++++++++++++++++ |
15 |
3 files changed, 269 insertions(+), 21 deletions(-) |
16 |
|
17 |
diff --git a/dev-games/crystalspace/crystalspace-2.0-r1.ebuild b/dev-games/crystalspace/crystalspace-2.0-r1.ebuild |
18 |
index 175c0884894..aa286aa0752 100644 |
19 |
--- a/dev-games/crystalspace/crystalspace-2.0-r1.ebuild |
20 |
+++ b/dev-games/crystalspace/crystalspace-2.0-r1.ebuild |
21 |
@@ -1,9 +1,10 @@ |
22 |
-# Copyright 1999-2016 Gentoo Foundation |
23 |
+# Copyright 1999-2017 Gentoo Foundation |
24 |
# Distributed under the terms of the GNU General Public License v2 |
25 |
|
26 |
-EAPI=5 |
27 |
+EAPI=6 |
28 |
WX_GTK_VER="3.0" |
29 |
-inherit eutils flag-o-matic multilib java-pkg-opt-2 autotools wxwidgets versionator multiprocessing |
30 |
+ |
31 |
+inherit flag-o-matic java-pkg-opt-2 autotools wxwidgets versionator multiprocessing |
32 |
|
33 |
MY_P=${PN}-src-${PV} |
34 |
PATH_P=${PN}-$(get_version_component_range 1-2) |
35 |
@@ -17,7 +18,8 @@ SLOT="0" |
36 |
KEYWORDS="amd64 x86" |
37 |
IUSE="3ds alsa bullet cal3d cegui cg doc java jpeg mng ode png speex truetype vorbis wxwidgets" |
38 |
|
39 |
-COMMON_DEP="virtual/opengl |
40 |
+COMMON_DEP=" |
41 |
+ virtual/opengl |
42 |
media-libs/openal |
43 |
x11-libs/libXt |
44 |
x11-libs/libXxf86vm |
45 |
@@ -33,35 +35,43 @@ COMMON_DEP="virtual/opengl |
46 |
truetype? ( >=media-libs/freetype-2.1 ) |
47 |
alsa? ( media-libs/alsa-lib ) |
48 |
mng? ( media-libs/libmng ) |
49 |
- png? ( media-libs/libpng:0 ) |
50 |
+ png? ( media-libs/libpng:0= ) |
51 |
wxwidgets? ( x11-libs/wxGTK:${WX_GTK_VER}[X,opengl] ) |
52 |
cegui? ( >=dev-games/cegui-0.5.0 ) |
53 |
- 3ds? ( media-libs/lib3ds )" |
54 |
- |
55 |
+ 3ds? ( media-libs/lib3ds ) |
56 |
+" |
57 |
RDEPEND="${COMMON_DEP} |
58 |
- java? ( >=virtual/jre-1.5 )" |
59 |
- |
60 |
+ java? ( >=virtual/jre-1.5 ) |
61 |
+" |
62 |
DEPEND="${COMMON_DEP} |
63 |
java? ( >=virtual/jdk-1.5 |
64 |
dev-java/ant-core ) |
65 |
dev-util/ftjam |
66 |
<dev-lang/swig-3 |
67 |
- virtual/pkgconfig" |
68 |
+ virtual/pkgconfig |
69 |
+" |
70 |
+ |
71 |
+S="${WORKDIR}/${MY_P}" |
72 |
|
73 |
-S=${WORKDIR}/${MY_P} |
74 |
+PATCHES=( |
75 |
+ "${FILESDIR}"/${P}-gcc47.patch |
76 |
+ "${FILESDIR}"/${P}-gcc52.patch |
77 |
+ "${FILESDIR}"/${P}-wxgtk.patch |
78 |
+ "${FILESDIR}"/${P}-gcc6.patch |
79 |
+) |
80 |
|
81 |
src_prepare() { |
82 |
+ default |
83 |
+ |
84 |
# Installing doc conflict with dodoc on src_install |
85 |
# Removing conflicting target |
86 |
sed -i \ |
87 |
-e "/^InstallDoc/d" \ |
88 |
Jamfile.in \ |
89 |
docs/Jamfile || die |
90 |
- epatch \ |
91 |
- "${FILESDIR}"/${P}-gcc47.patch \ |
92 |
- "${FILESDIR}"/${P}-gcc52.patch \ |
93 |
- "${FILESDIR}"/${P}-wxgtk.patch |
94 |
+ |
95 |
use wxwidgets && append-libs -lGL |
96 |
+ |
97 |
AT_M4DIR=mk/autoconf \ |
98 |
eautoreconf |
99 |
} |
100 |
|
101 |
diff --git a/dev-games/crystalspace/files/crystalspace-2.0-gcc52.patch b/dev-games/crystalspace/files/crystalspace-2.0-gcc52.patch |
102 |
index 341b33d8885..96b6aa71234 100644 |
103 |
--- a/dev-games/crystalspace/files/crystalspace-2.0-gcc52.patch |
104 |
+++ b/dev-games/crystalspace/files/crystalspace-2.0-gcc52.patch |
105 |
@@ -1,5 +1,5 @@ |
106 |
---- include/csgfx/imagememory.h.old 2016-04-17 09:09:31.497152401 +0200 |
107 |
-+++ include/csgfx/imagememory.h 2016-04-17 09:12:13.838355158 +0200 |
108 |
+--- a/include/csgfx/imagememory.h.old 2016-04-17 09:09:31.497152401 +0200 |
109 |
++++ b/include/csgfx/imagememory.h 2016-04-17 09:12:13.838355158 +0200 |
110 |
@@ -179,8 +179,8 @@ |
111 |
/// Get a pointer to the alpha data that can be changed. |
112 |
uint8* GetAlphaPtr (); |
113 |
@@ -11,8 +11,8 @@ |
114 |
virtual int GetHeight () const { return Height; } |
115 |
virtual int GetDepth () const { return Depth; } |
116 |
|
117 |
---- libs/csgfx/imagememory.cpp.old 2016-04-17 09:07:19.555451540 +0200 |
118 |
-+++ libs/csgfx/imagememory.cpp 2016-04-17 09:13:09.339398463 +0200 |
119 |
+--- a/libs/csgfx/imagememory.cpp.old 2016-04-17 09:07:19.555451540 +0200 |
120 |
++++ b/libs/csgfx/imagememory.cpp 2016-04-17 09:13:09.339398463 +0200 |
121 |
@@ -208,6 +208,23 @@ |
122 |
EnsureImage(); |
123 |
return (void*)databuf->GetData (); |
124 |
@@ -37,8 +37,8 @@ |
125 |
csRGBpixel* csImageMemory::GetPalettePtr () |
126 |
{ |
127 |
EnsureImage(); |
128 |
---- include/csgfx/imagebase.h.old 2016-04-17 09:59:09.211101864 +0200 |
129 |
-+++ include/csgfx/imagebase.h 2016-04-17 09:59:20.041919599 +0200 |
130 |
+--- a/include/csgfx/imagebase.h.old 2016-04-17 09:59:09.211101864 +0200 |
131 |
++++ b/include/csgfx/imagebase.h 2016-04-17 09:59:20.041919599 +0200 |
132 |
@@ -61,10 +61,7 @@ |
133 |
// Most images are 2D, so provide a sensible default |
134 |
virtual int GetDepth () const { return 1; } |
135 |
|
136 |
diff --git a/dev-games/crystalspace/files/crystalspace-2.0-gcc6.patch b/dev-games/crystalspace/files/crystalspace-2.0-gcc6.patch |
137 |
new file mode 100644 |
138 |
index 00000000000..f0b099a3e3d |
139 |
--- /dev/null |
140 |
+++ b/dev-games/crystalspace/files/crystalspace-2.0-gcc6.patch |
141 |
@@ -0,0 +1,238 @@ |
142 |
+--- crystalspace-src-2.0/include/csutil/redblacktree.h.old 2016-09-20 22:06:36.732698058 -0400 |
143 |
++++ crystalspace-src-2.0/include/csutil/redblacktree.h 2016-09-20 22:09:08.437064011 -0400 |
144 |
+@@ -37,7 +37,7 @@ |
145 |
+ * @{ */ |
146 |
+ |
147 |
+ template <typename K, typename Allocator, |
148 |
+- template<typename K, typename K2> class Ordering> |
149 |
++ template<typename K1, typename K2> class Ordering> |
150 |
+ class csRedBlackTree; |
151 |
+ |
152 |
+ template <typename K, typename T> |
153 |
+@@ -237,7 +237,7 @@ |
154 |
+ template <typename K, |
155 |
+ typename Allocator = |
156 |
+ CS::Container::DefaultRedBlackTreeAllocator<K>, |
157 |
+- template<typename K, typename K2> class Ordering = |
158 |
++ template<typename K1, typename K2> class Ordering = |
159 |
+ CS::Container::RedBlackTreeOrderingTotal> |
160 |
+ class csRedBlackTree |
161 |
+ { |
162 |
+--- crystalspace-src-2.0/plugins/terraformer/pagingformer/pagingformer.cpp.old 2016-09-20 22:10:54.287917849 -0400 |
163 |
++++ crystalspace-src-2.0/plugins/terraformer/pagingformer/pagingformer.cpp 2016-09-20 22:12:31.684739007 -0400 |
164 |
+@@ -1159,7 +1159,7 @@ |
165 |
+ else |
166 |
+ { |
167 |
+ // Something we can't return was requested |
168 |
+- return false; |
169 |
++ return NULL; |
170 |
+ } |
171 |
+ } |
172 |
+ |
173 |
+--- crystalspace-src-2.0/plugins/documentsystem/xmlread/characters.cpp.old 2016-09-20 22:13:28.794863758 -0400 |
174 |
++++ crystalspace-src-2.0/plugins/documentsystem/xmlread/characters.cpp 2016-09-20 22:22:26.124668024 -0400 |
175 |
+@@ -46,20 +46,20 @@ |
176 |
+ // 0 1 2 3 4 5 6 7 8 9 A B C D E F |
177 |
+ CHAR_ROW(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0), // 00-0f |
178 |
+ CHAR_ROW(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0), // 10-1f |
179 |
+- CHAR_ROW(0,0,0,0,0,0,0,0,0,0,0,0,0,S,S,0), // 20-2f |
180 |
+- CHAR_ROW(S,S,S,S,S,S,S,S,S,S,F,0,0,0,0,0), // 30-3f |
181 |
+- CHAR_ROW(0,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F), // 40-4f |
182 |
+- CHAR_ROW(F,F,F,F,F,F,F,F,F,F,F,0,0,0,0,F), // 50-5f |
183 |
+- CHAR_ROW(0,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F), // 60-6f |
184 |
+- CHAR_ROW(F,F,F,F,F,F,F,F,F,F,F,0,0,0,0,0), // 70-7f |
185 |
++ CHAR_ROW(0,0,0,0,0,0,0,0,0,0,0,0,0,(uint32)S,(uint32)S,0), // 20-2f |
186 |
++ CHAR_ROW((uint32)S,(uint32)S,(uint32)S,(uint32)S,(uint32)S,(uint32)S,(uint32)S,(uint32)S,(uint32)S,(uint32)S,(uint32)F,0,0,0,0,0), // 30-3f |
187 |
++ CHAR_ROW(0,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F), // 40-4f |
188 |
++ CHAR_ROW((uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,0,0,0,0,(uint32)F), // 50-5f |
189 |
++ CHAR_ROW(0,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F), // 60-6f |
190 |
++ CHAR_ROW((uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,0,0,0,0,0), // 70-7f |
191 |
+ CHAR_ROW(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0), // 80-8f |
192 |
+ CHAR_ROW(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0), // 90-9f |
193 |
+ CHAR_ROW(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0), // a0-af |
194 |
+ CHAR_ROW(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0), // b0-bf |
195 |
+- CHAR_ROW(F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F), // c0-cf |
196 |
+- CHAR_ROW(F,F,F,F,F,F,F,0,F,F,F,F,F,F,F,F), // d0-df |
197 |
+- CHAR_ROW(F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F), // e0-ef |
198 |
+- CHAR_ROW(F,F,F,F,F,F,F,0,F,F,F,F,F,F,F,F), // f0-ff |
199 |
++ CHAR_ROW((uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F), // c0-cf |
200 |
++ CHAR_ROW((uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,0,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F), // d0-df |
201 |
++ CHAR_ROW((uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F), // e0-ef |
202 |
++ CHAR_ROW((uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,0,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F,(uint32)F), // f0-ff |
203 |
+ }; |
204 |
+ |
205 |
+ #undef CHAR_ROW |
206 |
+--- crystalspace-src-2.0/plugins/mesh/protomesh/object/protomesh.cpp.old 2016-09-20 22:13:51.298710883 -0400 |
207 |
++++ crystalspace-src-2.0/plugins/mesh/protomesh/object/protomesh.cpp 2016-09-20 22:24:27.087156627 -0400 |
208 |
+@@ -141,7 +141,7 @@ |
209 |
+ { |
210 |
+ n = 0; |
211 |
+ |
212 |
+- if (vis_cb) if (!vis_cb->BeforeDrawing (this, rview)) return false; |
213 |
++ if (vis_cb) if (!vis_cb->BeforeDrawing (this, rview)) return NULL; |
214 |
+ |
215 |
+ SetupObject (); |
216 |
+ |
217 |
+--- crystalspace-src-2.0/plugins/terraformer/simpleformer/simpleformer.cpp.old 2016-09-20 22:14:11.555573385 -0400 |
218 |
++++ crystalspace-src-2.0/plugins/terraformer/simpleformer/simpleformer.cpp 2016-09-20 22:25:57.007048574 -0400 |
219 |
+@@ -1012,7 +1012,7 @@ |
220 |
+ else |
221 |
+ { |
222 |
+ // Something we can't return was requested |
223 |
+- return false; |
224 |
++ return NULL; |
225 |
+ } |
226 |
+ } |
227 |
+ |
228 |
+--- crystalspace-src-2.0/plugins/mesh/skeleton/persist/standard/skelldr.cpp.old 2016-09-20 22:14:28.534458231 -0400 |
229 |
++++ crystalspace-src-2.0/plugins/mesh/skeleton/persist/standard/skelldr.cpp 2016-09-20 22:28:15.857616492 -0400 |
230 |
+@@ -157,7 +157,7 @@ |
231 |
+ { |
232 |
+ csVector3 v; |
233 |
+ if (!SyntaxService->ParseVector (vector_node, v)) |
234 |
+- return false; |
235 |
++ return NULL; |
236 |
+ bone->GetTransform ().SetOrigin (v); |
237 |
+ } |
238 |
+ |
239 |
+@@ -166,7 +166,7 @@ |
240 |
+ { |
241 |
+ csMatrix3 m; |
242 |
+ if (!SyntaxService->ParseMatrix (matrix_node, m)) |
243 |
+- return false; |
244 |
++ return NULL; |
245 |
+ bone->GetTransform ().SetO2T (m); |
246 |
+ } |
247 |
+ } |
248 |
+@@ -201,7 +201,7 @@ |
249 |
+ { |
250 |
+ csVector3 v; |
251 |
+ if (!SyntaxService->ParseVector (vector_node, v)) |
252 |
+- return false; |
253 |
++ return NULL; |
254 |
+ socket_transform.SetOrigin (v); |
255 |
+ } |
256 |
+ |
257 |
+@@ -210,7 +210,7 @@ |
258 |
+ { |
259 |
+ csMatrix3 m; |
260 |
+ if (!SyntaxService->ParseMatrix (matrix_node, m)) |
261 |
+- return false; |
262 |
++ return NULL; |
263 |
+ socket_transform.SetO2T (m); |
264 |
+ } |
265 |
+ socket->SetTransform(socket_transform); |
266 |
+@@ -550,7 +550,7 @@ |
267 |
+ { |
268 |
+ csVector3 v; |
269 |
+ if (!SyntaxService->ParseVector (vector_node, v)) |
270 |
+- return false; |
271 |
++ return NULL; |
272 |
+ key_transform.SetOrigin (v); |
273 |
+ } |
274 |
+ |
275 |
+@@ -559,7 +559,7 @@ |
276 |
+ { |
277 |
+ csMatrix3 m; |
278 |
+ if (!SyntaxService->ParseMatrix (matrix_node, m)) |
279 |
+- return false; |
280 |
++ return NULL; |
281 |
+ key_transform.SetO2T (m); |
282 |
+ } |
283 |
+ } |
284 |
+--- crystalspace-src-2.0/plugins/mesh/animesh/persist/skeleton2/skeleton2ldr.cpp.old 2016-09-20 22:14:53.609288299 -0400 |
285 |
++++ crystalspace-src-2.0/plugins/mesh/animesh/persist/skeleton2/skeleton2ldr.cpp 2016-09-20 22:29:41.797284147 -0400 |
286 |
+@@ -516,7 +516,7 @@ |
287 |
+ if (!name) |
288 |
+ { |
289 |
+ synldr->ReportError (msgid, node, "No name set for animation"); |
290 |
+- return false; |
291 |
++ return NULL; |
292 |
+ } |
293 |
+ |
294 |
+ CS::Animation::iSkeletonAnimation* fact = packet->CreateAnimation (name); |
295 |
+@@ -524,7 +524,7 @@ |
296 |
+ { |
297 |
+ synldr->ReportError (msgid, node, |
298 |
+ "Could not create animation, another animation with same name already exist"); |
299 |
+- return false; |
300 |
++ return NULL; |
301 |
+ } |
302 |
+ |
303 |
+ if (node->GetAttributeValueAsBool ("bindspace", false)) |
304 |
+--- crystalspace-src-2.0/plugins/mesh/watermesh/object/watermesh.cpp.old 2016-09-20 22:15:10.911171145 -0400 |
305 |
++++ crystalspace-src-2.0/plugins/mesh/watermesh/object/watermesh.cpp 2016-09-20 22:30:58.603396904 -0400 |
306 |
+@@ -363,7 +363,7 @@ |
307 |
+ { |
308 |
+ n = 0; |
309 |
+ |
310 |
+- if (vis_cb) if (!vis_cb->BeforeDrawing (this, rview)) return false; |
311 |
++ if (vis_cb) if (!vis_cb->BeforeDrawing (this, rview)) return NULL; |
312 |
+ |
313 |
+ iCamera* camera = rview->GetCamera (); |
314 |
+ |
315 |
+--- crystalspace-src-2.0/plugins/csparser/csparser.cpp.old 2016-09-20 22:15:32.086027857 -0400 |
316 |
++++ crystalspace-src-2.0/plugins/csparser/csparser.cpp 2016-09-20 22:36:18.576856714 -0400 |
317 |
+@@ -571,7 +571,7 @@ |
318 |
+ break; |
319 |
+ case XMLTOKEN_KEY: |
320 |
+ if (!ParseKey (child, &Keys)) |
321 |
+- return false; |
322 |
++ return NULL; |
323 |
+ break; |
324 |
+ case XMLTOKEN_HALO: |
325 |
+ { |
326 |
+@@ -779,7 +779,7 @@ |
327 |
+ { |
328 |
+ csMatrix3 m; |
329 |
+ if (!SyntaxService->ParseMatrix (matrix_node, m)) |
330 |
+- return false; |
331 |
++ return NULL; |
332 |
+ light_transf.SetO2T (m); |
333 |
+ } |
334 |
+ csRef<iDocumentNode> vector_node = child->GetNode ("v"); |
335 |
+@@ -787,7 +787,7 @@ |
336 |
+ { |
337 |
+ csVector3 v; |
338 |
+ if (!SyntaxService->ParseVector (vector_node, v)) |
339 |
+- return false; |
340 |
++ return NULL; |
341 |
+ use_light_transf_vector = true; |
342 |
+ light_transf.SetO2TTranslation (v); |
343 |
+ } |
344 |
+@@ -830,7 +830,7 @@ |
345 |
+ { |
346 |
+ bool flag; |
347 |
+ if (!SyntaxService->ParseBool (child, flag, true)) |
348 |
+- return false; |
349 |
++ return NULL; |
350 |
+ lightFlags.SetBool (CS_LIGHT_NOSHADOWS, flag); |
351 |
+ } |
352 |
+ break; |
353 |
+@@ -1193,7 +1193,7 @@ |
354 |
+ { |
355 |
+ csColor c; |
356 |
+ if (!SyntaxService->ParseColor (child, c)) |
357 |
+- return false; |
358 |
++ return NULL; |
359 |
+ sector->SetDynamicAmbientLight (c); |
360 |
+ } |
361 |
+ break; |
362 |
+@@ -1387,7 +1387,7 @@ |
363 |
+ iRenderLoop* loop = ParseRenderLoop (child, set); |
364 |
+ if (!loop) |
365 |
+ { |
366 |
+- return false; |
367 |
++ return NULL; |
368 |
+ } |
369 |
+ if (set) |
370 |
+ { |
371 |
+@@ -1569,7 +1569,7 @@ |
372 |
+ return 0; |
373 |
+ case XMLTOKEN_KEY: |
374 |
+ if (!ParseKey (child, pNode->QueryObject())) |
375 |
+- return false; |
376 |
++ return NULL; |
377 |
+ break; |
378 |
+ case XMLTOKEN_POSITION: |
379 |
+ if (!SyntaxService->ParseVector (child, pos)) |