From dc325b42f59a3ab87234a7bb5a9a59d02780197f Mon Sep 17 00:00:00 2001 From: Mathieu Duponchelle Date: Sat, 25 May 2019 12:02:37 +0200 Subject: [PATCH] uninstalled: update XDG_DATA_DIRS to point to our devhelp index When using hotdoc, one can build the documentation for a single subproject (eg. the GL plugins). In that case, hotdoc will look up links in devhelp indexes available in standard locations. To make sure this case works, we thus need to add the path to our devhelp index to XDG_DATA_DIRS. This also means when running devhelp from inside the environment, the devhelp books produced by hotdoc will now show up. --- gst-uninstalled.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gst-uninstalled.py b/gst-uninstalled.py index 6b422eaaa2..f9366f16f6 100755 --- a/gst-uninstalled.py +++ b/gst-uninstalled.py @@ -212,6 +212,16 @@ def get_subprocess_env(options, gst_version): # Add meson/ into PYTHONPATH if we are using a local meson prepend_env_var(env, 'PYTHONPATH', mesonpath) + # For devhelp books + if not 'XDG_DATA_DIRS' in env or not env['XDG_DATA_DIRS']: + # Preserve default paths when empty + prepend_env_var(env, 'XDG_DATA_DIRS', '/usr/local/share/:/usr/share/') + + prepend_env_var (env, 'XDG_DATA_DIRS', os.path.join(options.builddir, + 'subprojects', + 'gst-docs', + 'GStreamer-doc')) + return env def get_windows_shell():