kumquat-buildroot/package/meson/0005-mesonbuild-modules-gnome.py-Fix-giscanner-and-gicomp.patch
Adam Duskett 8b0aeafce2 package/meson: determine g-ir-scanner and g-ir-compiler paths from pkgconfig
Currently, meson hard codes the paths of these binaries which results in
cross-compiled environments to run the host versions of these tools.
However, GObject-introspection provides the appropriate paths to these
utilities via pkg-config

find_program is needed in the case g-i is built as a subproject. If
g-ir-scanner or g-ir-compiler are in the build or source directory use those.
If they aren't found in the source directory, use the results from pkg-config.

Backport two upstream commits to fix the issue.

Signed-off-by: Adam Duskett <Aduskett@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Tested-by: Adam Duskett <aduskett@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2020-03-15 17:37:32 +01:00

42 lines
1.6 KiB
Diff

From 6ba034c37d8004a72d392f37f66e709c593d8983 Mon Sep 17 00:00:00 2001
From: Adam Duskett <Aduskett@gmail.com>
Date: Wed, 26 Feb 2020 05:51:28 -0800
Subject: [PATCH] mesonbuild/modules/gnome.py: Fix giscanner and gicompiler
logic
Currently, giscanner and the gicompiler paths are only scanned via pkg-config
if they are first found in the host path.
Add a else statement to fix this oversite.
Upstream commit: 6ba034c37d8004a72d392f37f66e709c593d8983
Signed-off-by: Adam Duskett <Aduskett@gmail.com>
---
mesonbuild/modules/gnome.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
index 0ea4b273..1743b59c 100644
--- a/mesonbuild/modules/gnome.py
+++ b/mesonbuild/modules/gnome.py
@@ -754,12 +754,16 @@ class GnomeModule(ExtensionModule):
giscanner_path = giscanner.get_command()[0]
if not any(x in giscanner_path for x in gi_util_dirs_check):
giscanner = self.gir_dep.get_pkgconfig_variable('g_ir_scanner', {})
+ else:
+ giscanner = self.gir_dep.get_pkgconfig_variable('g_ir_scanner', {})
gicompiler = self.interpreter.find_program_impl('g-ir-compiler')
if gicompiler.found():
gicompiler_path = gicompiler.get_command()[0]
if not any(x in gicompiler_path for x in gi_util_dirs_check):
gicompiler = self.gir_dep.get_pkgconfig_variable('g_ir_compiler', {})
+ else:
+ gicompiler = self.gir_dep.get_pkgconfig_variable('g_ir_compiler', {})
ns = kwargs.pop('namespace')
nsversion = kwargs.pop('nsversion')
--
2.20.1