On Sun, 28 Jul 2019 09:07:14 +0100 Stuart Henderson wrote: > Please fix the line endings in post-extract so the patch has standard > line endings, there's a commented-out example in games/gargoyle.
Done, thanks for the tip! > -- > Sent from a phone, apologies for poor formatting. > > On 28 July 2019 01:49:47 Charlene Wendling <juliana...@posteo.jp> > wrote: > > >> http://build-failures.rhaalovely.net/powerpc/2019-07-14/emulators/desmume.log > >> http://build-failures.rhaalovely.net/sparc64/2019-07-11/emulators/desmume.log > > > > Since gcc-6 this part of the code requires integer constants, and > > later in the build, some additional casting is needed. The diff has > > been upstreamed already [0]. > > > > This fixes the build on macppc, i've tested some homebrews without > > issues. amd64 is still doing well. > > > > While here i've moved HOMEPAGE to https. > > > > The code contains some DOS line endings, so i attach it this time. > > > > Comments/feedback are welcome! > > > > Charlène. > > > > > > [0] https://sourceforge.net/p/desmume/bugs/1570/ > > [1] https://bin.charlenew.xyz/desmume.log > > > Index: Makefile =================================================================== RCS file: /cvs/ports/emulators/desmume/Makefile,v retrieving revision 1.24 diff -u -p -u -p -r1.24 Makefile --- Makefile 12 Jul 2019 20:46:08 -0000 1.24 +++ Makefile 28 Jul 2019 09:46:39 -0000 @@ -5,11 +5,11 @@ 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 <anth...@anjbe.name> @@ -43,5 +43,9 @@ MODULES = textproc/intltool 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> Index: patches/patch-src_MMU_timing_h =================================================================== RCS file: patches/patch-src_MMU_timing_h diff -N patches/patch-src_MMU_timing_h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-src_MMU_timing_h 28 Jul 2019 09:46:39 -0000 @@ -0,0 +1,21 @@ +$OpenBSD$ + +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 }; Index: patches/patch-src_ctrlssdl_cpp =================================================================== RCS file: patches/patch-src_ctrlssdl_cpp diff -N patches/patch-src_ctrlssdl_cpp --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-src_ctrlssdl_cpp 28 Jul 2019 09:46:39 -0000 @@ -0,0 +1,28 @@ +$OpenBSD$ + +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;