From 3d8372cc507082f2880acc2d93bc2a811a5927f1 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Mon, 21 Feb 2022 11:37:26 -0500 Subject: [PATCH] devenv: Add some missing GStreamer specific env variables 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: --- .../gst-devtools/validate/data/scenarios/meson.build | 4 ++++ .../gst-editing-services/bindings/python/meson.build | 6 +++++- .../gst-editing-services/tests/validate/meson.build | 4 ++++ subprojects/gst-examples/webrtc/check/meson.build | 5 +++++ subprojects/gst-omx/config/meson.build | 1 + subprojects/gst-omx/meson.build | 2 +- subprojects/gst-plugins-bad/data/meson.build | 7 +++++++ subprojects/gst-plugins-bad/ext/voamrwbenc/meson.build | 3 +++ subprojects/gst-plugins-bad/gst/freeverb/meson.build | 4 ++++ subprojects/gst-plugins-good/ext/vpx/meson.build | 3 +++ subprojects/gst-plugins-good/gst/equalizer/meson.build | 4 ++++ subprojects/gst-plugins-good/gst/isomp4/meson.build | 4 ++++ subprojects/gst-plugins-ugly/ext/amrnb/meson.build | 4 ++++ subprojects/gst-plugins-ugly/ext/x264/meson.build | 3 +++ subprojects/gst-python/gi/overrides/meson.build | 7 +++++++ subprojects/gstreamer/libs/gst/helpers/meson.build | 7 +++++-- 16 files changed, 64 insertions(+), 4 deletions(-) diff --git a/subprojects/gst-devtools/validate/data/scenarios/meson.build b/subprojects/gst-devtools/validate/data/scenarios/meson.build index 8e77ca6258..bdce07e8ee 100644 --- a/subprojects/gst-devtools/validate/data/scenarios/meson.build +++ b/subprojects/gst-devtools/validate/data/scenarios/meson.build @@ -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) diff --git a/subprojects/gst-editing-services/bindings/python/meson.build b/subprojects/gst-editing-services/bindings/python/meson.build index f0e79c14f7..d1f157ae81 100644 --- a/subprojects/gst-editing-services/bindings/python/meson.build +++ b/subprojects/gst-editing-services/bindings/python/meson.build @@ -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) diff --git a/subprojects/gst-editing-services/tests/validate/meson.build b/subprojects/gst-editing-services/tests/validate/meson.build index 9437f5224a..dc61b42962 100644 --- a/subprojects/gst-editing-services/tests/validate/meson.build +++ b/subprojects/gst-editing-services/tests/validate/meson.build @@ -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) diff --git a/subprojects/gst-examples/webrtc/check/meson.build b/subprojects/gst-examples/webrtc/check/meson.build index d54907677a..a481b15421 100644 --- a/subprojects/gst-examples/webrtc/check/meson.build +++ b/subprojects/gst-examples/webrtc/check/meson.build @@ -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) diff --git a/subprojects/gst-omx/config/meson.build b/subprojects/gst-omx/config/meson.build index 1068c6d9c6..94be8a669d 100644 --- a/subprojects/gst-omx/config/meson.build +++ b/subprojects/gst-omx/config/meson.build @@ -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 diff --git a/subprojects/gst-omx/meson.build b/subprojects/gst-omx/meson.build index fe4aa65417..fe816ba1a1 100644 --- a/subprojects/gst-omx/meson.build +++ b/subprojects/gst-omx/meson.build @@ -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 diff --git a/subprojects/gst-plugins-bad/data/meson.build b/subprojects/gst-plugins-bad/data/meson.build index 646cdd67e9..ee03ac82db 100644 --- a/subprojects/gst-plugins-bad/data/meson.build +++ b/subprojects/gst-plugins-bad/data/meson.build @@ -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) diff --git a/subprojects/gst-plugins-bad/ext/voamrwbenc/meson.build b/subprojects/gst-plugins-bad/ext/voamrwbenc/meson.build index 50c18105b3..0c3b5bb8ca 100644 --- a/subprojects/gst-plugins-bad/ext/voamrwbenc/meson.build +++ b/subprojects/gst-plugins-bad/ext/voamrwbenc/meson.build @@ -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 diff --git a/subprojects/gst-plugins-bad/gst/freeverb/meson.build b/subprojects/gst-plugins-bad/gst/freeverb/meson.build index 450e208f5a..00a8e3dc71 100644 --- a/subprojects/gst-plugins-bad/gst/freeverb/meson.build +++ b/subprojects/gst-plugins-bad/gst/freeverb/meson.build @@ -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) diff --git a/subprojects/gst-plugins-good/ext/vpx/meson.build b/subprojects/gst-plugins-good/ext/vpx/meson.build index 308648fcbb..11c3c1670e 100644 --- a/subprojects/gst-plugins-good/ext/vpx/meson.build +++ b/subprojects/gst-plugins-good/ext/vpx/meson.build @@ -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 diff --git a/subprojects/gst-plugins-good/gst/equalizer/meson.build b/subprojects/gst-plugins-good/gst/equalizer/meson.build index ef796f830e..0bba2f608e 100644 --- a/subprojects/gst-plugins-good/gst/equalizer/meson.build +++ b/subprojects/gst-plugins-good/gst/equalizer/meson.build @@ -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) diff --git a/subprojects/gst-plugins-good/gst/isomp4/meson.build b/subprojects/gst-plugins-good/gst/isomp4/meson.build index b10c09c406..b4e104178b 100644 --- a/subprojects/gst-plugins-good/gst/isomp4/meson.build +++ b/subprojects/gst-plugins-good/gst/isomp4/meson.build @@ -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) diff --git a/subprojects/gst-plugins-ugly/ext/amrnb/meson.build b/subprojects/gst-plugins-ugly/ext/amrnb/meson.build index fcddb58304..34c48f3229 100644 --- a/subprojects/gst-plugins-ugly/ext/amrnb/meson.build +++ b/subprojects/gst-plugins-ugly/ext/amrnb/meson.build @@ -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 diff --git a/subprojects/gst-plugins-ugly/ext/x264/meson.build b/subprojects/gst-plugins-ugly/ext/x264/meson.build index 7fe65f88ee..b54c036513 100644 --- a/subprojects/gst-plugins-ugly/ext/x264/meson.build +++ b/subprojects/gst-plugins-ugly/ext/x264/meson.build @@ -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 diff --git a/subprojects/gst-python/gi/overrides/meson.build b/subprojects/gst-python/gi/overrides/meson.build index 5b87a72a90..7c41c0ed9b 100644 --- a/subprojects/gst-python/gi/overrides/meson.build +++ b/subprojects/gst-python/gi/overrides/meson.build @@ -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) diff --git a/subprojects/gstreamer/libs/gst/helpers/meson.build b/subprojects/gstreamer/libs/gst/helpers/meson.build index d924078140..6f7d7dade1 100644 --- a/subprojects/gstreamer/libs/gst/helpers/meson.build +++ b/subprojects/gstreamer/libs/gst/helpers/meson.build @@ -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'],