[pitivi] build: Set GST_PLUGIN_SYSTEM_PATH in the sandbox
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] build: Set GST_PLUGIN_SYSTEM_PATH in the sandbox
- Date: Wed, 24 Aug 2016 14:03:55 +0000 (UTC)
commit adecf3d9be02f9c85c2bd42892211e6f22fbbd40
Author: Thibault Saunier <tsaunier gnome org>
Date: Sun Aug 14 14:36:54 2016 -0700
build: Set GST_PLUGIN_SYSTEM_PATH in the sandbox
So that gstramer does not try to work with plugins provided by the gnome
runtime.
bin/pitivi.in | 4 ++++
build/flatpak/pitivi.template.json | 3 ++-
getenvvar.py | 7 +++++++
meson.build | 16 ++++++++++++----
4 files changed, 25 insertions(+), 5 deletions(-)
---
diff --git a/bin/pitivi.in b/bin/pitivi.in
index ef510e6..1dd1eb8 100755
--- a/bin/pitivi.in
+++ b/bin/pitivi.in
@@ -36,6 +36,7 @@ CONFIGURED_PYTHONPATH = '@CONFIGURED_PYTHONPATH@'
CONFIGURED_GI_TYPELIB_PATH = '@CONFIGURED_GI_TYPELIB_PATH@'
CONFIGURED_LD_LIBRARY_PATH = '@CONFIGURED_LD_LIBRARY_PATH@'
CONFIGURED_GST_PLUGIN_PATH = '@CONFIGURED_GST_PLUGIN_PATH@'
+CONFIGURED_GST_PLUGIN_SYSTEM_PATH = '@CONFIGURED_GST_PLUGIN_SYSTEM_PATH@'
LIBDIR = '@LIBDIR@'
DATADIR = '@DATADIR@'
BUILDDIR = '@BUILDDIR@'
@@ -100,6 +101,9 @@ def _add_pitivi_path():
# ld caches LD_LIBRARY_PATH at startup so we need to execv() here. LALA.
jump_through_hoops()
+ if CONFIGURED_GST_PLUGIN_SYSTEM_PATH:
+ os.environ["GST_PLUGIN_SYSTEM_PATH"] = CONFIGURED_GST_PLUGIN_SYSTEM_PATH
+
if CONFIGURED_GI_TYPELIB_PATH:
_prepend_env_path("GI_TYPELIB_PATH", [CONFIGURED_GI_TYPELIB_PATH])
diff --git a/build/flatpak/pitivi.template.json b/build/flatpak/pitivi.template.json
index 205a376..72bb385 100644
--- a/build/flatpak/pitivi.template.json
+++ b/build/flatpak/pitivi.template.json
@@ -16,7 +16,8 @@
"cflags": "-O0 -g",
"cxxflags": "-O0 -g",
"env": {
- "PYTHON": "python3"
+ "PYTHON": "python3",
+ "GST_PLUGIN_SYSTEM_PATH": "/app/lib/gstreamer-1.0/"
},
"strip": false,
"no-debuginfo": true
diff --git a/getenvvar.py b/getenvvar.py
new file mode 100755
index 0000000..101856c
--- /dev/null
+++ b/getenvvar.py
@@ -0,0 +1,7 @@
+#!/usr/bin/env python3
+"""Print the content of an environment variable on stdout."""
+import os
+import sys
+
+
+print(os.environ.get(sys.argv[1], ''))
diff --git a/meson.build b/meson.build
index 872d1c8..f50a957 100644
--- a/meson.build
+++ b/meson.build
@@ -22,11 +22,19 @@ else
GITVERSION = ''
endif
+
+geteenvvar = find_program('getenvvar.py')
cdata = configuration_data()
-cdata.set('CONFIGURED_PYTHONPATH', '')
-cdata.set('CONFIGURED_GI_TYPELIB_PATH', '')
-cdata.set('CONFIGURED_LD_LIBRARY_PATH', '')
-cdata.set('CONFIGURED_GST_PLUGIN_PATH', '')
+cdata.set('CONFIGURED_PYTHONPATH',
+ run_command(geteenvvar, 'PYTHONPATH').stdout().strip())
+cdata.set('CONFIGURED_GI_TYPELIB_PATH',
+ run_command(geteenvvar, 'GI_TYPELIB_PATH').stdout().strip())
+cdata.set('CONFIGURED_LD_LIBRARY_PATH',
+ run_command(geteenvvar, 'LD_LIBRARY_PATH').stdout().strip())
+cdata.set('CONFIGURED_GST_PLUGIN_PATH',
+ run_command(geteenvvar, 'GST_PLUGIN_PATH').stdout().strip())
+cdata.set('CONFIGURED_GST_PLUGIN_SYSTEM_PATH',
+ run_command(geteenvvar, 'GST_PLUGIN_SYSTEM_PATH').stdout().strip())
cdata.set('LIBDIR', get_option('prefix') + '/' + get_option('libdir'))
cdata.set('DATADIR', get_option('prefix') + '/' + get_option('datadir'))
cdata.set('PACKAGE_NAME', 'Pitivi')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]