summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/meson/meson/0001-gnome.py-prefix-g-i-paths-with-PKG_CONFIG_SYSROOT_DI.patch
blob: a1f8422d44211bac7a5d372703cd8cb99efdf1d2 (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
From 64aa6718c290e150dafd8da83f31cb08af00af0e Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Wed, 27 May 2020 16:43:05 +0000
Subject: [PATCH] gnome.py: prefix g-i paths with PKG_CONFIG_SYSROOT_DIR

When using sysroots for builds, the standard target paths for the
tools need to be prefixed (pkg-config is not clever enough to
determine when a custom variable is a path)

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 52016f4..2b72ee4 100644
--- a/mesonbuild/modules/gnome.py
+++ b/mesonbuild/modules/gnome.py
@@ -410,14 +410,14 @@ class GnomeModule(ExtensionModule):
             if giscanner is not None:
                 self.giscanner = ExternalProgram.from_entry('g-ir-scanner', giscanner)
             elif self.gir_dep.type_name == 'pkgconfig':
-                self.giscanner = ExternalProgram('g_ir_scanner', self.gir_dep.get_pkgconfig_variable('g_ir_scanner', {}))
+                self.giscanner = ExternalProgram('g_ir_scanner', os.environ['PKG_CONFIG_SYSROOT_DIR'] + self.gir_dep.get_pkgconfig_variable('g_ir_scanner', {}))
             else:
                 self.giscanner = self.interpreter.find_program_impl('g-ir-scanner')
             gicompiler = state.environment.lookup_binary_entry(MachineChoice.HOST, 'g-ir-compiler')
             if gicompiler is not None:
                 self.gicompiler = ExternalProgram.from_entry('g-ir-compiler', gicompiler)
             elif self.gir_dep.type_name == 'pkgconfig':
-                self.gicompiler = ExternalProgram('g_ir_compiler', self.gir_dep.get_pkgconfig_variable('g_ir_compiler', {}))
+                self.gicompiler = ExternalProgram('g_ir_compiler', os.environ['PKG_CONFIG_SYSROOT_DIR'] + self.gir_dep.get_pkgconfig_variable('g_ir_compiler', {}))
             else:
                 self.gicompiler = self.interpreter.find_program_impl('g-ir-compiler')
         return self.gir_dep, self.giscanner, self.gicompiler