mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-03 05:59:10 +00:00
gst-uninstalled: set PKG_CONFIG_PATH
Look for -uninstalled pc files and update PKG_CONFIG_PATH with the directories containing those. This feature is useful for users building the GStreamer stack using meson and having to link it to another project which is still using the autotools. Fix a regression from the old gst-uninstalled tool. https://bugzilla.gnome.org/show_bug.cgi?id=776810
This commit is contained in:
parent
7655cdcc58
commit
0d2f4e136f
1 changed files with 10 additions and 0 deletions
|
@ -83,6 +83,7 @@ def get_subprocess_env(options):
|
||||||
|
|
||||||
presets = set()
|
presets = set()
|
||||||
encoding_targets = set()
|
encoding_targets = set()
|
||||||
|
pkg_dirs = set()
|
||||||
if '--installed' in subprocess.check_output([mesonintrospect, '-h']).decode():
|
if '--installed' in subprocess.check_output([mesonintrospect, '-h']).decode():
|
||||||
installed_s = subprocess.check_output([sys.executable, mesonintrospect,
|
installed_s = subprocess.check_output([sys.executable, mesonintrospect,
|
||||||
options.builddir, '--installed'])
|
options.builddir, '--installed'])
|
||||||
|
@ -92,12 +93,21 @@ def get_subprocess_env(options):
|
||||||
elif path.endswith('.gep'):
|
elif path.endswith('.gep'):
|
||||||
encoding_targets.add(
|
encoding_targets.add(
|
||||||
os.path.abspath(os.path.join(os.path.dirname(path), '..')))
|
os.path.abspath(os.path.join(os.path.dirname(path), '..')))
|
||||||
|
elif path.endswith('.pc'):
|
||||||
|
# Is there a -uninstalled pc file for this file?
|
||||||
|
uninstalled = "{0}-uninstalled.pc".format(path[:-3])
|
||||||
|
if os.path.exists(uninstalled):
|
||||||
|
pkg_dirs.add(os.path.dirname(path))
|
||||||
|
|
||||||
for p in presets:
|
for p in presets:
|
||||||
prepend_env_var(env, 'GST_PRESET_PATH', p)
|
prepend_env_var(env, 'GST_PRESET_PATH', p)
|
||||||
|
|
||||||
for t in encoding_targets:
|
for t in encoding_targets:
|
||||||
prepend_env_var(env, 'GST_ENCODING_TARGET_PATH', t)
|
prepend_env_var(env, 'GST_ENCODING_TARGET_PATH', t)
|
||||||
|
|
||||||
|
for pkg_dir in pkg_dirs:
|
||||||
|
prepend_env_var(env, "PKG_CONFIG_PATH", pkg_dir)
|
||||||
|
|
||||||
return env
|
return env
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue