Handle a prefix in prefix/
authorThibault Saunier <thibault.saunier@osg.samsung.com>
Mon, 21 Aug 2017 14:57:29 +0000 (11:57 -0300)
committerThibault Saunier <thibault.saunier@osg.samsung.com>
Wed, 6 Sep 2017 19:10:03 +0000 (16:10 -0300)
This is usefull to use external libs and tool not buildable with meson
inside our environment

.gitignore
README.md
gst-uninstalled.py

index 3dae67b..7120f9a 100644 (file)
@@ -26,3 +26,4 @@ subprojects/gst-rtsp-server/
 subprojects/gstreamer/
 subprojects/gstreamer-vaapi/
 subprojects/glib/
+prefix/
index 11d38d4..0a0f9d9 100644 (file)
--- 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
index a773801..7823cf6 100755 (executable)
@@ -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'])