summaryrefslogtreecommitdiffstats
path: root/patches/gobject-introspection-1.72.0/0002-HACK-don-t-build-the-python-module-when-cross-compil.patch
blob: dc64696d90bda5dd76b8ef335ecbc6eeff4367aa (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
42
43
44
45
46
From: Michael Olbrich <m.olbrich@pengutronix.de>
Date: Thu, 3 Dec 2020 17:14:56 +0100
Subject: [PATCH] HACK: don't build the python module when cross-compiling

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
---
 giscanner/meson.build | 4 ++++
 meson.build           | 6 ++++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/giscanner/meson.build b/giscanner/meson.build
index 3d7dc678a260..79795d54ac2d 100644
--- a/giscanner/meson.build
+++ b/giscanner/meson.build
@@ -97,6 +97,7 @@ giscanner_lib = static_library('giscanner',
   dependencies: [glib_dep, gobject_dep, gio_dep, gmodule_dep],
 )
 
+if not meson.is_cross_build()
 # https://github.com/mesonbuild/meson/issues/4117
 if host_machine.system() == 'windows'
   python_ext_dep = python.dependency()
@@ -118,3 +119,6 @@ giscanner_pymod = python.extension_module('_giscanner', ['giscannermodule.c'],
   install: true,
   install_dir: giscannerdir,
 )
+else
+giscanner_pymod = []
+endif
diff --git a/meson.build b/meson.build
index e15f6f9965ca..52fd99ff1409 100644
--- a/meson.build
+++ b/meson.build
@@ -162,8 +162,10 @@ configure_file(
   output: 'config.h'
 )
 
-# python headers
-cc.check_header('Python.h', dependencies: [python.dependency()], required: true)
+if not meson.is_cross_build()
+  # python headers
+  cc.check_header('Python.h', dependencies: [python.dependency()], required: true)
+endif
 
 # cairo
 cairo_option = get_option('cairo')