From d43fd988c5cbadfb621bc605657bfa0b20d98d08 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Fri, 27 Sep 2024 11:54:46 +0900 Subject: gnu: retroarch: Use gexps. * gnu/packages/emulators.scm (retroarch) [arguments] : Use gexps; locate resources using `search-input-file' and `search-input-directory'. Change-Id: I0b1c4ff074e6f8287c14ac3327a8d0271391fec2 --- gnu/packages/emulators.scm | 70 ++++++++++++++++++++++------------------------ 1 file changed, 34 insertions(+), 36 deletions(-) diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm index a1e5a1f0c9..92156f10df 100644 --- a/gnu/packages/emulators.scm +++ b/gnu/packages/emulators.scm @@ -1592,43 +1592,41 @@ physical device and the RetroPad virtual controller.") (base32 "15nh4y4vpf4n1ryhiy4fwvzn5xz5idzfzn9fsi5v9hzp25vbjmrm")))) (build-system gnu-build-system) (arguments - `(#:tests? #f ; no tests - #:phases - (modify-phases %standard-phases - (replace 'configure - (lambda* (#:key inputs outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (etc (string-append out "/etc")) - (vulkan (assoc-ref inputs "vulkan-loader")) - (wayland-protocols (assoc-ref inputs "wayland-protocols"))) - ;; Hard-code some store file names. - (substitute* "gfx/common/vulkan_common.c" - (("libvulkan.so") (string-append vulkan "/lib/libvulkan.so"))) - (substitute* "gfx/common/wayland/generate_wayland_protos.sh" - (("/usr/local/share/wayland-protocols") - (string-append wayland-protocols "/share/wayland-protocols"))) - - ;; Without HLSL, we can still enable GLSLANG and Vulkan support. - (substitute* "qb/config.libs.sh" - (("[$]HAVE_GLSLANG_HLSL") "notcare")) - - ;; The configure script does not yet accept the extra arguments - ;; (like ‘CONFIG_SHELL=’) passed by the default configure phase. - (invoke - "./configure" - ,@(if (string-prefix? "armhf" (or (%current-target-system) + (list + #:tests? #f ; no tests + #:phases + #~(modify-phases %standard-phases + (replace 'configure + (lambda* (#:key inputs #:allow-other-keys) + ;; Hard-code some store file names. + (substitute* "gfx/common/vulkan_common.c" + (("libvulkan.so") + (search-input-file inputs "lib/libvulkan.so"))) + (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. + (substitute* "qb/config.libs.sh" + (("[$]HAVE_GLSLANG_HLSL") "notcare")) + + ;; The configure script does not yet accept the extra arguments + ;; (like ‘CONFIG_SHELL=’) passed by the default configure phase. + (invoke + "./configure" + #$@(if (string-prefix? "armhf" (or (%current-target-system) (%current-system))) - '("--enable-neon" "--enable-floathard") - '()) - (string-append "--prefix=" out) - ;; Non-free software are available through the core updater, - ;; disable it. See . - "--disable-update_cores" - "--disable-builtinmbedtls" - "--disable-builtinbearssl" - "--disable-builtinzlib" - "--disable-builtinflac" - "--disable-builtinglslang"))))))) + '("--enable-neon" "--enable-floathard") + '()) + (string-append "--prefix=" #$output) + ;; Non-free software are available through the core updater, + ;; disable it. See . + "--disable-update_cores" + "--disable-builtinmbedtls" + "--disable-builtinbearssl" + "--disable-builtinzlib" + "--disable-builtinflac" + "--disable-builtinglslang")))))) (inputs (list alsa-lib eudev -- cgit v1.2.3