From unknown Sun Jun 22 08:08:37 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#39675] [PATCH] fix Desmume on newer GCC Resent-From: raingloom Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 19 Feb 2020 13:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 39675 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 39675@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.158211969329645 (code B ref -1); Wed, 19 Feb 2020 13:42:01 +0000 Received: (at submit) by debbugs.gnu.org; 19 Feb 2020 13:41:33 +0000 Received: from localhost ([127.0.0.1]:41772 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j4PbY-0007i5-TZ for submit@debbugs.gnu.org; Wed, 19 Feb 2020 08:41:33 -0500 Received: from lists.gnu.org ([209.51.188.17]:52288) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j4PbX-0007hv-Bg for submit@debbugs.gnu.org; Wed, 19 Feb 2020 08:41:31 -0500 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 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, URIBL_BLOCKED autolearn=disabled version=3.3.2 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1582119685; bh=qupF6ndF0VyCWVF356DBff5WL31lkYBhC0fJ0YPQVWM=; h=Date:From:Subject:To:From; b=jw145dJu07rI0sNBeUpRETdxKSKNdk3BtZOlwKCIu5Kl0L5DO/yH5c+4JCiZk4Auc BYm+Av4HtlrkwdlOUDyDS8qYHS47Fsv4PWKOxxI0o5JKwVTogRemCsj1VMLvUfzs2D PDoZsKwUvRjlvMkSVPQwtvicqzZfEpe/tCDbIS0Y= X-Riseup-User-ID: FB072A5343E0F27CD7B0FB7F7B18608E1563C91E13F9FA415625501FB1A8FAF3 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" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 198.252.153.129 X-Spam-Score: 0.2 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) --=-+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-- From unknown Sun Jun 22 08:08:37 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#39675] [PATCH] fix Desmume on newer GCC Resent-From: Jakub =?UTF-8?Q?K=C4=85dzio=C5=82ka?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 20 Feb 2020 16:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39675 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: raingloom Cc: 39675@debbugs.gnu.org Received: via spool by 39675-submit@debbugs.gnu.org id=B39675.15822146257024 (code B ref 39675); Thu, 20 Feb 2020 16:04:01 +0000 Received: (at 39675) by debbugs.gnu.org; 20 Feb 2020 16:03:45 +0000 Received: from localhost ([127.0.0.1]:45670 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j4oIj-0001pE-9i for submit@debbugs.gnu.org; Thu, 20 Feb 2020 11:03:45 -0500 Received: from pat.zlotemysli.pl ([37.59.186.212]:37404) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j4oId-0001ot-Ta for 39675@debbugs.gnu.org; Thu, 20 Feb 2020 11:03:43 -0500 Received: (qmail 29087 invoked by uid 1009); 20 Feb 2020 17:03:37 +0100 Received: from user-5-173-112-62.play-internet.pl (kuba@kadziolka.net@user-5-173-112-62.play-internet.pl) by pat (envelope-from , uid 1002) with qmail-scanner-2.08st (clamdscan: 0.98.6/25728. spamassassin: 3.4.0. perlscan: 2.08st. Clear:RC:1(5.173.112.62):. Processed in 0.022701 secs); 20 Feb 2020 16:03:37 -0000 Received: from user-5-173-112-62.play-internet.pl (HELO gravity) (kuba@kadziolka.net@5.173.112.62) by pat.zlotemysli.pl with SMTP; 20 Feb 2020 17:03:37 +0100 Date: Thu, 20 Feb 2020 17:04:17 +0100 From: Jakub =?UTF-8?Q?K=C4=85dzio=C5=82ka?= Message-ID: <20200220160417.mbd2twtzkoknr5z7@gravity> References: <1582119681.2225.1@riseup.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="2yxpg7cnc3sthby3" Content-Disposition: inline In-Reply-To: <1582119681.2225.1@riseup.net> X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --2yxpg7cnc3sthby3 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Feb 19, 2020 at 02:41:21PM +0100, raingloom wrote: > 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. >=20 Hi, the bullet points in your commit message are at the end of the lines for some reason. Also, the added .patch files don't apply when I `guix build desmume'. I think you'll need to resend the patch. Also, when you add =2Epatch files, you need to add them to a list in gnu/local.mk. Regards, Jakub K=C4=85dzio=C5=82ka --2yxpg7cnc3sthby3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEE5Xa/ss9usT31cTO54xWnWEYTFWQFAl5OrgAACgkQ4xWnWEYT FWTcTRAArQy0tn1YuzxpnksyDTXoZAEoZpLKrQEBgq8VcayD+jtqtAg858A1Yzha LOdkyAzHU7WiVArWBhs/S1ozQX00VGvC7uJS77k/gUbtN4X8mqf9z4juL0ZJ/Baf CpehZP9aUzB+qre/QTk8J7Bc3+6vhNAKzJ19sUnUIEXW7a9zg3U5FiGAUhjhTwfS O/YO5I5skVNNzaorJnQWHWOVNdhDkSnhvT4rVgS/LGwNhjVBab4csQGvI40OHDXF UtCQecTpzTUBOlptWA6dh0cCk7TBGLK7aPis+GkdzqRNAIzsbCoOtI+twSyPZeCd lc/zGNd192YgUgR37rlEF6W60BJfrnD48b9n8BcrL1OBFZ5pa8UHwcYbB2FliYGe eVFm68lznhTkp9RWpwlYyeNQO+rbIfSWttkDPRDYwq8r7F/ZK6nCJ4lohkYeC6rv 7mP1pnAiG/xfPf+npp46lKY+HkhtDasChye4R1IrpsCTyBDHPoTRfd/S41xWN1AI TvvLOBpTDZEI9zM8fRO0FEk//GvVoK6c/3t4F2RHyKe9ddJejjdBDmMKPGWghs27 bfGbU089JOF17K2rLICEDeaumZ2IcYIIIhSDl1tFDXiq2aaJc2bLTLxcpc3sfPZm B7XdlUVu2CG9RsTE7Jr7dZj34ViimQjmDdAQ/4e5jHQIMUt26qc= =ePBQ -----END PGP SIGNATURE----- --2yxpg7cnc3sthby3-- From unknown Sun Jun 22 08:08:37 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#39675] [PATCH] fix Desmume on newer GCC Resent-From: raingloom Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 22 Feb 2020 09:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39675 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 39675@debbugs.gnu.org Received: via spool by 39675-submit@debbugs.gnu.org id=B39675.15823639025443 (code B ref 39675); Sat, 22 Feb 2020 09:32:01 +0000 Received: (at 39675) by debbugs.gnu.org; 22 Feb 2020 09:31:42 +0000 Received: from localhost ([127.0.0.1]:48564 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j5R8Q-0001Pj-0e for submit@debbugs.gnu.org; Sat, 22 Feb 2020 04:31:42 -0500 Received: from mx1.riseup.net ([198.252.153.129]:32976) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j5R8L-0001PY-UD for 39675@debbugs.gnu.org; Sat, 22 Feb 2020 04:31:41 -0500 Received: from bell.riseup.net (bell-pn.riseup.net [10.0.1.178]) (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 48Pjkx1Sp2zFcPK for <39675@debbugs.gnu.org>; Sat, 22 Feb 2020 01:31:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1582363897; bh=s0zEbtMrstZFEDrJL0BgYpoXjINh/Sij8HDaQg1Q+4c=; h=Date:From:Subject:To:In-Reply-To:References:From; b=AFmVr0cJ88HMqAWo8YN6p37K6e86OvyLXVtQMHxF2Syn9OkH3zUAPCDiS5qq04v2m 4/I2Kk32tKncmHrI+AIdxwcbzT+PY8TMhSxpyAkDCOfMxviA2rdJjjqs2d3ekPlDrU u0RcWb/vDlHX5NEk1zmJq3QtRGwbAUumm0qr1Gzk= X-Riseup-User-ID: F5D2AFD947ABEF9E44A81BC716BACA71D9DE363E55CE0FEEE1DA5D4228198489 Received: from [127.0.0.1] (localhost [127.0.0.1]) by bell.riseup.net (Postfix) with ESMTPSA id 48Pjkw1HRpzJsvf for <39675@debbugs.gnu.org>; Sat, 22 Feb 2020 01:31:35 -0800 (PST) Date: Sat, 22 Feb 2020 10:31:31 +0100 From: raingloom Message-Id: <1582363891.3461.0@riseup.net> In-Reply-To: <20200220160417.mbd2twtzkoknr5z7@gravity> References: <1582119681.2225.1@riseup.net> <20200220160417.mbd2twtzkoknr5z7@gravity> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-zj47ijjnTOuI9PiW2hNC" X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-zj47ijjnTOuI9PiW2hNC Content-Type: text/plain; charset=iso-8859-2; format=flowed Content-Transfer-Encoding: quoted-printable Ah, I forgot to leave a blank line in the commit message. Here is a patch for the current master as of a few minutes ago. On Thu, Feb 20, 2020 at 17:04, Jakub K=B1dzio=B3ka =20 wrote: > On Wed, Feb 19, 2020 at 02:41:21PM +0100, raingloom wrote: >> The project has not seen much development in some time, so it=20 >> needed a few >> patches. I found them in the Arch package, but they seem to be from=20 >> the >> upstream SourceForge project and mailing list. >>=20 >=20 > Hi, >=20 > the bullet points in your commit message are at the end of the lines=20 > for > some reason. Also, the added .patch files don't apply when I `guix=20 > build > desmume'. I think you'll need to resend the patch. Also, when you add > .patch files, you need to add them to a list in gnu/local.mk. >=20 > Regards, > Jakub K=B1dzio=B3ka = --=-zj47ijjnTOuI9PiW2hNC 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 5fd558ad04249d6214fdbf12f376962f65af1a9e 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 = --=-zj47ijjnTOuI9PiW2hNC-- From unknown Sun Jun 22 08:08:37 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#39675] [PATCH] fix Desmume on newer GCC Resent-From: Jakub =?UTF-8?Q?K=C4=85dzio=C5=82ka?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 22 Feb 2020 15:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39675 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: raingloom Cc: 39675@debbugs.gnu.org Received: via spool by 39675-submit@debbugs.gnu.org id=B39675.158238595119044 (code B ref 39675); Sat, 22 Feb 2020 15:40:01 +0000 Received: (at 39675) by debbugs.gnu.org; 22 Feb 2020 15:39:11 +0000 Received: from localhost ([127.0.0.1]:49898 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j5Ws3-0004x6-H3 for submit@debbugs.gnu.org; Sat, 22 Feb 2020 10:39:11 -0500 Received: from pat.zlotemysli.pl ([37.59.186.212]:40314) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j5Ws1-0004ww-WF for 39675@debbugs.gnu.org; Sat, 22 Feb 2020 10:39:10 -0500 Received: (qmail 9484 invoked by uid 1009); 22 Feb 2020 16:39:07 +0100 Received: from 188.123.215.55 (kuba@kadziolka.net@188.123.215.55) by pat (envelope-from , uid 1002) with qmail-scanner-2.08st (clamdscan: 0.98.6/25730. spamassassin: 3.4.0. perlscan: 2.08st. Clear:RC:1(188.123.215.55):. Processed in 0.023655 secs); 22 Feb 2020 15:39:07 -0000 Received: from unknown (HELO gravity) (kuba@kadziolka.net@188.123.215.55) by pat.zlotemysli.pl with SMTP; 22 Feb 2020 16:39:07 +0100 Date: Sat, 22 Feb 2020 16:39:49 +0100 From: Jakub =?UTF-8?Q?K=C4=85dzio=C5=82ka?= Message-ID: <20200222153949.fkr5xlbmbm6y4mvp@gravity> References: <1582119681.2225.1@riseup.net> <20200220160417.mbd2twtzkoknr5z7@gravity> <1582363891.3461.0@riseup.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="hiwgydewsojlyuej" Content-Disposition: inline In-Reply-To: <1582363891.3461.0@riseup.net> X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --hiwgydewsojlyuej Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Feb 22, 2020 at 10:31:31AM +0100, raingloom wrote: > Ah, I forgot to leave a blank line in the commit message. >=20 > Here is a patch for the current master as of a few minutes ago. Something is still off: patching file src/MMU_timing.h Hunk #1 FAILED at 155 (different line endings). 1 out of 1 hunk FAILED -- saving rejects to file src/MMU_timing.h.rej patching file src/ctrlssdl.cpp patching file src/wifi.cpp Hunk #1 succeeded at 314 (offset -6 lines). source is under 'desmume-0.9.11' applying '/gnu/store/yc9991nl8vgkyszbb77ywr9idikyi5lj-desmume-gcc6-fixes.pa= tch'... Backtrace: 3 (primitive-load "/gnu/store/zxjsjnfbzqqz2zgks5xgkh63m30=E2=80= =A6") In ice-9/eval.scm: 619:8 2 (_ #(# "desmume-=E2=80=A6= ")) In srfi/srfi-1.scm: 640:9 1 (for-each # ("/gnu/store/=E2=80=A6"= =E2=80=A6)) In guix/build/utils.scm: 652:6 0 (invoke _ . _) guix/build/utils.scm:652:6: In procedure invoke: Throw to key `srfi-34' with args `(#)'. `file src/MMU_timing.h` in the build directory suggests that the header file is shipped with CRLF line endings. Could `git format-patch` be converting \r\n in your files into plain \n? I tried to work around this with some combinations of (origin (patch-flags '("--ignore-whitespace" "-p1"))), but no results. --hiwgydewsojlyuej Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEE5Xa/ss9usT31cTO54xWnWEYTFWQFAl5RS0UACgkQ4xWnWEYT FWT4hRAA0znU3xICaS1cjutDuh8GA4U3FFug5Dcq9UNIzaDyrr3jZ6bnqLc52k+/ n+1h8A9TGtbN98+ujUOFPkcDqRDy+B11lfaXpydXzS5Fo4qrGDuyqNLqp73s7DBE uCVUdScFNvloewbIzFGSAraiLfEqF291I4lrYKCJCIA3ns0oIM11V2Q1567O1kfh MsYQFRxg6FU740xjFyCCCA4mH7DnxYQmwul5bA+YWg6mkCEqGm6wyDQCF8aZDxuU WG+HC9SbzAuzt99ld22HT5OKceOb0qmlmtDLYXmcu5t9JECBRBwbpmTsiGOGOM7v vii62x1cZPPLeK7f8bYSHAS8eQnYU8pZ+nAQbY3kReERFkreD5quIbi4nhOL4613 D8+2iRXRgsdo6U+8GZt9lrQXSUMx7lQQoeNOkYjokl5e6l426Fzm2BJVYoOFL+cG N/YE25fqd8oTxmo+ti3y+51HuyghSfcLmChShOyUuLU2GPb5hMkPEwaKtGMOeZgV E6NpMJk/eiCidEV6UMsMAZ4S/TJT8PfKcyxIj5120p6BiQ0nmj9NWhBnUvGIxfVW g/FP9IWeR5QqDOGelYX6/BtXr8fx1RhDuFHQ5EEu7SmSY+lv3Al1kDK+1g+zUkpu m84dXNXehPNb8B3Ja1v06t8lLvJDHOeOc90c+7rm0TBK7IjpucY= =p782 -----END PGP SIGNATURE----- --hiwgydewsojlyuej-- From unknown Sun Jun 22 08:08:37 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#39675] [PATCH] fix Desmume on newer GCC Resent-From: raingloom Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 22 Feb 2020 23:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39675 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 39675 <39675@debbugs.gnu.org> Received: via spool by 39675-submit@debbugs.gnu.org id=B39675.158241355824607 (code B ref 39675); Sat, 22 Feb 2020 23:20:02 +0000 Received: (at 39675) by debbugs.gnu.org; 22 Feb 2020 23:19:18 +0000 Received: from localhost ([127.0.0.1]:50206 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j5e3K-0006Op-Ir for submit@debbugs.gnu.org; Sat, 22 Feb 2020 18:19:18 -0500 Received: from mx1.riseup.net ([198.252.153.129]:33142) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j5e3I-0006Og-4x for 39675@debbugs.gnu.org; Sat, 22 Feb 2020 18:19:16 -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 48Q45v3BrXzF0l9 for <39675@debbugs.gnu.org>; Sat, 22 Feb 2020 15:19:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1582413555; bh=nnPlcClzYzDsdfrapXGeRSJmq5gKhCWKMTIK2wCLxLk=; h=Date:From:Subject:To:In-Reply-To:References:From; b=iY9kytiBYoKtVymQmpE9DSHGyTQjV3r4xIdCcJpGcndgJZUlma+rWYQiVgnVASFep QXEQ9yzcy1InO+6Ldc3G20ZxX/gOvucUijJ+0RImHvEzNmbrAhuIvdKYx5bW6Uj/6m 04VU7GcjCueAgBhceKkznjRTMM7POWCX8/XD0udA= X-Riseup-User-ID: 4F537A22DCDA1E6B6F1342DB17702F252FD11F4BAE39A338EBF690745D1364D6 Received: from [127.0.0.1] (localhost [127.0.0.1]) by capuchin.riseup.net (Postfix) with ESMTPSA id 48Q45t3h9Zz8tmB for <39675@debbugs.gnu.org>; Sat, 22 Feb 2020 15:19:14 -0800 (PST) Date: Sun, 23 Feb 2020 00:19:11 +0100 From: raingloom Message-Id: <1582413551.30358.0@riseup.net> In-Reply-To: <20200222153949.fkr5xlbmbm6y4mvp@gravity> References: <1582119681.2225.1@riseup.net> <20200220160417.mbd2twtzkoknr5z7@gravity> <1582363891.3461.0@riseup.net> <20200222153949.fkr5xlbmbm6y4mvp@gravity> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) It could for all I know. What if you just pulled it from my gitlab? https://gitlab.com/raingloom/guix-source/-/tree/raingloom/desmume I have no idea how to preserve mixed line endings in git format-patch=20 and the docs didn't help. On Sat, Feb 22, 2020 at 16:39, Jakub K=C4=85dzio=C5=82ka =20 wrote: > On Sat, Feb 22, 2020 at 10:31:31AM +0100, raingloom wrote: >> Ah, I forgot to leave a blank line in the commit message. >>=20 >> Here is a patch for the current master as of a few minutes ago. >=20 > Something is still off: >=20 > patching file src/MMU_timing.h > Hunk #1 FAILED at 155 (different line endings). > 1 out of 1 hunk FAILED -- saving rejects to file src/MMU_timing.h.rej > patching file src/ctrlssdl.cpp > patching file src/wifi.cpp > Hunk #1 succeeded at 314 (offset -6 lines). > source is under 'desmume-0.9.11' > applying=20 > '/gnu/store/yc9991nl8vgkyszbb77ywr9idikyi5lj-desmume-gcc6-fixes.patch'... > Backtrace: > 3 (primitive-load=20 > "/gnu/store/zxjsjnfbzqqz2zgks5xgkh63m30=E2=80=A6") > In ice-9/eval.scm: > 619:8 2 (_ #(#=20 > "desmume-=E2=80=A6")) > In srfi/srfi-1.scm: > 640:9 1 (for-each # ("/gnu/store/=E2=80= =A6"=20 > =E2=80=A6)) > In guix/build/utils.scm: > 652:6 0 (invoke _ . _) >=20 > guix/build/utils.scm:652:6: In procedure invoke: > Throw to key `srfi-34' with args `(# [program:=20 > "/gnu/store/v76scv4n63ip08g119rczh2mrw31zwpd-patch-2.7.6/bin/patch"=20 > arguments: ("--force" "--no-backup-if-mismatch" "-p1" "--input"=20 > "/gnu/store/yc9991nl8vgkyszbb77ywr9idikyi5lj-desmume-gcc6-fixes.patch")=20 > exit-status: 1 term-signal: #f stop-signal: #f] 7ffff6022d00>)'. >=20 > `file src/MMU_timing.h` in the build directory suggests that the=20 > header > file is shipped with CRLF line endings. Could `git format-patch` be > converting \r\n in your files into plain \n? >=20 > I tried to work around this with some combinations of > (origin (patch-flags '("--ignore-whitespace" "-p1"))), but no results. = From unknown Sun Jun 22 08:08:37 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: raingloom Subject: bug#39675: closed (Done: [PATCH] fix Desmume on newer GCC) Message-ID: References: <20200223193150.szmx3cajqlqxbxm3@gravity> <1582119681.2225.1@riseup.net> X-Gnu-PR-Message: they-closed 39675 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 39675@debbugs.gnu.org Date: Sun, 23 Feb 2020 19:32:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1582486322-18141-1" This is a multi-part message in MIME format... ------------=_1582486322-18141-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #39675: [PATCH] fix Desmume on newer GCC which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 39675@debbugs.gnu.org. --=20 39675: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D39675 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1582486322-18141-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 39675-done) by debbugs.gnu.org; 23 Feb 2020 19:31:14 +0000 Received: from localhost ([127.0.0.1]:51614 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j5wyA-0004hT-4q for submit@debbugs.gnu.org; Sun, 23 Feb 2020 14:31:14 -0500 Received: from pat.zlotemysli.pl ([37.59.186.212]:40652) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j5wy5-0004hH-PX for 39675-done@debbugs.gnu.org; Sun, 23 Feb 2020 14:31:13 -0500 Received: (qmail 26744 invoked by uid 1009); 23 Feb 2020 20:31:07 +0100 Received: from 188.123.215.55 (kuba@kadziolka.net@188.123.215.55) by pat (envelope-from , uid 1002) with qmail-scanner-2.08st (clamdscan: 0.98.6/25731. spamassassin: 3.4.0. perlscan: 2.08st. Clear:RC:1(188.123.215.55):. Processed in 0.020838 secs); 23 Feb 2020 19:31:07 -0000 Received: from unknown (HELO gravity) (kuba@kadziolka.net@188.123.215.55) by pat.zlotemysli.pl with SMTP; 23 Feb 2020 20:31:07 +0100 Date: Sun, 23 Feb 2020 20:31:50 +0100 From: Jakub =?utf-8?B?S8SFZHppb8WCa2E=?= To: 39675-done@debbugs.gnu.org Subject: Done: [PATCH] fix Desmume on newer GCC Message-ID: <20200223193150.szmx3cajqlqxbxm3@gravity> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="qhor4lcaqihw2ww4" Content-Disposition: inline X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 39675-done Cc: raingloom@riseup.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --qhor4lcaqihw2ww4 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Pulling directly worked like a charm. Add your any files you create to gnu/local.mk next time. Pushed to master as f267420707142dc17f8e9f976f98447697823c85. Thanks! --qhor4lcaqihw2ww4 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEE5Xa/ss9usT31cTO54xWnWEYTFWQFAl5S0xkACgkQ4xWnWEYT FWSr3A/+PWBi4I57Ks+gR2yJKYluk9SbVRTsRvWmRAc7IAF6jRaKIXOWWgHGCil5 2qdWEM9z7KDMlJ1D1btkZmMpPGXhYAH/fBH45cpalE0HexK/tf4BKtByDTxcAJ9G ExhmQGiaXEE6VaN9FXBwUFbilK/u9xFXFpB0+mkURVe1Vwd0rKUf2TpJ3bwt8WBv CV+Gve9SKOq8lqcAAChtF2EqMG3YUAS8OKu9UkHm3VN5R/G+F5xi9XP7kjOCYqem TB2B/GPjpGnUfI8jMtuBOCsRaCxkvwC9eE2QhRe2NHcLmawMM1k0sQ5JwJYDBY1L SIfV+SxpkAsE1Sz+lcClKXRciGRMerAj8ge7BK3ghAFx0A8M2N0jpjlRKKk7acDF FQx/sSQHt26oLxrRdm/Um4V8r6xCOdYo6ngTwT4KjH8nBppxIn7PnHkmZflIsM+6 zkS87x1JOVVa4Ly5LgAQkVct9ec9yZ33nt+WBF0oWmWtdmwM0Hk+906ut0rv65cN NfGmHLcvM6/om9F9QY/5OeztefarXdLuE9+15AtIJTqkuHM3+8buMtla06Ir/DIO xvGQnwtSmcEzeHM0IeGLHiyCuIBTJP88zk0oTflV/OaijQfqdU4xLZ629l2HR1VU sm4+6P3yZ26UNldnM+qxs/91XSOzTE+BbHxaIEgBdzaBsMsOY4U= =7rIv -----END PGP SIGNATURE----- --qhor4lcaqihw2ww4-- ------------=_1582486322-18141-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 19 Feb 2020 13:41:33 +0000 Received: from localhost ([127.0.0.1]:41772 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j4PbY-0007i5-TZ for submit@debbugs.gnu.org; Wed, 19 Feb 2020 08:41:33 -0500 Received: from lists.gnu.org ([209.51.188.17]:52288) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j4PbX-0007hv-Bg for submit@debbugs.gnu.org; Wed, 19 Feb 2020 08:41:31 -0500 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 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, URIBL_BLOCKED autolearn=disabled version=3.3.2 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1582119685; bh=qupF6ndF0VyCWVF356DBff5WL31lkYBhC0fJ0YPQVWM=; h=Date:From:Subject:To:From; b=jw145dJu07rI0sNBeUpRETdxKSKNdk3BtZOlwKCIu5Kl0L5DO/yH5c+4JCiZk4Auc BYm+Av4HtlrkwdlOUDyDS8qYHS47Fsv4PWKOxxI0o5JKwVTogRemCsj1VMLvUfzs2D PDoZsKwUvRjlvMkSVPQwtvicqzZfEpe/tCDbIS0Y= X-Riseup-User-ID: FB072A5343E0F27CD7B0FB7F7B18608E1563C91E13F9FA415625501FB1A8FAF3 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 Subject: [PATCH] fix Desmume on newer GCC To: guix-patches@gnu.org Message-Id: <1582119681.2225.1@riseup.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-+qxC7wqMM9DqwoJHvaDg" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 198.252.153.129 X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) --=-+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-- ------------=_1582486322-18141-1--