diff options
-rw-r--r-- | meta/recipes-devtools/meson/meson.inc | 1 | ||||
-rw-r--r-- | meta/recipes-devtools/meson/meson/vala-cross-compile.patch | 50 |
2 files changed, 51 insertions, 0 deletions
diff --git a/meta/recipes-devtools/meson/meson.inc b/meta/recipes-devtools/meson/meson.inc index b9a05967f4..662368e219 100644 --- a/meta/recipes-devtools/meson/meson.inc +++ b/meta/recipes-devtools/meson/meson.inc | |||
@@ -15,6 +15,7 @@ SRC_URI = "https://github.com/mesonbuild/meson/releases/download/${PV}/meson-${P | |||
15 | file://0001-mesonbuild-environment.py-do-not-determine-whether-a.patch \ | 15 | file://0001-mesonbuild-environment.py-do-not-determine-whether-a.patch \ |
16 | file://0001-mesonbuild-environment.py-check-environment-for-vari.patch \ | 16 | file://0001-mesonbuild-environment.py-check-environment-for-vari.patch \ |
17 | file://0001-modules-python.py-do-not-substitute-python-s-install.patch \ | 17 | file://0001-modules-python.py-do-not-substitute-python-s-install.patch \ |
18 | file://vala-cross-compile.patch \ | ||
18 | " | 19 | " |
19 | SRC_URI[sha256sum] = "f27b7a60f339ba66fe4b8f81f0d1072e090a08eabbd6aa287683b2c2b9dd2d82" | 20 | SRC_URI[sha256sum] = "f27b7a60f339ba66fe4b8f81f0d1072e090a08eabbd6aa287683b2c2b9dd2d82" |
20 | SRC_URI[md5sum] = "48787e391ec5c052799a3dd491f73909" | 21 | SRC_URI[md5sum] = "48787e391ec5c052799a3dd491f73909" |
diff --git a/meta/recipes-devtools/meson/meson/vala-cross-compile.patch b/meta/recipes-devtools/meson/meson/vala-cross-compile.patch new file mode 100644 index 0000000000..816f810c05 --- /dev/null +++ b/meta/recipes-devtools/meson/meson/vala-cross-compile.patch | |||
@@ -0,0 +1,50 @@ | |||
1 | From 77c3e6a4aaed07e626f4bf4deb7eb66e0f03a33d Mon Sep 17 00:00:00 2001 | ||
2 | From: James Westman <flyingpimonster@flyingpimonster.net> | ||
3 | Date: Mon, 24 Jun 2019 12:04:12 -0500 | ||
4 | Subject: [PATCH] Fix two errors when cross-compiling with Vala | ||
5 | |||
6 | - AttributeError: 'ValaCompiler' object has no attribute 'get_program_dirs' | ||
7 | |||
8 | Fixed by adding a `get_program_dirs()` function to the base Compiler | ||
9 | class, to match `get_library_dirs()` | ||
10 | |||
11 | - KeyError: 'vala_COMPILER' | ||
12 | |||
13 | Fixed by creating the Vala compile rules for all machines, not just | ||
14 | the build machine. | ||
15 | |||
16 | Upstream-Status: Backport [https://github.com/mesonbuild/meson/commit/77c3e6a4aaed07e626f4bf4deb7eb66e0f03a33d] | ||
17 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
18 | --- | ||
19 | mesonbuild/backend/ninjabackend.py | 3 +-- | ||
20 | mesonbuild/compilers/compilers.py | 3 +++ | ||
21 | 2 files changed, 4 insertions(+), 2 deletions(-) | ||
22 | |||
23 | diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py | ||
24 | index a454e6ab5f..b830e377e4 100644 | ||
25 | --- a/mesonbuild/backend/ninjabackend.py | ||
26 | +++ b/mesonbuild/backend/ninjabackend.py | ||
27 | @@ -1653,8 +1653,7 @@ def generate_compile_rule_for(self, langname, compiler): | ||
28 | self.generate_cs_compile_rule(compiler) | ||
29 | return | ||
30 | if langname == 'vala': | ||
31 | - if self.environment.machines.matches_build_machine(compiler.for_machine): | ||
32 | - self.generate_vala_compile_rules(compiler) | ||
33 | + self.generate_vala_compile_rules(compiler) | ||
34 | return | ||
35 | if langname == 'rust': | ||
36 | self.generate_rust_compile_rules(compiler) | ||
37 | diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py | ||
38 | index 5855de71c8..86c1e33407 100644 | ||
39 | --- a/mesonbuild/compilers/compilers.py | ||
40 | +++ b/mesonbuild/compilers/compilers.py | ||
41 | @@ -1117,6 +1117,9 @@ def find_library(self, *args, **kwargs): | ||
42 | def get_library_dirs(self, *args, **kwargs): | ||
43 | return () | ||
44 | |||
45 | + def get_program_dirs(self, *args, **kwargs): | ||
46 | + return () | ||
47 | + | ||
48 | def has_multi_arguments(self, args, env) -> Tuple[bool, bool]: | ||
49 | raise EnvironmentException( | ||
50 | 'Language {} does not support has_multi_arguments.'.format( | ||