From d121b7cd55560829f26a082826a990ca0e38847e Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Wed, 25 Mar 2015 13:45:38 +0300 Subject: [PATCH] modules/gnome: add export_packages kwarg to g-ir-scanner Signed-off-by: Igor Gnatenko --- modules/gnome.py | 8 ++++++++ test cases/frameworks/7 gnome/gir/meson.build | 1 + 2 files changed, 9 insertions(+) diff --git a/modules/gnome.py b/modules/gnome.py index b90c109e1..458221e21 100644 --- a/modules/gnome.py +++ b/modules/gnome.py @@ -81,6 +81,14 @@ class GnomeModule: if not isinstance(identifier_prefix, str): raise MesonException('Gir identifier prefix must be str') scan_command += ['--identifier-prefix=%s' % identifier_prefix] + if kwargs.get('export_packages'): + pkgs = kwargs.pop('export_packages') + if isinstance(pkgs, str): + scan_command += ['--pkg-export=%s' % pkgs] + elif isinstance(pkgs, list): + scan_command += ['--pkg-export=%s' % pkg for pkg in pkgs] + else: + raise MesonException('Gir export packages must be str or list') if isinstance(girtarget, build.Executable): scan_command += ['--program', girtarget] elif isinstance(girtarget, build.SharedLibrary): diff --git a/test cases/frameworks/7 gnome/gir/meson.build b/test cases/frameworks/7 gnome/gir/meson.build index 58fc9fdd9..dcc0ad851 100644 --- a/test cases/frameworks/7 gnome/gir/meson.build +++ b/test cases/frameworks/7 gnome/gir/meson.build @@ -9,6 +9,7 @@ sources : libsources, nsversion : '1.0', namespace : 'Meson', symbol_prefix : 'meson_', +identifier_prefix : 'Meson', includes : ['GObject-2.0', 'Gio-2.0'], install : true )