summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glib-2.0/glib-2.0/0001-Set-host_machine-correctly-when-building-with-mingw3.patch
blob: 2e1e2313e8b15c1cbb81db84d7ad48d553ba8402 (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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
From ba1728bc27c88597164957d000b70ec4be6edf28 Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Wed, 13 Feb 2019 15:32:05 +0100
Subject: [PATCH] Set host_machine correctly when building with mingw32

Upstream-Status: Inappropriate [oe-core specific]
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>

---
 gio/tests/meson.build  | 8 ++++----
 glib/tests/meson.build | 2 +-
 meson.build            | 3 +++
 3 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/gio/tests/meson.build b/gio/tests/meson.build
index f644aa2..64a8684 100644
--- a/gio/tests/meson.build
+++ b/gio/tests/meson.build
@@ -29,7 +29,7 @@ endif
 
 test_cpp_args = test_c_args
 
-if host_machine.system() == 'windows'
+if host_system == 'windows'
   common_gio_tests_deps += [iphlpapi_dep, winsock2, cc.find_library ('secur32')]
 endif
 
@@ -210,7 +210,7 @@ if have_dbus_daemon
 endif
 
 #  Test programs buildable on UNIX only
-if host_machine.system() != 'windows'
+if host_system != 'windows'
   gio_tests += {
     'file' : {},
     'gdbus-peer-object-manager' : {},
@@ -462,7 +462,7 @@ if host_machine.system() != 'windows'
 endif # unix
 
 #  Test programs buildable on Windows only
-if host_machine.system() == 'windows'
+if host_system == 'windows'
   gio_tests += {'win32-streams' : {}}
 endif
 
@@ -532,7 +532,7 @@ if cc.get_id() != 'msvc' and cc.get_id() != 'clang-cl'
   }
 endif
 
-if host_machine.system() != 'windows'
+if host_system != 'windows'
   test_extra_programs += {
     'gdbus-example-unix-fd-client' : {
       'install' : false,
diff --git a/glib/tests/meson.build b/glib/tests/meson.build
index db01b54..6950817 100644
--- a/glib/tests/meson.build
+++ b/glib/tests/meson.build
@@ -188,7 +188,7 @@ if glib_conf.has('HAVE_EVENTFD')
   }
 endif
 
-if host_machine.system() == 'windows'
+if host_system == 'windows'
   if winsock2.found()
     glib_tests += {
       'gpoll' : {
diff --git a/meson.build b/meson.build
index 43bb468..5f9b59c 100644
--- a/meson.build
+++ b/meson.build
@@ -43,6 +43,9 @@ else
 endif
 
 host_system = host_machine.system()
+if host_system == 'mingw32'
+  host_system = 'windows'
+endif
 
 if host_system == 'darwin'
   ios_test_code = '''#include <TargetConditionals.h>