From c8e61f112d8b62388f4fa8ab75e032226a1d4fb8 Mon Sep 17 00:00:00 2001 From: Marinus Schraal Date: Mon, 14 Aug 2017 09:11:27 +0200 Subject: [PATCH] gnome: use VAPIGEN from the environment if set Allow setting the vapigen binary by passing it as an environment variable. --- mesonbuild/modules/gnome.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py index 5f9847e14..43c488196 100644 --- a/mesonbuild/modules/gnome.py +++ b/mesonbuild/modules/gnome.py @@ -1239,7 +1239,11 @@ G_END_DECLS''' build_dir = os.path.join(state.environment.get_build_dir(), state.subdir) source_dir = os.path.join(state.environment.get_source_dir(), state.subdir) pkg_cmd, vapi_depends, vapi_packages, vapi_includes = self._extract_vapi_packages(state, kwargs) - cmd = [find_program('vapigen', 'Vaapi')] + target_name = 'generate_vapi({})'.format(library) + if 'VAPIGEN' in os.environ: + cmd = [find_program(os.environ['VAPIGEN'], target_name)] + else: + cmd = [find_program('vapigen', target_name)] cmd += ['--quiet', '--library=' + library, '--directory=' + build_dir] cmd += self._vapi_args_to_command('--vapidir=', 'vapi_dirs', kwargs) cmd += self._vapi_args_to_command('--metadatadir=', 'metadata_dirs', kwargs)