me
/
guix
Archived
1
0
Fork 0

gnu: desmume: Update to 0.9.13.

* gnu/packages/emulators.scm (desmume): Update to 0.9.13.
[source]: Switch to git-fetch.  Remove patches.
[build-system]: Switch to meson-build-system.
[arguments]<#:configure-flags>: Replace “--enable-openal” with “-Dopenal=true”.
Remove “--enable-wifi”.
Add “-Dfrontend-cli=true”, “-Dfrontend-gtk=true”, and “-Dgdb-stub=true”.
<#:phases>: Add ‘chdir’.
[native-inputs]: Add glib:bin and gettext-minimal.
[inputs]: Replace sdl with sdl2 and gtk+-2 with gtk+.
Remove glu.
Add agg, alsa-lib, libpcap, openal, and soundtouch.
[home-page]: Use HTTPS.
* gnu/packages/patches/desmume-gcc6-fixes.patch: Removed file.
* gnu/packages/patches/desmume-gcc7-fixes.patch: Likewise.
* gnu/local.mk (dist_patch_DATA): Adjust accordingly.

Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
Hendursaga 2023-09-19 16:42:15 -04:00 committed by Liliana Marie Prikler
parent 8027ee4337
commit b14f447106
No known key found for this signature in database
GPG Key ID: 442A84B8C70E2F87
4 changed files with 34 additions and 100 deletions

View File

@ -1066,8 +1066,6 @@ dist_patch_DATA = \
%D%/packages/patches/debops-constants-for-external-program-names.patch \ %D%/packages/patches/debops-constants-for-external-program-names.patch \
%D%/packages/patches/debops-debops-defaults-fall-back-to-less.patch \ %D%/packages/patches/debops-debops-defaults-fall-back-to-less.patch \
%D%/packages/patches/dee-vapi.patch \ %D%/packages/patches/dee-vapi.patch \
%D%/packages/patches/desmume-gcc6-fixes.patch \
%D%/packages/patches/desmume-gcc7-fixes.patch \
%D%/packages/patches/dfu-programmer-fix-libusb.patch \ %D%/packages/patches/dfu-programmer-fix-libusb.patch \
%D%/packages/patches/diffutils-fix-signal-processing.patch \ %D%/packages/patches/diffutils-fix-signal-processing.patch \
%D%/packages/patches/directfb-davinci-glibc-228-compat.patch \ %D%/packages/patches/directfb-davinci-glibc-228-compat.patch \

View File

@ -19,6 +19,7 @@
;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net> ;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
;;; Copyright © 2023 c4droid <c4droid@foxmail.com> ;;; Copyright © 2023 c4droid <c4droid@foxmail.com>
;;; Copyright © 2023 Yovan Naumovski <yovan@gorski.stream> ;;; Copyright © 2023 Yovan Naumovski <yovan@gorski.stream>
;;; Copyright © 2023 Hendursaga <hendursaga@aol.com>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -46,6 +47,7 @@
#:use-module (guix hg-download) #:use-module (guix hg-download)
#:use-module (guix utils) #:use-module (guix utils)
#:use-module (gnu packages) #:use-module (gnu packages)
#:use-module (gnu packages admin)
#:use-module (gnu packages algebra) #:use-module (gnu packages algebra)
#:use-module (gnu packages assembly) #:use-module (gnu packages assembly)
#:use-module (gnu packages audio) #:use-module (gnu packages audio)
@ -219,28 +221,39 @@ console.")
(define-public desmume (define-public desmume
(package (package
(name "desmume") (name "desmume")
(version "0.9.11") (version "0.9.13")
(source (source (origin
(origin (method git-fetch)
(method url-fetch) (uri (git-reference
(uri (string-append (url "https://github.com/TASEmulators/desmume")
"mirror://sourceforge/desmume/desmume/" (commit (string-append "release_"
version "/desmume-" version ".tar.gz")) (string-replace-substring version
(sha256 "." "_")))))
(base32 (file-name (git-file-name name version))
"15l8wdw3q61fniy3h93d84dnm6s4pyadvh95a0j6d580rjk4pcrs")) (sha256
(patches (search-patches "desmume-gcc6-fixes.patch" (base32
"desmume-gcc7-fixes.patch")))) "1ylxv0gjcxwj6dgwly2fjhyr0wrs5yazkim9nvqb8p72mxfwls5y"))))
(build-system gnu-build-system) (build-system meson-build-system)
(arguments (arguments
;; Enable support for WiFi and microphone. (list #:configure-flags #~(list "-Dfrontend-cli=true"
`(#:configure-flags '("--enable-wifi" "-Dfrontend-gtk=true"
"--enable-openal"))) "-Dgdb-stub=true"
(native-inputs "-Dopenal=true")
(list pkg-config intltool)) #:phases #~(modify-phases %standard-phases
(inputs ;; meson.build is in a subdirectory.
(list zlib sdl glib gtk+-2 glu)) (add-after 'unpack 'chdir
(home-page "http://desmume.org/") (lambda _
(chdir "desmume/src/frontend/posix"))))))
(native-inputs (list `(,glib "bin") gettext-minimal intltool pkg-config))
(inputs (list agg
alsa-lib
gtk+
libpcap
openal
sdl2
soundtouch
zlib))
(home-page "https://desmume.org/")
(synopsis "Nintendo DS emulator") (synopsis "Nintendo DS emulator")
(description (description
"DeSmuME is an emulator for the Nintendo DS handheld gaming console.") "DeSmuME is an emulator for the Nintendo DS handheld gaming console.")

View File

@ -1,59 +0,0 @@
From: zeromus
Origin: upstream, https://sourceforge.net/p/desmume/code/5514, https://sourceforge.net/p/desmume/code/5517, https://sourceforge.net/p/desmume/code/5430
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
===================================================================
--- desmume/src/MMU_timing.h (revision 5513)
+++ desmume/src/MMU_timing.h (revision 5517)
@@ -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 };
Index: desmume/src/ctrlssdl.cpp
===================================================================
--- 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) != 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;
Index: desmume/src/wifi.cpp
===================================================================
--- desmume/src/wifi.cpp (revision 5429)
+++ desmume/src/wifi.cpp (revision 5430)
@@ -320,9 +320,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, ...) {}

View File

@ -1,18 +0,0 @@
From e1f7039f1b06add4fb75b2f8774000b8f05574af Mon Sep 17 00:00:00 2001
From: rogerman <rogerman@users.sf.net>
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.cpp
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, const char* src, size_t len
int bytes;
size_t count = 0;
- while (count < len-1 && src != '\0') {
+ while (count < len-1 && *src != '\0') {
bytes = mbrtowc (&tempChar, src, MB_CUR_MAX, &ps);
if (bytes > 0) {
*dst = (ucs2_t)tempChar;