From 60585d28126f61fc13be2079227ce926550cdce4 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Mon, 21 Aug 2017 11:57:29 -0300 Subject: [PATCH] Handle a prefix in prefix/ This is usefull to use external libs and tool not buildable with meson inside our environment --- .gitignore | 1 + README.md | 3 +++ gst-uninstalled.py | 9 +++++++++ 3 files changed, 13 insertions(+) diff --git a/.gitignore b/.gitignore index 3dae67b572..7120f9a6c2 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,4 @@ subprojects/gst-rtsp-server/ subprojects/gstreamer/ subprojects/gstreamer-vaapi/ subprojects/glib/ +prefix/ diff --git a/README.md b/README.md index 11d38d438d..0a0f9d93fe 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,9 @@ available at the root of `gst-build/` for example GStreamer core will be in `gstreamer/`. Otherwise they will be present in `subprojects/`. You can simply hack in there and to rebuild you just need to rerun `ninja -C build/`. +NOTE: In the uninstalled environment, a fully usable prefix is also configured +in `gst-build/prefix` where you can install any extra dependency/project. + ## Update git subprojects We added a special `update` target to update subprojects (it uses `git pull diff --git a/gst-uninstalled.py b/gst-uninstalled.py index a773801ad7..7823cf6271 100755 --- a/gst-uninstalled.py +++ b/gst-uninstalled.py @@ -14,6 +14,7 @@ import tempfile from common import get_meson SCRIPTDIR = os.path.abspath(os.path.dirname(__file__)) +PREFIX_DIR = os.path.join(SCRIPTDIR, 'prefix') def prepend_env_var(env, var, value): @@ -56,6 +57,14 @@ def get_subprocess_env(options): prepend_env_var(env, "GST_PLUGIN_PATH", os.path.join(SCRIPTDIR, 'subprojects', 'gst-python', 'plugin')) + prepend_env_var(env, "GST_PLUGIN_PATH", os.path.join(PREFIX_DIR, 'lib', + 'gstreamer-1.0')) + prepend_env_var(env, "PATH", os.path.join(PREFIX_DIR, 'bin')) + prepend_env_var(env, lib_path_envvar, os.path.join(PREFIX_DIR, 'lib')) + prepend_env_var(env, "GST_VALIDATE_SCENARIOS_PATH", os.path.join( + PREFIX_DIR, 'share', 'gstreamer-1.0', 'validate', 'scenarios')) + prepend_env_var(env, "GI_TYPELIB_PATH", os.path.join(PREFIX_DIR, 'lib', + 'lib', 'girepository-1.0')) meson, mesonconf, mesonintrospect = get_meson() targets_s = subprocess.check_output([sys.executable, mesonintrospect, options.builddir, '--targets'])