From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:41294) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j4Pc3-0008C9-SD for guix-patches@gnu.org; Wed, 19 Feb 2020 08:42:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j4Pc2-0005SE-Ck for guix-patches@gnu.org; Wed, 19 Feb 2020 08:42:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:35802) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j4Pc2-0005Ru-8v for guix-patches@gnu.org; Wed, 19 Feb 2020 08:42:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j4Pc2-0007j0-57 for guix-patches@gnu.org; Wed, 19 Feb 2020 08:42:02 -0500 Subject: [bug#39675] [PATCH] fix Desmume on newer GCC Resent-Message-ID: Received: from eggs.gnu.org ([2001:470:142:3::10]:41186) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j4PbV-0008BT-Ll for guix-patches@gnu.org; Wed, 19 Feb 2020 08:41:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j4PbU-0004wT-3f for guix-patches@gnu.org; Wed, 19 Feb 2020 08:41:29 -0500 Received: from mx1.riseup.net ([198.252.153.129]:40178) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j4PbT-0004tB-KQ for guix-patches@gnu.org; Wed, 19 Feb 2020 08:41:28 -0500 Received: from capuchin.riseup.net (capuchin-pn.riseup.net [10.0.1.176]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "Sectigo RSA Domain Validation Secure Server CA" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 48MzQY6b27zFcPm for ; Wed, 19 Feb 2020 05:41:25 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) by capuchin.riseup.net (Postfix) with ESMTPSA id 48MzQY1dQgz8sts for ; Wed, 19 Feb 2020 05:41:24 -0800 (PST) Date: Wed, 19 Feb 2020 14:41:21 +0100 From: raingloom Message-Id: <1582119681.2225.1@riseup.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-+qxC7wqMM9DqwoJHvaDg" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 39675@debbugs.gnu.org --=-+qxC7wqMM9DqwoJHvaDg Content-Type: text/plain; charset=us-ascii; format=flowed The project has not seen much development in some time, so it needed a few patches. I found them in the Arch package, but they seem to be from the upstream SourceForge project and mailing list. --=-+qxC7wqMM9DqwoJHvaDg Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-gnu-desmume-fix-build-on-new-GCC-versions.patch Content-Transfer-Encoding: quoted-printable >From b411aaa32286fd746812adc85de7ee2720ad76fd Mon Sep 17 00:00:00 2001 From: raingloom Date: Wed, 19 Feb 2020 14:36:26 +0100 Subject: [PATCH] gnu: desmume: fix build on new GCC versions * gnu/packages/emulation.scm (desmume) add patches * gnu/packages/patches/desmume-gcc6-fixes.patch: new file * gnu/packages/patches/desmume-gcc7-fixes.patch: new file --- gnu/packages/emulators.scm | 4 +- gnu/packages/patches/desmume-gcc6-fixes.patch | 59 +++++++++++++++++++ gnu/packages/patches/desmume-gcc7-fixes.patch | 18 ++++++ 3 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/desmume-gcc6-fixes.patch create mode 100644 gnu/packages/patches/desmume-gcc7-fixes.patch diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm index b7f29a6f5b..aec4ce73ba 100644 --- a/gnu/packages/emulators.scm +++ b/gnu/packages/emulators.scm @@ -102,7 +102,9 @@ version "/desmume-" version ".tar.gz")) (sha256 (base32 - "15l8wdw3q61fniy3h93d84dnm6s4pyadvh95a0j6d580rjk4pcrs")))) + "15l8wdw3q61fniy3h93d84dnm6s4pyadvh95a0j6d580rjk4pcrs")) + (patches (search-patches "desmume-gcc6-fixes.patch" + "desmume-gcc7-fixes.patch")))) (build-system gnu-build-system) (arguments ;; Enable support for WiFi and microphone. diff --git a/gnu/packages/patches/desmume-gcc6-fixes.patch b/gnu/packages/p= atches/desmume-gcc6-fixes.patch new file mode 100644 index 0000000000..6eb9576f64 --- /dev/null +++ b/gnu/packages/patches/desmume-gcc6-fixes.patch @@ -0,0 +1,59 @@ +From: zeromus +Origin: upstream, https://sourceforge.net/p/desmume/code/5514, https://sou= rceforge.net/p/desmume/code/5517, https://sourceforge.net/p/desmume/code/54= 30 +Subject: fix GCC6 issues +Bug: https://sourceforge.net/p/desmume/bugs/1570/ +Bug-Debian: http://bugs.debian.org/811691 + +Index: desmume/src/MMU_timing.h +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D +--- desmume/src/MMU_timing.h (revision 5513) ++++ desmume/src/MMU_timing.h (revision 5517) +@@ -155,8 +155,8 @@ + enum { ASSOCIATIVITY =3D 1 << ASSOCIATIVESHIFT }; + enum { BLOCKSIZE =3D 1 << BLOCKSIZESHIFT }; + enum { TAGSHIFT =3D SIZESHIFT - ASSOCIATIVESHIFT }; +- enum { TAGMASK =3D (u32)(~0 << TAGSHIFT) }; +- enum { BLOCKMASK =3D ((u32)~0 >> (32 - TAGSHIFT)) & (u32)(~0 << BLOCKSIZ= ESHIFT) }; ++ enum { TAGMASK =3D (u32)(~0U << TAGSHIFT) }; ++ enum { BLOCKMASK =3D ((u32)~0U >> (32 - TAGSHIFT)) & (u32)(~0U << BLOCKS= IZESHIFT) }; + enum { WORDSIZE =3D sizeof(u32) }; + enum { WORDSPERBLOCK =3D (1 << BLOCKSIZESHIFT) / WORDSIZE }; + enum { DATAPERWORD =3D WORDSIZE * ASSOCIATIVITY }; +Index: desmume/src/ctrlssdl.cpp +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D +--- desmume/src/ctrlssdl.cpp (revision 5513) ++++ desmume/src/ctrlssdl.cpp (revision 5517) +@@ -200,7 +200,7 @@ + break; + case SDL_JOYAXISMOTION: + /* Dead zone of 50% */ +- if( (abs(event.jaxis.value) >> 14) !=3D 0 ) ++ if( ((u32)abs(event.jaxis.value) >> 14) !=3D 0 ) + { + key =3D ((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 =3D ((event->jaxis.which & 15) << 12) | JOY_AXIS << 8 | ((= event->jaxis.axis & 127) << 1); +- if( (abs(event->jaxis.value) >> 14) !=3D 0 ) ++ if( ((u32)abs(event->jaxis.value) >> 14) !=3D 0 ) + { + if (event->jaxis.value > 0) + key_code |=3D 1; +Index: desmume/src/wifi.cpp +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D +--- desmume/src/wifi.cpp (revision 5429) ++++ desmume/src/wifi.cpp (revision 5430) +@@ -320,9 +320,9 @@ +=20 + #if (WIFI_LOGGING_LEVEL >=3D 1) + #if WIFI_LOG_USE_LOGC +- #define WIFI_LOG(level, ...) if(level <=3D WIFI_LOGGING_LEVEL) LOGC(8, = "WIFI: "__VA_ARGS__); ++ #define WIFI_LOG(level, ...) if(level <=3D WIFI_LOGGING_LEVEL) LOGC(8, = "WIFI: " __VA_ARGS__); + #else +- #define WIFI_LOG(level, ...) if(level <=3D WIFI_LOGGING_LEVEL) printf("= WIFI: "__VA_ARGS__); ++ #define WIFI_LOG(level, ...) if(level <=3D WIFI_LOGGING_LEVEL) printf("= WIFI: " __VA_ARGS__); + #endif + #else + #define WIFI_LOG(level, ...) {} diff --git a/gnu/packages/patches/desmume-gcc7-fixes.patch b/gnu/packages/p= atches/desmume-gcc7-fixes.patch new file mode 100644 index 0000000000..a4934ff6e6 --- /dev/null +++ b/gnu/packages/patches/desmume-gcc7-fixes.patch @@ -0,0 +1,18 @@ +From e1f7039f1b06add4fb75b2f8774000b8f05574af Mon Sep 17 00:00:00 2001 +From: rogerman +Date: Mon, 17 Aug 2015 21:15:04 +0000 +Subject: Fix bug with libfat string handling. + +diff --git a/src/utils/libfat/directory.cpp b/src/utils/libfat/directory.c= pp +index 765d7ae5..b6d7f01f 100644 +--- a/src/utils/libfat/directory.cpp ++++ b/src/utils/libfat/directory.cpp +@@ -139,7 +139,7 @@ static size_t _FAT_directory_mbstoucs2 (ucs2_t* dst, c= onst char* src, size_t len + int bytes; + size_t count =3D 0; +=20 +- while (count < len-1 && src !=3D '\0') { ++ while (count < len-1 && *src !=3D '\0') { + bytes =3D mbrtowc (&tempChar, src, MB_CUR_MAX, &ps); + if (bytes > 0) { + *dst =3D (ucs2_t)tempChar; --=20 2.25.0 = --=-+qxC7wqMM9DqwoJHvaDg--