Subject: Re: [bug#73522] [PATCH games-team 07/14] gnu: retroarch: Extend search-path support.

From: Liliana Marie Prikler <[email-masked]>
Date: Sun, 06 Oct 2024 08:58:04 +0200

Am Sonntag, dem 06.10.2024 um 14:32 +0900 schrieb Maxim Cournoyer:
> * gnu/packages/patches/retroarch-improved-search-paths.patch: New
> file.
> * gnu/local.mk (dist_patch_DATA): Register it.
> * gnu/packages/emulators.scm (retroarch) [source]: Apply patch.
> [configure-flags]: Add '--disable-update_assets'.
> [native-search-paths]: New search paths for
> LIBRETRO_ASSETS_DIRECTORY,
> LIBRETRO_AUTOCONFIG_DIRECTORY, LIBRETRO_VIDEO_FILTER_DIRECTORY and
> LIBRETRO_VIDEO_SHADER_DIRECTORY.
> 
> Fixes: https://issues.guix.gnu.org/38439
> Change-Id: I593c223ad887277e4637adc8d7ef7439f9ced611
> ---
> 
>  gnu/local.mk                                  |   1 +
>  gnu/packages/emulators.scm                    |  29 +-
>  .../retroarch-improved-search-paths.patch     | 298
> ++++++++++++++++++
>  3 files changed, 324 insertions(+), 4 deletions(-)
>  create mode 100644 gnu/packages/patches/retroarch-improved-search-
> paths.patch
> 
> diff --git a/gnu/local.mk b/gnu/local.mk
> index 2adf196a87..937e2753f1 100644
> --- a/gnu/local.mk
> +++ b/gnu/local.mk
> @@ -2099,6 +2099,7 @@ dist_patch_DATA
> =                                         \
>    %D%/packages/patches/remake-impure-
> dirs.patch                        \
>    %D%/packages/patches/restartd-update-robust.patch             \
>    %D%/packages/patches/restic-0.9.6-fix-tests-for-go1.15.patch \
> +  %D%/packages/patches/retroarch-improved-search-paths.patch   \
>    %D%/packages/patches/rng-tools-revert-build-randstat.patch   \
>    %D%/packages/patches/rocclr-5.6.0-enable-
> gfx800.patch                \
>    %D%/packages/patches/rocm-bandwidth-test-5.5.0-fix-
> includes.patch    \
> diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm
> index e6cf365e26..50819d9e83 100644
> --- a/gnu/packages/emulators.scm
> +++ b/gnu/packages/emulators.scm
> @@ -1624,6 +1624,7 @@ (define-public retroarch
>              ;; This is an old root certificate used in
> net_socket_ssl_mbed.c,
>              ;; not actually from mbedtls.
>              (delete-all-but "deps/mbedtls" "cacert.h")))
> +       (patches (search-patches "retroarch-improved-search-
> paths.patch"))
>         (file-name (git-file-name name version))
>         (sha256
>          (base32
> "15nh4y4vpf4n1ryhiy4fwvzn5xz5idzfzn9fsi5v9hzp25vbjmrm"))))
> @@ -1659,11 +1660,17 @@ (define-public retroarch
>                 ;; Non-free software are available through the core
> updater,
>                 ;; disable it.  See
> <https://issues.guix.gnu.org/38360>.
>                 "--disable-update_cores"
> +               ;; The assets are provided via the `retroarch-assets'
> package.
> +               "--disable-update_assets"
>                 "--disable-builtinmbedtls"
>                 "--disable-builtinbearssl"
>                 "--disable-builtinzlib"
>                 "--disable-builtinflac"
>                 "--disable-builtinglslang"))))))
> +    (native-inputs
> +     (list pkg-config
> +           wayland-protocols
> +           which))
>      (inputs
>       (list alsa-lib
>             eudev
> @@ -1691,13 +1698,27 @@ (define-public retroarch
>             vulkan-loader
>             wayland
>             zlib))
> -    (native-inputs
> -     (list pkg-config wayland-protocols which))
>      (native-search-paths
>       (list (search-path-specification
>              (variable "LIBRETRO_DIRECTORY")
> -            (separator #f)              ; single entry
> -            (files '("lib/libretro")))))
> +            (separator #f)              ;single entry
> +            (files '("lib/libretro")))
> +           (search-path-specification
> +            (variable "LIBRETRO_ASSETS_DIRECTORY")
> +            (separator #f)              ;single entry
> +            (files '("share/libretro/assets")))
> +           (search-path-specification
> +            (variable "LIBRETRO_AUTOCONFIG_DIRECTORY")
> +            (separator #f)              ;single entry
> +            (files '("share/libretro/autoconfig")))
> +           (search-path-specification
> +            (variable "LIBRETRO_VIDEO_FILTER_DIRECTORY")
> +            (separator #f)              ;single entry
> +            (files '("share/libretro/filters/video")))
> +           (search-path-specification
> +            (variable "LIBRETRO_VIDEO_SHADER_DIRECTORY")
> +            (separator #f)              ;single entry
> +            (files '("share/libretro/shaders")))))
Can we make some of those colon-separated paths?

Cheers