summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter-Levine <plevine457@gmail.com>2017-05-06 14:01:45 -0400
committerDavid Seifert <soap@gentoo.org>2017-05-07 09:55:11 +0200
commit7cfe950605746b9a832efda51bc1562e0ddaf338 (patch)
tree77225f9590a80e1d9b6f92e3e18a0cd969a19b97 /games-emulation
parentdev-libs/STLport: Remove from tree (diff)
downloadgentoo-7cfe950605746b9a832efda51bc1562e0ddaf338.tar.gz
gentoo-7cfe950605746b9a832efda51bc1562e0ddaf338.tar.bz2
gentoo-7cfe950605746b9a832efda51bc1562e0ddaf338.zip
games-emulation/desmume: Fix building with GCC-6
Bug: https://bugs.gentoo.org/show_bug.cgi?id=612940 Package-Manager: Portage-2.3.5, Repoman-2.3.2 Closes: https://github.com/gentoo/gentoo/pull/4558
Diffstat (limited to 'games-emulation')
-rw-r--r--games-emulation/desmume/desmume-0.9.11-r1.ebuild7
-rw-r--r--games-emulation/desmume/files/desmume-0.9.11-gcc6.patch47
2 files changed, 52 insertions, 2 deletions
diff --git a/games-emulation/desmume/desmume-0.9.11-r1.ebuild b/games-emulation/desmume/desmume-0.9.11-r1.ebuild
index d6041d39345..ec05ed16af7 100644
--- a/games-emulation/desmume/desmume-0.9.11-r1.ebuild
+++ b/games-emulation/desmume/desmume-0.9.11-r1.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=6
@@ -28,4 +28,7 @@ DOCS=( AUTHORS ChangeLog README README.LIN )
# fix QA compiler warning, see
# https://sourceforge.net/p/desmume/patches/172/
-PATCHES=( "${FILESDIR}/${P}-fix-pointer-conversion-warning.diff" )
+PATCHES=(
+ "${FILESDIR}/${P}-fix-pointer-conversion-warning.diff"
+ "${FILESDIR}/${P}-gcc6.patch"
+)
diff --git a/games-emulation/desmume/files/desmume-0.9.11-gcc6.patch b/games-emulation/desmume/files/desmume-0.9.11-gcc6.patch
new file mode 100644
index 00000000000..761ccef045c
--- /dev/null
+++ b/games-emulation/desmume/files/desmume-0.9.11-gcc6.patch
@@ -0,0 +1,47 @@
+--- a/src/wifi.cpp
++++ b/src/wifi.cpp
+@@ -314,9 +314,9 @@
+
+ #if (WIFI_LOGGING_LEVEL >= 1)
+ #if WIFI_LOG_USE_LOGC
+- #define WIFI_LOG(level, ...) if(level <= WIFI_LOGGING_LEVEL) LOGC(8, "WIFI: "__VA_ARGS__);
++ #define WIFI_LOG(level, ...) if(level <= WIFI_LOGGING_LEVEL) LOGC(8, "WIFI: " __VA_ARGS__);
+ #else
+- #define WIFI_LOG(level, ...) if(level <= WIFI_LOGGING_LEVEL) printf("WIFI: "__VA_ARGS__);
++ #define WIFI_LOG(level, ...) if(level <= WIFI_LOGGING_LEVEL) printf("WIFI: " __VA_ARGS__);
+ #endif
+ #else
+ #define WIFI_LOG(level, ...) {}
+--- a/src/MMU_timing.h
++++ b/src/MMU_timing.h
+@@ -155,8 +155,8 @@
+ enum { ASSOCIATIVITY = 1 << ASSOCIATIVESHIFT };
+ enum { BLOCKSIZE = 1 << BLOCKSIZESHIFT };
+ enum { TAGSHIFT = SIZESHIFT - ASSOCIATIVESHIFT };
+- enum { TAGMASK = (u32)(~0 << TAGSHIFT) };
+- enum { BLOCKMASK = ((u32)~0 >> (32 - TAGSHIFT)) & (u32)(~0 << BLOCKSIZESHIFT) };
++ enum { TAGMASK = (u32)(~0U << TAGSHIFT) };
++ enum { BLOCKMASK = ((u32)~0U >> (32 - TAGSHIFT)) & (u32)(~0U << BLOCKSIZESHIFT) };
+ enum { WORDSIZE = sizeof(u32) };
+ enum { WORDSPERBLOCK = (1 << BLOCKSIZESHIFT) / WORDSIZE };
+ enum { DATAPERWORD = WORDSIZE * ASSOCIATIVITY };
+--- a/src/ctrlssdl.cpp
++++ b/src/ctrlssdl.cpp
+@@ -200,7 +200,7 @@
+ break;
+ case SDL_JOYAXISMOTION:
+ /* Dead zone of 50% */
+- if( (abs(event.jaxis.value) >> 14) != 0 )
++ if( ((u32)abs(event.jaxis.value) >> 14) != 0 )
+ {
+ key = ((event.jaxis.which & 15) << 12) | JOY_AXIS << 8 | ((event.jaxis.axis & 127) << 1);
+ if (event.jaxis.value > 0) {
+@@ -370,7 +370,7 @@
+ Note: button constants have a 1bit offset. */
+ case SDL_JOYAXISMOTION:
+ key_code = ((event->jaxis.which & 15) << 12) | JOY_AXIS << 8 | ((event->jaxis.axis & 127) << 1);
+- if( (abs(event->jaxis.value) >> 14) != 0 )
++ if( ((u32)abs(event->jaxis.value) >> 14) != 0 )
+ {
+ if (event->jaxis.value > 0)
+ key_code |= 1;