aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/meson/meson/0002-gobject-introspection-determine-g-ir-scanner-and-g-i.patch
blob: f00b9b2a2d1dabc355a6ca18174b4ba1ec5327c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
From 84cb251a33190ec82faeaad321518af4b309c55e Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Fri, 4 Aug 2017 16:18:47 +0300
Subject: [PATCH 2/2] gobject-introspection: determine g-ir-scanner and
 g-ir-compiler paths from pkgconfig

Do not hardcode the name of those binaries; gobject-introspection
provides them via pkgconfig, and they can be set to something else
(for example when cross-compiling).

Upstream-Status: Pending
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
---
 mesonbuild/modules/gnome.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
index ba7e4cd..00472af 100644
--- a/mesonbuild/modules/gnome.py
+++ b/mesonbuild/modules/gnome.py
@@ -380,8 +380,6 @@ class GnomeModule(ExtensionModule):
             raise MesonException('Gir takes one argument')
         if kwargs.get('install_dir'):
             raise MesonException('install_dir is not supported with generate_gir(), see "install_dir_gir" and "install_dir_typelib"')
-        giscanner = find_program('g-ir-scanner', 'Gir')
-        gicompiler = find_program('g-ir-compiler', 'Gir')
         girtarget = args[0]
         while hasattr(girtarget, 'held_object'):
             girtarget = girtarget.held_object
@@ -392,6 +390,8 @@ class GnomeModule(ExtensionModule):
                 self.gir_dep = PkgConfigDependency('gobject-introspection-1.0',
                                                    state.environment,
                                                    {'native': True})
+            giscanner = os.environ['PKG_CONFIG_SYSROOT_DIR'] + self.gir_dep.get_pkgconfig_variable('g_ir_scanner')
+            gicompiler = os.environ['PKG_CONFIG_SYSROOT_DIR'] + self.gir_dep.get_pkgconfig_variable('g_ir_compiler')
             pkgargs = self.gir_dep.get_compile_args()
         except Exception:
             raise MesonException('gobject-introspection dependency was not found, gir cannot be generated.')
-- 
2.13.2