meson: Do not serialize env, use env: kwarg

This is simpler, and more correct.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1018>
This commit is contained in:
Nirbheek Chauhan 2022-12-17 04:46:07 +05:30 committed by GStreamer Marge Bot
parent 620ba6e185
commit 985e3e85d6
2 changed files with 3 additions and 16 deletions

View file

@ -17,7 +17,6 @@ PARSER.add_argument('src_dir', type=P)
PARSER.add_argument('root_dir', type=P)
PARSER.add_argument('target', choices=['release', 'debug'])
PARSER.add_argument('include')
PARSER.add_argument('extra_env')
PARSER.add_argument('prefix', type=P)
PARSER.add_argument('libdir', type=P)
PARSER.add_argument('--version', default=None)
@ -67,11 +66,6 @@ if __name__ == "__main__":
pkg_config_path.append(str(opts.root_dir / 'meson-uninstalled'))
env['PKG_CONFIG_PATH'] = ':'.join(pkg_config_path)
if opts.extra_env:
for e in opts.extra_env.split(','):
k, v = e.split(':')
env[k] = v
if opts.command == 'build':
cargo_cmd = ['cargo']
if opts.bin:

View file

@ -202,13 +202,6 @@ endforeach
include = ','.join(plugins.keys())
# serialize extra_env
extra_env_list = []
foreach key, value : extra_env
extra_env_list += key + ':' + value
endforeach
extra_env_str = ','.join(extra_env_list)
plugins_install_dir = get_option('libdir') / 'gstreamer-1.0'
pkgconfig_install_dir = get_option('libdir') / 'pkgconfig'
@ -226,6 +219,7 @@ rs_plugins = custom_target('gst-plugins-rs',
install_dir: plugins_install_dir,
depends: depends,
depfile: 'gst-plugins-rs.dep',
env: extra_env,
command: [cargo_wrapper,
'build',
meson.current_build_dir(),
@ -233,7 +227,6 @@ rs_plugins = custom_target('gst-plugins-rs',
meson.global_build_root(),
target,
include,
extra_env_str,
get_option('prefix'),
get_option('libdir'),
'--depfile', '@DEPFILE@',
@ -315,6 +308,7 @@ custom_target('gst-webrtc-signalling-server',
install: true,
install_dir: get_option('bindir'),
depfile: 'gst-webrtc-signalling-server.dep',
env: extra_env,
command: [cargo_wrapper,
'build',
meson.current_build_dir(),
@ -322,7 +316,6 @@ custom_target('gst-webrtc-signalling-server',
meson.global_build_root(),
target,
'',
'',
get_option('prefix'),
get_option('libdir'),
'--depfile', '@DEPFILE@',
@ -332,13 +325,13 @@ custom_target('gst-webrtc-signalling-server',
test('tests',
cargo_wrapper,
env: extra_env,
args: ['test',
meson.current_build_dir(),
meson.current_source_dir(),
meson.global_build_root(),
target,
include,
extra_env_str,
get_option('prefix'),
get_option('libdir')],
timeout: 600)