desmume: fix with ports-gcc by adding some additional type casting.
While here, move HOMEPAGE to https. tweaks and OK sthen@, maintainer timeout
This commit is contained in:
parent
157b1f34f4
commit
f885885786
@ -1,15 +1,15 @@
|
||||
# $OpenBSD: Makefile,v 1.24 2019/07/12 20:46:08 sthen Exp $
|
||||
# $OpenBSD: Makefile,v 1.25 2019/08/08 17:11:24 cwen Exp $
|
||||
|
||||
USE_WXNEEDED = Yes
|
||||
|
||||
COMMENT = Nintendo DS emulator
|
||||
|
||||
DISTNAME = desmume-0.9.11
|
||||
REVISION = 7
|
||||
REVISION = 8
|
||||
|
||||
CATEGORIES = emulators
|
||||
|
||||
HOMEPAGE = http://desmume.org/
|
||||
HOMEPAGE = https://desmume.org/
|
||||
|
||||
MAINTAINER = Anthony J. Bentley <anthony@anjbe.name>
|
||||
|
||||
@ -44,4 +44,8 @@ COMPILER = base-clang ports-gcc
|
||||
|
||||
CONFIGURE_STYLE = gnu
|
||||
|
||||
# Some files needing patches have DOS line endings, removing them.
|
||||
post-extract:
|
||||
@cd ${WRKSRC} && perl -i -pe 's/\r$$//' src/MMU_timing.h
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
21
emulators/desmume/patches/patch-src_MMU_timing_h
Normal file
21
emulators/desmume/patches/patch-src_MMU_timing_h
Normal file
@ -0,0 +1,21 @@
|
||||
$OpenBSD: patch-src_MMU_timing_h,v 1.1 2019/08/08 17:11:24 cwen Exp $
|
||||
|
||||
ports-gcc fix for:
|
||||
error: enumerator value for 'BLOCKMASK' is not an integer constant
|
||||
From:
|
||||
https://sourceforge.net/p/desmume/bugs/1570/
|
||||
|
||||
Index: src/MMU_timing.h
|
||||
--- src/MMU_timing.h.orig
|
||||
+++ src/MMU_timing.h
|
||||
@@ -155,8 +155,8 @@ class CacheController (private)
|
||||
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 };
|
28
emulators/desmume/patches/patch-src_ctrlssdl_cpp
Normal file
28
emulators/desmume/patches/patch-src_ctrlssdl_cpp
Normal file
@ -0,0 +1,28 @@
|
||||
$OpenBSD: patch-src_ctrlssdl_cpp,v 1.1 2019/08/08 17:11:24 cwen Exp $
|
||||
|
||||
ports-gcc fix for:
|
||||
error: invalid operands of types '__gnu_cxx::__enable_if<true, double>::__type {aka double}' and 'int' to binary 'operator>>'
|
||||
From:
|
||||
https://sourceforge.net/p/desmume/bugs/1570/
|
||||
|
||||
Index: src/ctrlssdl.cpp
|
||||
--- src/ctrlssdl.cpp.orig
|
||||
+++ src/ctrlssdl.cpp
|
||||
@@ -200,7 +200,7 @@ u16 get_joy_key(int index) {
|
||||
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 @@ do_process_joystick_events( u16 *keypad, SDL_Event *ev
|
||||
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;
|
Loading…
Reference in New Issue
Block a user