gnu: retroarch: Update to 1.19.1-1.48b71d5.

* gnu/packages/emulators.scm (retroarch): Update to 1.19.1-1.48b71d5.

Change-Id: Icb4c3c8d80be97cf604aec0db2d86f340e31f01e
This commit is contained in:
Maxim Cournoyer 2024-10-03 12:50:32 +09:00
parent bd37990984
commit 0aa36db198
No known key found for this signature in database
GPG key ID: 1260E46482E63562

View file

@ -1579,167 +1579,169 @@ (define-public retroarch-joypad-autoconfig
(license license:expat))) (license license:expat)))
(define-public retroarch-minimal (define-public retroarch-minimal
(package (let ((commit "48b71d5cf8a070e785e2302d8fe241a7c2180fdd")
(name "retroarch-minimal") (revision "1"))
(version "1.19.1") (package
(source (name "retroarch-minimal")
(origin (version "1.19.1")
(method git-fetch) (source
(uri (git-reference (origin
(url "https://github.com/libretro/RetroArch") (method git-fetch)
(commit (string-append "v" version)))) (uri (git-reference
(snippet (url "https://github.com/libretro/RetroArch")
#~(begin (commit commit)))
(use-modules (guix build utils) (snippet
(ice-9 ftw) #~(begin
(srfi srfi-26)) (use-modules (guix build utils)
;; XXX: 'delete-all-but' is copied from the turbovnc package. (ice-9 ftw)
(define (delete-all-but directory . preserve) (srfi srfi-26))
(define (directory? x) ;; XXX: 'delete-all-but' is copied from the turbovnc package.
(and=> (stat x #f) (define (delete-all-but directory . preserve)
(compose (cut eq? 'directory <>) stat:type))) (define (directory? x)
(with-directory-excursion directory (and=> (stat x #f)
(let* ((pred (compose (cut eq? 'directory <>) stat:type)))
(negate (cut member <> (append '("." "..") preserve)))) (with-directory-excursion directory
(items (scandir "." pred))) (let* ((pred
(for-each (lambda (item) (negate (cut member <> (append '("." "..") preserve))))
(if (directory? item) (items (scandir "." pred)))
(delete-file-recursively item) (for-each (lambda (item)
(delete-file item))) (if (directory? item)
items)))) (delete-file-recursively item)
;; Remove as much bundled sources as possible, shaving off about (delete-file item)))
;; 65 MiB. items))))
(delete-all-but "deps" ;; Remove as much bundled sources as possible, shaving off about
"feralgamemode" ;used in platform_unix.c ;; 65 MiB.
"mbedtls" ;further refined below (delete-all-but "deps"
"yxml") ;used in rxml.c "feralgamemode" ;used in platform_unix.c
;; This is an old root certificate used in net_socket_ssl_mbed.c, "mbedtls" ;further refined below
;; not actually from mbedtls. "yxml") ;used in rxml.c
(delete-all-but "deps/mbedtls" "cacert.h"))) ;; This is an old root certificate used in net_socket_ssl_mbed.c,
(file-name (git-file-name name version)) ;; not actually from mbedtls.
(sha256 (delete-all-but "deps/mbedtls" "cacert.h")))
(base32 "15nh4y4vpf4n1ryhiy4fwvzn5xz5idzfzn9fsi5v9hzp25vbjmrm")) (patches (search-patches "retroarch-improved-search-paths.patch"
(patches (search-patches "retroarch-improved-search-paths.patch" "retroarch-unbundle-spirv-cross.patch"))
"retroarch-unbundle-spirv-cross.patch")))) (file-name (git-file-name name version))
(build-system gnu-build-system) (sha256
(arguments (base32 "13hgg4pxkpwlcmmyp9npr9k9cb94waqiyjpy2jzs8m9rc7xl2ap9"))))
(list (build-system gnu-build-system)
#:tests? #f ; no tests (arguments
#:phases (list
#~(modify-phases %standard-phases #:tests? #f ; no tests
(replace 'configure #:phases
(lambda* (#:key inputs #:allow-other-keys) #~(modify-phases %standard-phases
;; Hard-code some store file names. (replace 'configure
(substitute* "gfx/common/vulkan_common.c" (lambda* (#:key inputs #:allow-other-keys)
(("libvulkan.so") ;; Hard-code some store file names.
(search-input-file inputs "lib/libvulkan.so"))) (substitute* "gfx/common/vulkan_common.c"
(substitute* "gfx/common/wayland/generate_wayland_protos.sh" (("libvulkan.so")
(("/usr/local/share/wayland-protocols") (search-input-file inputs "lib/libvulkan.so")))
(search-input-directory inputs "share/wayland-protocols"))) (substitute* "gfx/common/wayland/generate_wayland_protos.sh"
(("/usr/local/share/wayland-protocols")
(search-input-directory inputs "share/wayland-protocols")))
;; Without HLSL, we can still enable GLSLANG and Vulkan support. ;; Without HLSL, we can still enable GLSLANG and Vulkan support.
(substitute* "qb/config.libs.sh" (substitute* "qb/config.libs.sh"
(("[$]HAVE_GLSLANG_HLSL") "notcare")) (("[$]HAVE_GLSLANG_HLSL") "notcare"))
;; The configure script does not yet accept the extra arguments ;; The configure script does not yet accept the extra arguments
;; (like CONFIG_SHELL=) passed by the default configure phase. ;; (like CONFIG_SHELL=) passed by the default configure phase.
(invoke (invoke
"./configure" "./configure"
#$@(if (string-prefix? "armhf" (or (%current-target-system) #$@(if (string-prefix? "armhf" (or (%current-target-system)
(%current-system))) (%current-system)))
'("--enable-neon" "--enable-floathard") '("--enable-neon" "--enable-floathard")
'()) '())
(string-append "--prefix=" #$output) (string-append "--prefix=" #$output)
;; Non-free software are available through the core updater, ;; Non-free software are available through the core updater,
;; disable it. See <https://issues.guix.gnu.org/38360>. ;; disable it. See <https://issues.guix.gnu.org/38360>.
"--disable-update_cores" "--disable-update_cores"
"--disable-update_core_info" "--disable-update_core_info"
"--disable-online_updater" "--disable-online_updater"
;; The assets are provided via the `retroarch-assets' package. ;; The assets are provided via the `retroarch-assets' package.
"--disable-update_assets" "--disable-update_assets"
"--disable-builtinmbedtls" "--disable-builtinmbedtls"
"--disable-builtinbearssl" "--disable-builtinbearssl"
"--disable-builtinzlib" "--disable-builtinzlib"
"--disable-builtinflac" "--disable-builtinflac"
"--disable-builtinglslang" "--disable-builtinglslang"
"--disable-builtinspirv_cross" "--disable-builtinspirv_cross"
;; These are disabled to avoid requiring the bundled ;; These are disabled to avoid requiring the bundled
;; dependencies. ;; dependencies.
"--disable-7zip" "--disable-7zip"
"--disable-cheevos" "--disable-cheevos"
"--disable-crtswitchres" "--disable-crtswitchres"
"--disable-discord" "--disable-discord"
"--disable-dr_mp3" "--disable-dr_mp3"
"--disable-ibxm" "--disable-ibxm"
"--disable-stb_font" "--disable-stb_font"
"--disable-stb_image" "--disable-stb_image"
"--disable-stb_vorbis" "--disable-stb_vorbis"
"--disable-xdelta")))))) "--disable-xdelta"))))))
(native-inputs (native-inputs
(list pkg-config (list pkg-config
wayland-protocols wayland-protocols
which)) which))
(inputs (inputs
(list alsa-lib (list alsa-lib
eudev eudev
ffmpeg ffmpeg
flac flac
fontconfig fontconfig
freetype freetype
glslang glslang
libxinerama libxinerama
libxkbcommon libxkbcommon
libxml2 libxml2
libxrandr libxrandr
libxv libxv
mbedtls-lts mbedtls-lts
mesa mesa
openal openal
openssl openssl
pulseaudio pulseaudio
python python
qtbase-5 qtbase-5
sdl2 sdl2
spirv-cross spirv-cross
spirv-headers spirv-headers
spirv-tools spirv-tools
v4l-utils v4l-utils
vulkan-loader vulkan-loader
wayland wayland
zlib)) zlib))
(native-search-paths (native-search-paths
(list (search-path-specification (list (search-path-specification
(variable "LIBRETRO_DIRECTORY") (variable "LIBRETRO_DIRECTORY")
(separator #f) ;single entry (separator #f) ;single entry
(files '("lib/libretro"))) (files '("lib/libretro")))
(search-path-specification (search-path-specification
(variable "LIBRETRO_ASSETS_DIRECTORY") (variable "LIBRETRO_ASSETS_DIRECTORY")
(separator #f) ;single entry (separator #f) ;single entry
(files '("share/libretro/assets"))) (files '("share/libretro/assets")))
(search-path-specification (search-path-specification
(variable "LIBRETRO_AUTOCONFIG_DIRECTORY") (variable "LIBRETRO_AUTOCONFIG_DIRECTORY")
(separator #f) ;single entry (separator #f) ;single entry
(files '("share/libretro/autoconfig"))) (files '("share/libretro/autoconfig")))
(search-path-specification (search-path-specification
(variable "LIBRETRO_VIDEO_FILTER_DIRECTORY") (variable "LIBRETRO_VIDEO_FILTER_DIRECTORY")
(separator #f) ;single entry (separator #f) ;single entry
(files '("share/libretro/filters/video"))) (files '("share/libretro/filters/video")))
(search-path-specification (search-path-specification
(variable "LIBRETRO_VIDEO_SHADER_DIRECTORY") (variable "LIBRETRO_VIDEO_SHADER_DIRECTORY")
(separator #f) ;single entry (separator #f) ;single entry
(files '("share/libretro/shaders"))))) (files '("share/libretro/shaders")))))
(home-page "https://www.libretro.com/") (home-page "https://www.libretro.com/")
(synopsis "Reference frontend for the libretro API") (synopsis "Reference frontend for the libretro API")
(description (description
"Libretro is a simple but powerful development interface that allows for "Libretro is a simple but powerful development interface that allows for
the easy creation of emulators, games and multimedia applications that can plug the easy creation of emulators, games and multimedia applications that can plug
straight into any libretro-compatible frontend. RetroArch is the official straight into any libretro-compatible frontend. RetroArch is the official
reference frontend for the libretro API, currently used by most as a modular reference frontend for the libretro API, currently used by most as a modular
multi-system game/emulator system.") multi-system game/emulator system.")
(license (list license:gpl3+ ;for RetroArch itself (license (list license:gpl3+ ;for RetroArch itself
license:asl2.0 ;SPIRV-Cross license:asl2.0 ;SPIRV-Cross
license:expat ;yxml license:expat ;yxml
license:bsd-3)))) ;feragamemode license:bsd-3))))) ;feragamemode
(define-public retroarch (define-public retroarch
(package (package