Subject: [PATCH v3 04/11] gnu: retroarch-minimal: Add new search paths.

From: Maxim Cournoyer <[email-masked]>
Date: Mon, 20 Jan 2025 23:28:26 +0900

This makes it possible to locate system files provided by libretro cores, as
well as database and cheat files.

* gnu/packages/patches/retroarch-improved-search-paths.patch: Extend patch.
* gnu/packages/emulators.scm (retroarch-minimal) [native-search-paths]:
Register new search paths for the LIBRETRO_CHEATS_DIRECTORY,
LIBRETRO_DATABASE_DIRECTORY and LIBRETRO_SYSTEM_DIRECTORY variables.

Change-Id: I48f9a92608c0e36922ce9dcc9bbb61d6ca915002
---
New in v3: add support for LIBRETRO_CHEATS_DIRECTORY env var.

 gnu/packages/emulators.scm                    |  12 +
 .../retroarch-improved-search-paths.patch     | 210 ++++++++++++++----
 2 files changed, 181 insertions(+), 41 deletions(-)

diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm
index 52c59b3965..bc1c8541b0 100644
--- a/gnu/packages/emulators.scm
+++ b/gnu/packages/emulators.scm
@@ -2632,6 +2632,18 @@ (define-public retroarch-minimal
               (variable "LIBRETRO_AUTOCONFIG_DIRECTORY")
               (separator #f)            ;single entry
               (files '("share/libretro/autoconfig")))
+             (search-path-specification
+              (variable "LIBRETRO_CHEATS_DIRECTORY")
+              (separator #f)            ;single entry
+              (files '("share/libretro/database/cht")))
+             (search-path-specification
+              (variable "LIBRETRO_DATABASE_DIRECTORY")
+              (separator #f)            ;single entry
+              (files '("share/libretro/database/rdb")))
+             (search-path-specification
+              (variable "LIBRETRO_SYSTEM_DIRECTORY")
+              (separator #f)            ;single entry
+              (files '("share/libretro/system")))
              (search-path-specification
               (variable "LIBRETRO_VIDEO_FILTER_DIRECTORY")
               (separator #f)            ;single entry
diff --git a/gnu/packages/patches/retroarch-improved-search-paths.patch b/gnu/packages/patches/retroarch-improved-search-paths.patch
index 6fcd4745ac..ae815bfbb1 100644
--- a/gnu/packages/patches/retroarch-improved-search-paths.patch
+++ b/gnu/packages/patches/retroarch-improved-search-paths.patch
@@ -1,38 +1,27 @@
-Allows discovery of assets file via the LIBRETRO_ASSETS_DIRECTORY environment
-variable.
+Add support for various environment variables, used in search paths.
 
-Upstream-status: https://github.com/libretro/RetroArch/pull/17054
+Upstream status: https://github.com/libretro/RetroArch/pull/17440
 
 diff --git a/configuration.c b/configuration.c
-index 5808a3f21c..0cc2909102 100644
+index 7eb6c08e1e..0449e77ac2 100644
 --- a/configuration.c
 +++ b/configuration.c
-@@ -3573,6 +3573,11 @@ static bool config_load_file(global_t *global,
+@@ -3568,6 +3568,14 @@ static bool config_load_file(global_t *global,
  {
     unsigned i;
     char tmp_str[PATH_MAX_LENGTH];
 +   char* libretro_directory                        = NULL;
 +   char* libretro_assets_directory                 = NULL;
 +   char* libretro_autoconfig_directory             = NULL;
++   char* libretro_cheats_directory                 = NULL;
++   char* libretro_database_directory               = NULL;
++   char* libretro_system_directory                 = NULL;
 +   char* libretro_video_filter_directory           = NULL;
 +   char* libretro_video_shader_directory           = NULL;
     static bool first_load                          = true;
     bool without_overrides                          = false;
     unsigned msg_color                              = 0;
-@@ -3848,12 +3853,6 @@ static bool config_load_file(global_t *global,
-          strlcpy(path_settings[i].ptr, tmp_str, PATH_MAX_LENGTH);
-    }
- 
--#if !IOS
--   if (config_get_path(conf, "libretro_directory", tmp_str, sizeof(tmp_str)))
--      configuration_set_string(settings,
--            settings->paths.directory_libretro, tmp_str);
--#endif
--
- #ifdef RARCH_CONSOLE
-    if (conf)
-       video_driver_load_settings(global, conf);
-@@ -3861,6 +3860,20 @@ static bool config_load_file(global_t *global,
+@@ -3862,6 +3870,38 @@ static bool config_load_file(global_t *global,
  
     /* Post-settings load */
  
@@ -45,15 +34,33 @@ index 5808a3f21c..0cc2909102 100644
 +   }
 +
 +   libretro_autoconfig_directory = getenv("LIBRETRO_AUTOCONFIG_DIRECTORY");
-+   if (libretro_autoconfig_directory)
++   if (libretro_autoconfig_directory) /* override configuration value */
 +       configuration_set_string(settings,
 +				settings->paths.directory_autoconfig,
 +				libretro_autoconfig_directory);
++
++   libretro_cheats_directory = getenv("LIBRETRO_CHEATS_DIRECTORY");
++   if (libretro_cheats_directory) /* override configuration value */
++       configuration_set_string(settings,
++				settings->paths.path_cheat_database,
++				libretro_cheats_directory);
++
++   libretro_database_directory = getenv("LIBRETRO_DATABASE_DIRECTORY");
++   if (libretro_database_directory) /* override configuration value */
++       configuration_set_string(settings,
++				settings->paths.path_content_database,
++				libretro_database_directory);
++
++   libretro_system_directory = getenv("LIBRETRO_SYSTEM_DIRECTORY");
++   if (libretro_system_directory) /* override configuration value */
++       configuration_set_string(settings,
++				settings->paths.directory_system,
++				libretro_system_directory);
 +
     if (     (rarch_flags & RARCH_FLAGS_HAS_SET_USERNAME)
           && (override_username))
     {
-@@ -4032,15 +4045,27 @@ static bool config_load_file(global_t *global,
+@@ -4026,15 +4066,27 @@ static bool config_load_file(global_t *global,
        *settings->paths.path_menu_wallpaper = '\0';
     if (string_is_equal(settings->paths.path_rgui_theme_preset, "default"))
        *settings->paths.path_rgui_theme_preset = '\0';
@@ -85,18 +92,18 @@ index 5808a3f21c..0cc2909102 100644
  #ifdef _3DS
     if (string_is_equal(settings->paths.directory_bottom_assets, "default"))
 diff --git a/docs/retroarch.6 b/docs/retroarch.6
-index 7478040e17..f864e0e0d5 100644
+index 7478040e17..d38a8ee565 100644
 --- a/docs/retroarch.6
 +++ b/docs/retroarch.6
 @@ -1,6 +1,6 @@
  .\" retroarch.6:
  
 -.TH  "RETROARCH" "6" "November 1, 2011" "RETROARCH" "System Manager's Manual: retroarch"
-+.TH  "RETROARCH" "6" "September 28, 2024" "RETROARCH" "System Manager's Manual: retroarch"
++.TH  "RETROARCH" "6" "January 20, 2025" "RETROARCH" "System Manager's Manual: retroarch"
  
  .SH NAME
  
-@@ -239,3 +239,36 @@ Disables all kinds of content patching.
+@@ -239,3 +239,54 @@ Disables all kinds of content patching.
  .TP
  \fB-D, --detach\fR
  Detach from the current console. This is currently only relevant for Microsoft Windows.
@@ -123,6 +130,24 @@ index 7478040e17..f864e0e0d5 100644
 +"joypad_autoconfig_dir" configuration file option.
 +
 +.TP
++\fBLIBRETRO_CHEATS_DIRECTORY\fR
++Specify the directory where RetroArch looks for cheat files,
++overriding the value of the "cheat_database_path" configuration file
++option.
++
++.TP
++\fBLIBRETRO_DATABASE_DIRECTORY\fR
++Specify the directory where RetroArch looks for database files,
++overriding the value of the "content_database_path" configuration file
++option.
++
++.TP
++\fBLIBRETRO_SYSTEM_DIRECTORY\fR
++Specify the directory where RetroArch looks for system files,
++overriding the value of the "system_directory" configuration file
++option.
++
++.TP
 +\fBLIBRETRO_VIDEO_FILTER_DIRECTORY\fR
 +Specify the directory where RetroArch looks for video filters,
 +overriding the value of the "video_filter_dir" configuration file
@@ -134,21 +159,24 @@ index 7478040e17..f864e0e0d5 100644
 +overriding the value of the "video_shader_dir" configuration file
 +option.
 diff --git a/frontend/drivers/platform_unix.c b/frontend/drivers/platform_unix.c
-index c157d355a1..ddf0b5ca87 100644
+index 778f54eeda..cce011c875 100644
 --- a/frontend/drivers/platform_unix.c
 +++ b/frontend/drivers/platform_unix.c
-@@ -1324,6 +1324,10 @@ static void frontend_unix_get_env(int *argc,
+@@ -1323,6 +1323,13 @@ static void frontend_unix_get_env(int *argc,
  {
     unsigned i;
     const char* libretro_directory = getenv("LIBRETRO_DIRECTORY");
 +   const char* libretro_assets_directory = getenv("LIBRETRO_ASSETS_DIRECTORY");
 +   const char* libretro_autoconfig_directory = getenv("LIBRETRO_AUTOCONFIG_DIRECTORY");
++   const char* libretro_cheats_directory = getenv("LIBRETRO_CHEATS_DIRECTORY");
++   const char* libretro_database_directory = getenv("LIBRETRO_DATABASE_DIRECTORY");
++   const char* libretro_system_directory = getenv("LIBRETRO_SYSTEM_DIRECTORY");
 +   const char* libretro_video_filter_directory = getenv("LIBRETRO_VIDEO_FILTER_DIRECTORY");
 +   const char* libretro_video_shader_directory = getenv("LIBRETRO_VIDEO_SHADER_DIRECTORY");
  #ifdef ANDROID
     int32_t major, minor, rel;
     char device_model[PROP_VALUE_MAX]  = {0};
-@@ -1765,12 +1769,20 @@ static void frontend_unix_get_env(int *argc,
+@@ -1764,12 +1771,20 @@ static void frontend_unix_get_env(int *argc,
              "cores", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_INFO]));
     else
  #endif
@@ -174,7 +202,7 @@ index c157d355a1..ddf0b5ca87 100644
  #ifdef ASSETS_DIR
     if (path_is_directory(ASSETS_DIR "/assets"))
        fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_ASSETS],
-@@ -1778,7 +1790,10 @@ static void frontend_unix_get_env(int *argc,
+@@ -1777,7 +1792,10 @@ static void frontend_unix_get_env(int *argc,
              "assets", sizeof(g_defaults.dirs[DEFAULT_DIR_ASSETS]));
     else
  #endif
@@ -186,7 +214,7 @@ index c157d355a1..ddf0b5ca87 100644
        fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_ASSETS],
              "/usr/local/share/retroarch",
              "assets", sizeof(g_defaults.dirs[DEFAULT_DIR_ASSETS]));
-@@ -1838,7 +1853,11 @@ static void frontend_unix_get_env(int *argc,
+@@ -1837,7 +1855,11 @@ static void frontend_unix_get_env(int *argc,
              "filters/video", sizeof(g_defaults.dirs[DEFAULT_DIR_VIDEO_FILTER]));
     else
  #endif
@@ -199,12 +227,23 @@ index c157d355a1..ddf0b5ca87 100644
        fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_VIDEO_FILTER],
              "/usr/local/share/retroarch",
              "filters/video", sizeof(g_defaults.dirs[DEFAULT_DIR_VIDEO_FILTER]));
-@@ -1872,8 +1891,13 @@ static void frontend_unix_get_env(int *argc,
+@@ -1869,12 +1891,27 @@ static void frontend_unix_get_env(int *argc,
+          "records_config", sizeof(g_defaults.dirs[DEFAULT_DIR_RECORD_CONFIG]));
+    fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_RECORD_OUTPUT], base_path,
           "records", sizeof(g_defaults.dirs[DEFAULT_DIR_RECORD_OUTPUT]));
-    fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_DATABASE], base_path,
-          "database/rdb", sizeof(g_defaults.dirs[DEFAULT_DIR_DATABASE]));
+-   fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_DATABASE], base_path,
+-         "database/rdb", sizeof(g_defaults.dirs[DEFAULT_DIR_DATABASE]));
 -   fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_SHADER], base_path,
 -         "shaders", sizeof(g_defaults.dirs[DEFAULT_DIR_SHADER]));
+-   fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CHEATS], base_path,
+-         "cheats", sizeof(g_defaults.dirs[DEFAULT_DIR_CHEATS]));
++   if (!string_is_empty(libretro_database_directory))
++       strlcpy(g_defaults.dirs[DEFAULT_DIR_DATABASE],
++	       libretro_database_directory,
++	       sizeof(g_defaults.dirs[DEFAULT_DIR_DATABASE]));
++   else
++       fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_DATABASE], base_path,
++             "database/rdb", sizeof(g_defaults.dirs[DEFAULT_DIR_DATABASE]));
 +   if (!string_is_empty(libretro_video_shader_directory))
 +       strlcpy(g_defaults.dirs[DEFAULT_DIR_SHADER],
 +	       libretro_video_shader_directory,
@@ -212,19 +251,45 @@ index c157d355a1..ddf0b5ca87 100644
 +   else
 +       fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_SHADER], base_path,
 +             "shaders", sizeof(g_defaults.dirs[DEFAULT_DIR_SHADER]));
-    fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CHEATS], base_path,
-          "cheats", sizeof(g_defaults.dirs[DEFAULT_DIR_CHEATS]));
++   if (!string_is_empty(libretro_cheats_directory))
++       strlcpy(g_defaults.dirs[DEFAULT_DIR_CHEATS],
++	       libretro_cheats_directory,
++	       sizeof(g_defaults.dirs[DEFAULT_DIR_CHEATS]));
++   else
++       fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CHEATS], base_path,
++             "cheats", sizeof(g_defaults.dirs[DEFAULT_DIR_CHEATS]));
     fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_OVERLAY], base_path,
+          "overlays", sizeof(g_defaults.dirs[DEFAULT_DIR_OVERLAY]));
+    fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_OSK_OVERLAY], base_path,
+@@ -1891,8 +1928,13 @@ static void frontend_unix_get_env(int *argc,
+          "saves", sizeof(g_defaults.dirs[DEFAULT_DIR_SRAM]));
+    fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_SAVESTATE], base_path,
+          "states", sizeof(g_defaults.dirs[DEFAULT_DIR_SAVESTATE]));
+-   fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_SYSTEM], base_path,
+-         "system", sizeof(g_defaults.dirs[DEFAULT_DIR_SYSTEM]));
++   if (!string_is_empty(libretro_system_directory))
++       strlcpy(g_defaults.dirs[DEFAULT_DIR_SYSTEM],
++	       libretro_system_directory,
++	       sizeof(g_defaults.dirs[DEFAULT_DIR_SYSTEM]));
++   else
++       fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_SYSTEM], base_path,
++             "system", sizeof(g_defaults.dirs[DEFAULT_DIR_SYSTEM]));
+ #endif
+ 
+ #ifndef IS_SALAMANDER
 diff --git a/frontend/drivers/platform_win32.c b/frontend/drivers/platform_win32.c
-index 26ed25c04f..0cc9a9dc95 100644
+index adb27b425c..f12fb8717e 100644
 --- a/frontend/drivers/platform_win32.c
 +++ b/frontend/drivers/platform_win32.c
-@@ -565,24 +565,38 @@ static void frontend_win32_env_get(int *argc, char *argv[],
+@@ -566,24 +566,51 @@ static void frontend_win32_env_get(int *argc, char *argv[],
  {
     const char *tmp_dir = getenv("TMP");
     const char *libretro_directory = getenv("LIBRETRO_DIRECTORY");
 +   const char *libretro_assets_directory = getenv("LIBRETRO_ASSETS_DIRECTORY");
 +   const char* libretro_autoconfig_directory = getenv("LIBRETRO_AUTOCONFIG_DIRECTORY");
++   const char* libretro_cheats_directory = getenv("LIBRETRO_CHEATS_DIRECTORY");
++   const char* libretro_database_directory = getenv("LIBRETRO_DATABASE_DIRECTORY");
++   const char* libretro_system_directory = getenv("LIBRETRO_SYSTEM_DIRECTORY");
 +   const char* libretro_video_filter_directory = getenv("LIBRETRO_VIDEO_FILTER_DIRECTORY");
 +   const char* libretro_video_shader_directory = getenv("LIBRETRO_VIDEO_SHADER_DIRECTORY");
     if (!string_is_empty(tmp_dir))
@@ -246,6 +311,10 @@ index 26ed25c04f..0cc9a9dc95 100644
        ":\\filters\\audio", sizeof(g_defaults.dirs[DEFAULT_DIR_AUDIO_FILTER]));
 -   fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_VIDEO_FILTER],
 -      ":\\filters\\video", sizeof(g_defaults.dirs[DEFAULT_DIR_VIDEO_FILTER]));
+-   fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_CHEATS],
+-      ":\\cheats", sizeof(g_defaults.dirs[DEFAULT_DIR_CHEATS]));
+-   fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_DATABASE],
+-      ":\\database\\rdb", sizeof(g_defaults.dirs[DEFAULT_DIR_DATABASE]));
 +   if (!string_is_empty(libretro_video_filter_directory))
 +       strlcpy(g_defaults.dirs[DEFAULT_DIR_VIDEO_FILTER],
 +	       libretro_video_filter_directory,
@@ -253,17 +322,27 @@ index 26ed25c04f..0cc9a9dc95 100644
 +   else
 +       fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_VIDEO_FILTER],
 +           ":\\filters\\video", sizeof(g_defaults.dirs[DEFAULT_DIR_VIDEO_FILTER]));
-    fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_CHEATS],
-       ":\\cheats", sizeof(g_defaults.dirs[DEFAULT_DIR_CHEATS]));
-    fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_DATABASE],
-       ":\\database\\rdb", sizeof(g_defaults.dirs[DEFAULT_DIR_DATABASE]));
++   if (!string_is_empty(libretro_cheats_directory))
++       strlcpy(g_defaults.dirs[DEFAULT_DIR_CHEATS],
++	       libretro_cheats_directory,
++	       sizeof(g_defaults.dirs[DEFAULT_DIR_CHEATS]));
++   else
++       fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_CHEATS],
++           ":\\cheats", sizeof(g_defaults.dirs[DEFAULT_DIR_CHEATS]));
++   if (!string_is_empty(libretro_database_directory))
++       strlcpy(g_defaults.dirs[DEFAULT_DIR_DATABASE],
++	       libretro_database_directory,
++	       sizeof(g_defaults.dirs[DEFAULT_DIR_DATABASE]));
++   else
++       fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_DATABASE],
++           ":\\database\\rdb", sizeof(g_defaults.dirs[DEFAULT_DIR_DATABASE]));
     fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_PLAYLIST],
 -      ":\\playlists", sizeof(g_defaults.dirs[DEFAULT_DIR_ASSETS]));
 +      ":\\playlists", sizeof(g_defaults.dirs[DEFAULT_DIR_PLAYLIST]));
     fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_RECORD_CONFIG],
        ":\\config\\record", sizeof(g_defaults.dirs[DEFAULT_DIR_RECORD_CONFIG]));
     fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_RECORD_OUTPUT],
-@@ -605,12 +619,26 @@ static void frontend_win32_env_get(int *argc, char *argv[],
+@@ -606,12 +633,26 @@ static void frontend_win32_env_get(int *argc, char *argv[],
     else
        fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_CORE],
              ":\\cores", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE]));
@@ -296,3 +375,52 @@ index 26ed25c04f..0cc9a9dc95 100644
     fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_CORE_ASSETS],
        ":\\downloads", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_ASSETS]));
     fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_SCREENSHOT],
+@@ -620,8 +661,13 @@ static void frontend_win32_env_get(int *argc, char *argv[],
+       ":\\saves", sizeof(g_defaults.dirs[DEFAULT_DIR_SRAM]));
+    fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_SAVESTATE],
+       ":\\states", sizeof(g_defaults.dirs[DEFAULT_DIR_SAVESTATE]));
+-   fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_SYSTEM],
+-      ":\\system", sizeof(g_defaults.dirs[DEFAULT_DIR_SYSTEM]));
++   if (!string_is_empty(libretro_system_directory))
++       strlcpy(g_defaults.dirs[DEFAULT_DIR_SYSTEM],
++	       libretro_system_directory,
++	       sizeof(g_defaults.dirs[DEFAULT_DIR_SYSTEM]));
++   else
++       fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_SYSTEM],
++             ":\\system", sizeof(g_defaults.dirs[DEFAULT_DIR_SYSTEM]));
+    fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_LOGS],
+       ":\\logs", sizeof(g_defaults.dirs[DEFAULT_DIR_LOGS]));
+ 
+diff --git a/retroarch.c b/retroarch.c
+index a7e5f5299f..59d7879ec5 100644
+--- a/retroarch.c
++++ b/retroarch.c
+@@ -6516,7 +6516,28 @@ static void retroarch_print_help(const char *arg0)
+          "Path for the save state files (*.state). (DEPRECATED, use --appendconfig and savestate_directory)\n"
+          , sizeof(buf) - _len);
+ 
++   /* Flush buffer here to avoid the error "error: string length ‘752’
++    * is greater than the length ‘509’ ISO C90 compilers are required
++    * to support" */
+    fputs(buf, stdout);
++
++#if defined(__linux__) || defined(__GNU__) || (defined(BSD) && !defined(__MACH__))
++   buf[0] = '\0';
++   _len   = 0;
++   _len += strlcpy(buf + _len,
++         "\nThe following environment variables are supported:\n\n"
++         "  LIBRETRO_ASSETS_DIRECTORY\n"
++         "  LIBRETRO_AUTOCONFIG_DIRECTORY\n"
++         "  LIBRETRO_CHEATS_DIRECTORY\n"
++         "  LIBRETRO_DATABASE_DIRECTORY\n"
++         "  LIBRETRO_DIRECTORY\n"
++         "  LIBRETRO_SYSTEM_DIRECTORY\n"
++         "  LIBRETRO_VIDEO_FILTER_DIRECTORY\n"
++         "  LIBRETRO_VIDEO_SHADER_DIRECTORY\n\n"
++         "Refer to `man 6 retroarch' for a description of what they do.\n"
++         , sizeof(buf) - _len);
++   fputs(buf, stdout);
++#endif
+ }
+ 
+ #ifdef HAVE_DYNAMIC
-- 
2.47.1