devenv: Add some missing GStreamer specific env variables
authorXavier Claessens <xavier.claessens@collabora.com>
Mon, 21 Feb 2022 16:37:26 +0000 (11:37 -0500)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Fri, 25 Feb 2022 20:35:26 +0000 (20:35 +0000)
This should make "meson devenv" closer to what "gst-env.py" sets.

- GST_VALIDATE_SCENARIOS_PATH
- GST_VALIDATE_APPS_DIR
- GST_OMX_CONFIG_DIR
- GST_ENCODING_TARGET_PATH
- GST_PRESET_PATH
- GST_PLUGIN_SCANNER
- GST_PTP_HELPER
- _GI_OVERRIDES_PATH

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1768>

16 files changed:
subprojects/gst-devtools/validate/data/scenarios/meson.build
subprojects/gst-editing-services/bindings/python/meson.build
subprojects/gst-editing-services/tests/validate/meson.build
subprojects/gst-examples/webrtc/check/meson.build
subprojects/gst-omx/config/meson.build
subprojects/gst-omx/meson.build
subprojects/gst-plugins-bad/data/meson.build
subprojects/gst-plugins-bad/ext/voamrwbenc/meson.build
subprojects/gst-plugins-bad/gst/freeverb/meson.build
subprojects/gst-plugins-good/ext/vpx/meson.build
subprojects/gst-plugins-good/gst/equalizer/meson.build
subprojects/gst-plugins-good/gst/isomp4/meson.build
subprojects/gst-plugins-ugly/ext/amrnb/meson.build
subprojects/gst-plugins-ugly/ext/x264/meson.build
subprojects/gst-python/gi/overrides/meson.build
subprojects/gstreamer/libs/gst/helpers/meson.build

index 8e77ca6..bdce07e 100644 (file)
@@ -37,3 +37,7 @@ install_subdir('includes',
 install_subdir('rtsp_overrides',
              install_dir: get_option('datadir') + '/gstreamer-' +
              apiversion + '/validate/scenarios')
+
+env = environment()
+env.prepend('GST_VALIDATE_SCENARIOS_PATH', meson.current_source_dir())
+meson.add_devenv(env)
index f0e79c1..d1f157a 100644 (file)
@@ -1 +1,5 @@
-install_data(['gi/overrides/GES.py'], install_dir: pygi_override_dir)
\ No newline at end of file
+install_data(['gi/overrides/GES.py'], install_dir: pygi_override_dir)
+
+env = environment()
+env.prepend('_GI_OVERRIDES_PATH', meson.current_source_dir() / 'gi/overrides')
+meson.add_devenv(env)
index 9437f52..dc61b42 100644 (file)
@@ -3,3 +3,7 @@ subdir ('scenarios')
 install_data (['geslaunch.py'],
     install_dir : join_paths(get_option('libdir'),
       'gst-validate-launcher', 'python', 'launcher', 'apps'))
+
+env = environment()
+env.prepend('GST_VALIDATE_APPS_DIR', meson.current_source_dir())
+meson.add_devenv(env)
index d549076..a481b15 100644 (file)
@@ -20,3 +20,8 @@ if openssl.found() and have_webrtc_check_deps
              'TEST_CA_CERT_PATH=' + join_paths(meson.project_build_root(), 'signalling')])
   endforeach
 endif
+
+env = environment()
+env.prepend('GST_VALIDATE_SCENARIOS_PATH', meson.current_source_dir() / 'validate/scenarios')
+env.prepend('GST_VALIDATE_APPS_DIR', meson.current_source_dir() / 'validate')
+meson.add_devenv(env)
index 1068c6d..94be8a6 100644 (file)
@@ -15,6 +15,7 @@ if sub != ''
   subdir (sub)
   # Used by tests to load the proper conf file
   omx_config_dir = join_paths (meson.current_source_dir(), sub)
+  meson.add_devenv({'GST_OMX_CONFIG_DIR': omx_config_dir})
 else
   omx_config_dir = ''
 endif
index fe4aa65..fe816ba 100644 (file)
@@ -288,7 +288,7 @@ endif
 have_omx_vp8 = cc.has_header_symbol(
     'OMX_Video.h',
     'OMX_VIDEO_CodingVP8',
-    prefix : extra_video_headers, 
+    prefix : extra_video_headers,
     args : gst_omx_args,
     include_directories : [omx_inc])
 if have_omx_vp8
index 646cdd6..ee03ac8 100644 (file)
@@ -16,8 +16,15 @@ encoding_targets = [
   ['device', ['targets/device/dvd.gep',]],
 ]
 
+srcdirs = []
+
 foreach path_targets : encoding_targets
   dir = join_paths(encoding_targetsdir, path_targets.get(0))
   etargets = path_targets.get(1)
   install_data(sources: etargets, install_dir: dir)
+  srcdirs += meson.current_source_dir() / 'targets' / path_targets.get(0)
 endforeach
+
+env = environment()
+env.prepend('GST_ENCODING_TARGET_PATH', srcdirs)
+meson.add_devenv(env)
index 50c1810..0c3b5bb 100644 (file)
@@ -14,4 +14,7 @@ if voamrwbenc_dep.found()
   plugins += [gstvoamrwbenc]
 
   install_data('GstVoAmrwbEnc.prs', install_dir: presetdir)
+  env = environment()
+  env.prepend('GST_PRESET_PATH', meson.current_source_dir())
+  meson.add_devenv(env)
 endif
index 450e208..00a8e3d 100644 (file)
@@ -14,3 +14,7 @@ pkgconfig.generate(gstfreeverb, install_dir : plugins_pkgconfig_install_dir)
 plugins += [gstfreeverb]
 
 install_data('GstFreeverb.prs', install_dir: presetdir)
+
+env = environment()
+env.prepend('GST_PRESET_PATH', meson.current_source_dir())
+meson.add_devenv(env)
index 308648f..11c3c16 100644 (file)
@@ -76,4 +76,7 @@ if vpx_dep.found()
   plugins += [gstvpx]
 
   install_data(sources: ['GstVP8Enc.prs'], install_dir: presetdir)
+  env = environment()
+  env.prepend('GST_PRESET_PATH', meson.current_source_dir())
+  meson.add_devenv(env)
 endif
index ef796f8..0bba2f6 100644 (file)
@@ -20,3 +20,7 @@ plugins += [gstequalizer]
 
 install_data(sources: ['GstIirEqualizer3Bands.prs',
   'GstIirEqualizer10Bands.prs'], install_dir: presetdir)
+
+env = environment()
+env.prepend('GST_PRESET_PATH', meson.current_source_dir())
+meson.add_devenv(env)
index b10c09c..b4e1041 100644 (file)
@@ -33,3 +33,7 @@ pkgconfig.generate(gstisomp4, install_dir : plugins_pkgconfig_install_dir)
 plugins += [gstisomp4]
 
 install_data(sources: 'GstQTMux.prs', install_dir: presetdir)
+
+env = environment()
+env.prepend('GST_PRESET_PATH', meson.current_source_dir())
+meson.add_devenv(env)
index fcddb58..34c48f3 100644 (file)
@@ -12,4 +12,8 @@ if amrnb_dep.found()
   pkgconfig.generate(amrnb, install_dir : plugins_pkgconfig_install_dir)
   plugins += [amrnb]
   install_data(sources: 'GstAmrnbEnc.prs', install_dir: presetdir)
+
+  env = environment()
+  env.prepend('GST_PRESET_PATH', meson.current_source_dir())
+  meson.add_devenv(env)
 endif
index 7fe65f8..b54c036 100644 (file)
@@ -33,4 +33,7 @@ if x264_dep.found()
   plugins += [gstx264]
 
   install_data(sources: 'GstX264Enc.prs', install_dir: presetdir)
+  env = environment()
+  env.prepend('GST_PRESET_PATH', meson.current_source_dir())
+  meson.add_devenv(env)
 endif
index 5b87a72..7c41c0e 100644 (file)
@@ -8,3 +8,10 @@ gstpython = python.extension_module('_gi_gst',
     install_dir : pygi_override_dir,
     include_directories : [configinc],
     dependencies : [gst_dep, python_dep, pygobject_dep])
+
+env = environment()
+env.prepend('_GI_OVERRIDES_PATH', [
+    meson.current_source_dir(),
+    meson.current_build_dir()
+])
+meson.add_devenv(env)
index d924078..6f7d7da 100644 (file)
@@ -1,4 +1,4 @@
-executable('gst-plugin-scanner',
+exe = executable('gst-plugin-scanner',
   'gst-plugin-scanner.c',
   c_args : gst_c_args,
   include_directories : [configinc],
@@ -7,6 +7,8 @@ executable('gst-plugin-scanner',
   install: true,
 )
 
+meson.add_devenv({'GST_PLUGIN_SCANNER': exe.full_path()})
+
 # Used in test env setup to make tests find plugin scanner in build tree
 gst_scanner_dir = meson.current_build_dir()
 
@@ -109,7 +111,7 @@ if have_ptp
     error('Unexpected ptp helper permissions value: ' + with_ptp_helper_permissions)
   endif
 
-  executable('gst-ptp-helper', 'gst-ptp-helper.c',
+  exe = executable('gst-ptp-helper', 'gst-ptp-helper.c',
     c_args : gst_c_args,
     include_directories : [configinc, libsinc],
     dependencies : [gio_dep, gobject_dep, glib_dep, mathlib, gst_dep, cap_dep],
@@ -119,6 +121,7 @@ if have_ptp
   meson.add_install_script('ptp_helper_post_install.sh',
       helpers_install_dir, with_ptp_helper_permissions,
       setcap_prog.found() ? setcap_prog.full_path() : '')
+  meson.add_devenv({'GST_PTP_HELPER': exe.full_path()})
 endif
 
 install_data(['gst_gdb.py', 'glib_gobject_helper.py'],