1 |
commit: 7cfe950605746b9a832efda51bc1562e0ddaf338 |
2 |
Author: Peter-Levine <plevine457 <AT> gmail <DOT> com> |
3 |
AuthorDate: Sat May 6 18:01:45 2017 +0000 |
4 |
Commit: David Seifert <soap <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun May 7 07:55:11 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7cfe9506 |
7 |
|
8 |
games-emulation/desmume: Fix building with GCC-6 |
9 |
|
10 |
Bug: https://bugs.gentoo.org/show_bug.cgi?id=612940 |
11 |
Package-Manager: Portage-2.3.5, Repoman-2.3.2 |
12 |
Closes: https://github.com/gentoo/gentoo/pull/4558 |
13 |
|
14 |
games-emulation/desmume/desmume-0.9.11-r1.ebuild | 7 +++- |
15 |
.../desmume/files/desmume-0.9.11-gcc6.patch | 47 ++++++++++++++++++++++ |
16 |
2 files changed, 52 insertions(+), 2 deletions(-) |
17 |
|
18 |
diff --git a/games-emulation/desmume/desmume-0.9.11-r1.ebuild b/games-emulation/desmume/desmume-0.9.11-r1.ebuild |
19 |
index d6041d39345..ec05ed16af7 100644 |
20 |
--- a/games-emulation/desmume/desmume-0.9.11-r1.ebuild |
21 |
+++ b/games-emulation/desmume/desmume-0.9.11-r1.ebuild |
22 |
@@ -1,4 +1,4 @@ |
23 |
-# Copyright 1999-2016 Gentoo Foundation |
24 |
+# Copyright 1999-2017 Gentoo Foundation |
25 |
# Distributed under the terms of the GNU General Public License v2 |
26 |
|
27 |
EAPI=6 |
28 |
@@ -28,4 +28,7 @@ DOCS=( AUTHORS ChangeLog README README.LIN ) |
29 |
|
30 |
# fix QA compiler warning, see |
31 |
# https://sourceforge.net/p/desmume/patches/172/ |
32 |
-PATCHES=( "${FILESDIR}/${P}-fix-pointer-conversion-warning.diff" ) |
33 |
+PATCHES=( |
34 |
+ "${FILESDIR}/${P}-fix-pointer-conversion-warning.diff" |
35 |
+ "${FILESDIR}/${P}-gcc6.patch" |
36 |
+) |
37 |
|
38 |
diff --git a/games-emulation/desmume/files/desmume-0.9.11-gcc6.patch b/games-emulation/desmume/files/desmume-0.9.11-gcc6.patch |
39 |
new file mode 100644 |
40 |
index 00000000000..761ccef045c |
41 |
--- /dev/null |
42 |
+++ b/games-emulation/desmume/files/desmume-0.9.11-gcc6.patch |
43 |
@@ -0,0 +1,47 @@ |
44 |
+--- a/src/wifi.cpp |
45 |
++++ b/src/wifi.cpp |
46 |
+@@ -314,9 +314,9 @@ |
47 |
+ |
48 |
+ #if (WIFI_LOGGING_LEVEL >= 1) |
49 |
+ #if WIFI_LOG_USE_LOGC |
50 |
+- #define WIFI_LOG(level, ...) if(level <= WIFI_LOGGING_LEVEL) LOGC(8, "WIFI: "__VA_ARGS__); |
51 |
++ #define WIFI_LOG(level, ...) if(level <= WIFI_LOGGING_LEVEL) LOGC(8, "WIFI: " __VA_ARGS__); |
52 |
+ #else |
53 |
+- #define WIFI_LOG(level, ...) if(level <= WIFI_LOGGING_LEVEL) printf("WIFI: "__VA_ARGS__); |
54 |
++ #define WIFI_LOG(level, ...) if(level <= WIFI_LOGGING_LEVEL) printf("WIFI: " __VA_ARGS__); |
55 |
+ #endif |
56 |
+ #else |
57 |
+ #define WIFI_LOG(level, ...) {} |
58 |
+--- a/src/MMU_timing.h |
59 |
++++ b/src/MMU_timing.h |
60 |
+@@ -155,8 +155,8 @@ |
61 |
+ enum { ASSOCIATIVITY = 1 << ASSOCIATIVESHIFT }; |
62 |
+ enum { BLOCKSIZE = 1 << BLOCKSIZESHIFT }; |
63 |
+ enum { TAGSHIFT = SIZESHIFT - ASSOCIATIVESHIFT }; |
64 |
+- enum { TAGMASK = (u32)(~0 << TAGSHIFT) }; |
65 |
+- enum { BLOCKMASK = ((u32)~0 >> (32 - TAGSHIFT)) & (u32)(~0 << BLOCKSIZESHIFT) }; |
66 |
++ enum { TAGMASK = (u32)(~0U << TAGSHIFT) }; |
67 |
++ enum { BLOCKMASK = ((u32)~0U >> (32 - TAGSHIFT)) & (u32)(~0U << BLOCKSIZESHIFT) }; |
68 |
+ enum { WORDSIZE = sizeof(u32) }; |
69 |
+ enum { WORDSPERBLOCK = (1 << BLOCKSIZESHIFT) / WORDSIZE }; |
70 |
+ enum { DATAPERWORD = WORDSIZE * ASSOCIATIVITY }; |
71 |
+--- a/src/ctrlssdl.cpp |
72 |
++++ b/src/ctrlssdl.cpp |
73 |
+@@ -200,7 +200,7 @@ |
74 |
+ break; |
75 |
+ case SDL_JOYAXISMOTION: |
76 |
+ /* Dead zone of 50% */ |
77 |
+- if( (abs(event.jaxis.value) >> 14) != 0 ) |
78 |
++ if( ((u32)abs(event.jaxis.value) >> 14) != 0 ) |
79 |
+ { |
80 |
+ key = ((event.jaxis.which & 15) << 12) | JOY_AXIS << 8 | ((event.jaxis.axis & 127) << 1); |
81 |
+ if (event.jaxis.value > 0) { |
82 |
+@@ -370,7 +370,7 @@ |
83 |
+ Note: button constants have a 1bit offset. */ |
84 |
+ case SDL_JOYAXISMOTION: |
85 |
+ key_code = ((event->jaxis.which & 15) << 12) | JOY_AXIS << 8 | ((event->jaxis.axis & 127) << 1); |
86 |
+- if( (abs(event->jaxis.value) >> 14) != 0 ) |
87 |
++ if( ((u32)abs(event->jaxis.value) >> 14) != 0 ) |
88 |
+ { |
89 |
+ if (event->jaxis.value > 0) |
90 |
+ key_code |= 1; |