diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2019-07-30 17:54:25 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-08-03 23:56:00 +0100 |
commit | 0aa7a34141807ea73d31374e1431bb0bc78b8f11 (patch) | |
tree | 05be17d5b1882bbe10778d729194103c3fe37174 /meta/recipes-devtools/meson | |
parent | a76b6b317c9b9d8aef348f4639de8b0224d27a4d (diff) | |
download | poky-0aa7a34141807ea73d31374e1431bb0bc78b8f11.tar.gz |
meson: update 0.50.1 -> 0.51.1
Drop backports.
Rebase other patches.
(From OE-Core rev: 3251ce439ea164fcf230dcede06da1a05b5c6775)
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/meson')
11 files changed, 49 insertions, 287 deletions
diff --git a/meta/recipes-devtools/meson/meson.inc b/meta/recipes-devtools/meson/meson.inc index 6a723683cc..b9a05967f4 100644 --- a/meta/recipes-devtools/meson/meson.inc +++ b/meta/recipes-devtools/meson/meson.inc | |||
@@ -11,15 +11,13 @@ SRC_URI = "https://github.com/mesonbuild/meson/releases/download/${PV}/meson-${P | |||
11 | file://0001-python-module-do-not-manipulate-the-environment-when.patch \ | 11 | file://0001-python-module-do-not-manipulate-the-environment-when.patch \ |
12 | file://disable-rpath-handling.patch \ | 12 | file://disable-rpath-handling.patch \ |
13 | file://cross-prop-default.patch \ | 13 | file://cross-prop-default.patch \ |
14 | file://load-configs-generalise-search-path.patch \ | ||
15 | file://0007-mesonbuild-allow-multiple-cross-file-options.patch \ | ||
16 | file://0001-environment.py-detect-windows-also-if-the-system-str.patch \ | 14 | file://0001-environment.py-detect-windows-also-if-the-system-str.patch \ |
17 | file://0001-mesonbuild-environment.py-do-not-determine-whether-a.patch \ | 15 | file://0001-mesonbuild-environment.py-do-not-determine-whether-a.patch \ |
18 | file://0001-mesonbuild-environment.py-check-environment-for-vari.patch \ | 16 | file://0001-mesonbuild-environment.py-check-environment-for-vari.patch \ |
19 | 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 \ |
20 | " | 18 | " |
21 | SRC_URI[sha256sum] = "f68f56d60c80a77df8fc08fa1016bc5831605d4717b622c96212573271e14ecc" | 19 | SRC_URI[sha256sum] = "f27b7a60f339ba66fe4b8f81f0d1072e090a08eabbd6aa287683b2c2b9dd2d82" |
22 | SRC_URI[md5sum] = "24a6527796115828d2ebc75880e18d62" | 20 | SRC_URI[md5sum] = "48787e391ec5c052799a3dd491f73909" |
23 | 21 | ||
24 | SRC_URI_append_class-native = " \ | 22 | SRC_URI_append_class-native = " \ |
25 | file://0001-Make-CPU-family-warnings-fatal.patch \ | 23 | file://0001-Make-CPU-family-warnings-fatal.patch \ |
diff --git a/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch b/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch index adde1e271f..444fc08168 100644 --- a/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch +++ b/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 4b4b3d4932d928f05dbd74d730a3c8a5ac371e1d Mon Sep 17 00:00:00 2001 | 1 | From f70fee13e4dbc757cd8153cd42d92fa9394fb542 Mon Sep 17 00:00:00 2001 |
2 | From: Ross Burton <ross.burton@intel.com> | 2 | From: Ross Burton <ross.burton@intel.com> |
3 | Date: Tue, 3 Jul 2018 13:59:09 +0100 | 3 | Date: Tue, 3 Jul 2018 13:59:09 +0100 |
4 | Subject: [PATCH] Make CPU family warnings fatal | 4 | Subject: [PATCH] Make CPU family warnings fatal |
@@ -12,10 +12,10 @@ Signed-off-by: Ross Burton <ross.burton@intel.com> | |||
12 | 2 files changed, 2 insertions(+), 4 deletions(-) | 12 | 2 files changed, 2 insertions(+), 4 deletions(-) |
13 | 13 | ||
14 | diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py | 14 | diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py |
15 | index 5309ef4..3f0a399 100644 | 15 | index 03c6346..86b350b 100644 |
16 | --- a/mesonbuild/envconfig.py | 16 | --- a/mesonbuild/envconfig.py |
17 | +++ b/mesonbuild/envconfig.py | 17 | +++ b/mesonbuild/envconfig.py |
18 | @@ -178,7 +178,7 @@ class MachineInfo: | 18 | @@ -186,7 +186,7 @@ class MachineInfo: |
19 | 19 | ||
20 | cpu_family = literal['cpu_family'] | 20 | cpu_family = literal['cpu_family'] |
21 | if cpu_family not in known_cpu_families: | 21 | if cpu_family not in known_cpu_families: |
@@ -25,10 +25,10 @@ index 5309ef4..3f0a399 100644 | |||
25 | endian = literal['endian'] | 25 | endian = literal['endian'] |
26 | if endian not in ('little', 'big'): | 26 | if endian not in ('little', 'big'): |
27 | diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py | 27 | diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py |
28 | index 3031a82..ecd18d0 100644 | 28 | index 0cfdf9c..40aa189 100644 |
29 | --- a/mesonbuild/environment.py | 29 | --- a/mesonbuild/environment.py |
30 | +++ b/mesonbuild/environment.py | 30 | +++ b/mesonbuild/environment.py |
31 | @@ -242,9 +242,7 @@ def detect_cpu_family(compilers): | 31 | @@ -262,9 +262,7 @@ def detect_cpu_family(compilers: CompilersDict) -> str: |
32 | trial = 'parisc' | 32 | trial = 'parisc' |
33 | 33 | ||
34 | if trial not in known_cpu_families: | 34 | if trial not in known_cpu_families: |
diff --git a/meta/recipes-devtools/meson/meson/0001-environment.py-detect-windows-also-if-the-system-str.patch b/meta/recipes-devtools/meson/meson/0001-environment.py-detect-windows-also-if-the-system-str.patch index f6043190af..37b5356d77 100644 --- a/meta/recipes-devtools/meson/meson/0001-environment.py-detect-windows-also-if-the-system-str.patch +++ b/meta/recipes-devtools/meson/meson/0001-environment.py-detect-windows-also-if-the-system-str.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 63b78b7990c5d60f7bc674a26f655caa0bec3c49 Mon Sep 17 00:00:00 2001 | 1 | From b52e47c9d61dc4c930cfc7236fbeb70338c3b953 Mon Sep 17 00:00:00 2001 |
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | 2 | From: Alexander Kanavin <alex.kanavin@gmail.com> |
3 | Date: Mon, 25 Mar 2019 17:17:06 +0100 | 3 | Date: Mon, 25 Mar 2019 17:17:06 +0100 |
4 | Subject: [PATCH] environment.py: detect windows also if the system string | 4 | Subject: [PATCH] environment.py: detect windows also if the system string |
@@ -6,20 +6,24 @@ Subject: [PATCH] environment.py: detect windows also if the system string | |||
6 | 6 | ||
7 | Upstream-Status: Pending | 7 | Upstream-Status: Pending |
8 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | 8 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> |
9 | |||
9 | --- | 10 | --- |
10 | mesonbuild/envconfig.py | 2 +- | 11 | mesonbuild/envconfig.py | 2 +- |
11 | 1 file changed, 1 insertion(+), 1 deletion(-) | 12 | 1 file changed, 1 insertion(+), 1 deletion(-) |
12 | 13 | ||
13 | diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py | 14 | diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py |
14 | index f2510c1..5309ef4 100644 | 15 | index 03c6346..a59cd89 100644 |
15 | --- a/mesonbuild/envconfig.py | 16 | --- a/mesonbuild/envconfig.py |
16 | +++ b/mesonbuild/envconfig.py | 17 | +++ b/mesonbuild/envconfig.py |
17 | @@ -194,7 +194,7 @@ class MachineInfo: | 18 | @@ -198,7 +198,7 @@ class MachineInfo: |
18 | """ | 19 | """ |
19 | Machine is windows? | 20 | Machine is windows? |
20 | """ | 21 | """ |
21 | - return self.system == 'windows' | 22 | - return self.system in {'windows', 'mingw'} |
22 | + return self.system == 'windows' or 'mingw' in self.system | 23 | + return self.system == 'windows' or 'mingw' in self.system |
23 | 24 | ||
24 | def is_cygwin(self): | 25 | def is_cygwin(self) -> bool: |
25 | """ | 26 | """ |
27 | -- | ||
28 | 2.17.1 | ||
29 | |||
diff --git a/meta/recipes-devtools/meson/meson/0001-mesonbuild-environment.py-check-environment-for-vari.patch b/meta/recipes-devtools/meson/meson/0001-mesonbuild-environment.py-check-environment-for-vari.patch index fadb2734f4..f4456235fe 100644 --- a/meta/recipes-devtools/meson/meson/0001-mesonbuild-environment.py-check-environment-for-vari.patch +++ b/meta/recipes-devtools/meson/meson/0001-mesonbuild-environment.py-check-environment-for-vari.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 63e79329b5dd00882f0cea56a6d907a831b94171 Mon Sep 17 00:00:00 2001 | 1 | From a72dc2b1cddcf180ce782860896deae0b12d5000 Mon Sep 17 00:00:00 2001 |
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | 2 | From: Alexander Kanavin <alex.kanavin@gmail.com> |
3 | Date: Mon, 25 Mar 2019 18:52:48 +0100 | 3 | Date: Mon, 25 Mar 2019 18:52:48 +0100 |
4 | Subject: [PATCH] mesonbuild/environment.py: check environment for various | 4 | Subject: [PATCH] mesonbuild/environment.py: check environment for various |
@@ -6,23 +6,21 @@ Subject: [PATCH] mesonbuild/environment.py: check environment for various | |||
6 | 6 | ||
7 | Upstream-Status: Inappropriate [oe-core specific] | 7 | Upstream-Status: Inappropriate [oe-core specific] |
8 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | 8 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> |
9 | |||
9 | --- | 10 | --- |
10 | mesonbuild/environment.py | 2 +- | 11 | mesonbuild/environment.py | 2 +- |
11 | 1 file changed, 1 insertion(+), 1 deletion(-) | 12 | 1 file changed, 1 insertion(+), 1 deletion(-) |
12 | 13 | ||
13 | diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py | 14 | diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py |
14 | index 6e5d689..bbfd87d 100644 | 15 | index 9a029f4..0cfdf9c 100644 |
15 | --- a/mesonbuild/environment.py | 16 | --- a/mesonbuild/environment.py |
16 | +++ b/mesonbuild/environment.py | 17 | +++ b/mesonbuild/environment.py |
17 | @@ -398,7 +398,7 @@ class Environment: | 18 | @@ -448,7 +448,7 @@ class Environment: |
18 | config = MesonConfigFile.from_config_parser( | 19 | config = MesonConfigFile.from_config_parser( |
19 | coredata.load_configs(self.coredata.cross_files, 'cross')) | 20 | coredata.load_configs(self.coredata.cross_files)) |
20 | self.properties.host = Properties(config.get('properties', {}), False) | 21 | properties.host = Properties(config.get('properties', {}), False) |
21 | - self.binaries.host = BinaryTable(config.get('binaries', {}), False) | 22 | - binaries.host = BinaryTable(config.get('binaries', {}), False) |
22 | + self.binaries.host = BinaryTable(config.get('binaries', {}), True) | 23 | + binaries.host = BinaryTable(config.get('binaries', {}), True) |
23 | if 'host_machine' in config: | 24 | if 'host_machine' in config: |
24 | self.machines.host = MachineInfo.from_literal(config['host_machine']) | 25 | machines.host = MachineInfo.from_literal(config['host_machine']) |
25 | if 'target_machine' in config: | 26 | if 'target_machine' in config: |
26 | -- | ||
27 | 2.17.1 | ||
28 | |||
diff --git a/meta/recipes-devtools/meson/meson/0001-mesonbuild-environment.py-do-not-determine-whether-a.patch b/meta/recipes-devtools/meson/meson/0001-mesonbuild-environment.py-do-not-determine-whether-a.patch index 8334714541..8cb11879f4 100644 --- a/meta/recipes-devtools/meson/meson/0001-mesonbuild-environment.py-do-not-determine-whether-a.patch +++ b/meta/recipes-devtools/meson/meson/0001-mesonbuild-environment.py-do-not-determine-whether-a.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From d9da5e7a16a9397e22a8900fac4b60b40d7f00de Mon Sep 17 00:00:00 2001 | 1 | From ec9c4a22424a5d55fcf213a55d03f096ec24bcae Mon Sep 17 00:00:00 2001 |
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | 2 | From: Alexander Kanavin <alex.kanavin@gmail.com> |
3 | Date: Mon, 25 Mar 2019 18:18:33 +0100 | 3 | Date: Mon, 25 Mar 2019 18:18:33 +0100 |
4 | Subject: [PATCH] mesonbuild/environment.py: do not determine whether a build | 4 | Subject: [PATCH] mesonbuild/environment.py: do not determine whether a build |
@@ -14,14 +14,14 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | |||
14 | 1 file changed, 1 insertion(+), 1 deletion(-) | 14 | 1 file changed, 1 insertion(+), 1 deletion(-) |
15 | 15 | ||
16 | diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py | 16 | diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py |
17 | index d4f0630..c584fa4 100644 | 17 | index 84a7596..9a029f4 100644 |
18 | --- a/mesonbuild/environment.py | 18 | --- a/mesonbuild/environment.py |
19 | +++ b/mesonbuild/environment.py | 19 | +++ b/mesonbuild/environment.py |
20 | @@ -483,7 +483,7 @@ class Environment: | 20 | @@ -520,7 +520,7 @@ class Environment: |
21 | self.first_invocation = True | 21 | self.first_invocation = True |
22 | 22 | ||
23 | def is_cross_build(self): | 23 | def is_cross_build(self) -> bool: |
24 | - return self.coredata.cross_file is not None | 24 | - return not self.machines.matches_build_machine(MachineChoice.HOST) |
25 | + return self.need_exe_wrapper() | 25 | + return self.need_exe_wrapper() |
26 | 26 | ||
27 | def dump_coredata(self): | 27 | def dump_coredata(self): |
diff --git a/meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch b/meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch index e47e555324..8ad86a46e9 100644 --- a/meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch +++ b/meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 2164655328ec4e47335fc9033813274365491ad8 Mon Sep 17 00:00:00 2001 | 1 | From 3009a1c2f1b736b836a057d84dc11f379cba99cf Mon Sep 17 00:00:00 2001 |
2 | From: Peter Kjellerstedt <pkj@axis.com> | 2 | From: Peter Kjellerstedt <pkj@axis.com> |
3 | Date: Thu, 26 Jul 2018 16:32:49 +0200 | 3 | Date: Thu, 26 Jul 2018 16:32:49 +0200 |
4 | Subject: [PATCH] Support building allarch recipes again | 4 | Subject: [PATCH] Support building allarch recipes again |
@@ -13,10 +13,10 @@ Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> | |||
13 | 1 file changed, 1 insertion(+) | 13 | 1 file changed, 1 insertion(+) |
14 | 14 | ||
15 | diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py | 15 | diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py |
16 | index 3f0a399..4509e09 100644 | 16 | index 86b350b..aa426ca 100644 |
17 | --- a/mesonbuild/envconfig.py | 17 | --- a/mesonbuild/envconfig.py |
18 | +++ b/mesonbuild/envconfig.py | 18 | +++ b/mesonbuild/envconfig.py |
19 | @@ -34,6 +34,7 @@ from . import mlog | 19 | @@ -36,6 +36,7 @@ _T = typing.TypeVar('_T') |
20 | 20 | ||
21 | 21 | ||
22 | known_cpu_families = ( | 22 | known_cpu_families = ( |
diff --git a/meta/recipes-devtools/meson/meson/0003-native_bindir.patch b/meta/recipes-devtools/meson/meson/0003-native_bindir.patch index 2b22531dd0..57de598d2f 100644 --- a/meta/recipes-devtools/meson/meson/0003-native_bindir.patch +++ b/meta/recipes-devtools/meson/meson/0003-native_bindir.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From e762d85c823adfefc27ba6128c7b997aa50166ce Mon Sep 17 00:00:00 2001 | 1 | From ac38495de38a1ea42e2bc09a2f23c2e945fbc22d Mon Sep 17 00:00:00 2001 |
2 | From: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> | 2 | From: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> |
3 | Date: Wed, 15 Nov 2017 15:05:01 +0100 | 3 | Date: Wed, 15 Nov 2017 15:05:01 +0100 |
4 | Subject: [PATCH] native_bindir | 4 | Subject: [PATCH] native_bindir |
@@ -22,19 +22,19 @@ Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> | |||
22 | 2 files changed, 14 insertions(+), 11 deletions(-) | 22 | 2 files changed, 14 insertions(+), 11 deletions(-) |
23 | 23 | ||
24 | diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py | 24 | diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py |
25 | index 6d3678f..90fdb80 100644 | 25 | index 21da8e2..7d1ef85 100644 |
26 | --- a/mesonbuild/dependencies/base.py | 26 | --- a/mesonbuild/dependencies/base.py |
27 | +++ b/mesonbuild/dependencies/base.py | 27 | +++ b/mesonbuild/dependencies/base.py |
28 | @@ -146,7 +146,7 @@ class Dependency: | 28 | @@ -155,7 +155,7 @@ class Dependency: |
29 | def need_threads(self): | 29 | def get_exe_args(self, compiler): |
30 | return False | 30 | return [] |
31 | 31 | ||
32 | - def get_pkgconfig_variable(self, variable_name, kwargs): | 32 | - def get_pkgconfig_variable(self, variable_name, kwargs): |
33 | + def get_pkgconfig_variable(self, variable_name, kwargs, use_native=False): | 33 | + def get_pkgconfig_variable(self, variable_name, kwargs, use_native=False): |
34 | raise DependencyException('{!r} is not a pkgconfig dependency'.format(self.name)) | 34 | raise DependencyException('{!r} is not a pkgconfig dependency'.format(self.name)) |
35 | 35 | ||
36 | def get_configtool_variable(self, variable_name): | 36 | def get_configtool_variable(self, variable_name): |
37 | @@ -183,7 +183,7 @@ class InternalDependency(Dependency): | 37 | @@ -214,7 +214,7 @@ class InternalDependency(Dependency): |
38 | self.sources = sources | 38 | self.sources = sources |
39 | self.ext_deps = ext_deps | 39 | self.ext_deps = ext_deps |
40 | 40 | ||
@@ -43,7 +43,7 @@ index 6d3678f..90fdb80 100644 | |||
43 | raise DependencyException('Method "get_pkgconfig_variable()" is ' | 43 | raise DependencyException('Method "get_pkgconfig_variable()" is ' |
44 | 'invalid for an internal dependency') | 44 | 'invalid for an internal dependency') |
45 | 45 | ||
46 | @@ -523,15 +523,18 @@ class PkgConfigDependency(ExternalDependency): | 46 | @@ -639,15 +639,18 @@ class PkgConfigDependency(ExternalDependency): |
47 | return s.format(self.__class__.__name__, self.name, self.is_found, | 47 | return s.format(self.__class__.__name__, self.name, self.is_found, |
48 | self.version_reqs) | 48 | self.version_reqs) |
49 | 49 | ||
@@ -62,10 +62,10 @@ index 6d3678f..90fdb80 100644 | |||
62 | 62 | ||
63 | - def _call_pkgbin(self, args, env=None): | 63 | - def _call_pkgbin(self, args, env=None): |
64 | + def _call_pkgbin(self, args, env=None, use_native=False): | 64 | + def _call_pkgbin(self, args, env=None, use_native=False): |
65 | # Always copy the environment since we're going to modify it | ||
66 | # with pkg-config variables | ||
65 | if env is None: | 67 | if env is None: |
66 | fenv = env | 68 | @@ -663,7 +666,7 @@ class PkgConfigDependency(ExternalDependency): |
67 | env = os.environ | ||
68 | @@ -540,7 +543,7 @@ class PkgConfigDependency(ExternalDependency): | ||
69 | targs = tuple(args) | 69 | targs = tuple(args) |
70 | cache = PkgConfigDependency.pkgbin_cache | 70 | cache = PkgConfigDependency.pkgbin_cache |
71 | if (self.pkgbin, targs, fenv) not in cache: | 71 | if (self.pkgbin, targs, fenv) not in cache: |
@@ -74,7 +74,7 @@ index 6d3678f..90fdb80 100644 | |||
74 | return cache[(self.pkgbin, targs, fenv)] | 74 | return cache[(self.pkgbin, targs, fenv)] |
75 | 75 | ||
76 | def _convert_mingw_paths(self, args): | 76 | def _convert_mingw_paths(self, args): |
77 | @@ -718,7 +721,7 @@ class PkgConfigDependency(ExternalDependency): | 77 | @@ -845,7 +848,7 @@ class PkgConfigDependency(ExternalDependency): |
78 | (self.name, out_raw)) | 78 | (self.name, out_raw)) |
79 | self.link_args, self.raw_link_args = self._search_libs(out, out_raw) | 79 | self.link_args, self.raw_link_args = self._search_libs(out, out_raw) |
80 | 80 | ||
@@ -83,7 +83,7 @@ index 6d3678f..90fdb80 100644 | |||
83 | options = ['--variable=' + variable_name, self.name] | 83 | options = ['--variable=' + variable_name, self.name] |
84 | 84 | ||
85 | if 'define_variable' in kwargs: | 85 | if 'define_variable' in kwargs: |
86 | @@ -731,7 +734,7 @@ class PkgConfigDependency(ExternalDependency): | 86 | @@ -858,7 +861,7 @@ class PkgConfigDependency(ExternalDependency): |
87 | 87 | ||
88 | options = ['--define-variable=' + '='.join(definition)] + options | 88 | options = ['--define-variable=' + '='.join(definition)] + options |
89 | 89 | ||
@@ -93,10 +93,10 @@ index 6d3678f..90fdb80 100644 | |||
93 | if ret != 0: | 93 | if ret != 0: |
94 | if self.required: | 94 | if self.required: |
95 | diff --git a/mesonbuild/dependencies/ui.py b/mesonbuild/dependencies/ui.py | 95 | diff --git a/mesonbuild/dependencies/ui.py b/mesonbuild/dependencies/ui.py |
96 | index 197d22c..c683d21 100644 | 96 | index 6d784e6..73a9e13 100644 |
97 | --- a/mesonbuild/dependencies/ui.py | 97 | --- a/mesonbuild/dependencies/ui.py |
98 | +++ b/mesonbuild/dependencies/ui.py | 98 | +++ b/mesonbuild/dependencies/ui.py |
99 | @@ -285,7 +285,7 @@ class QtBaseDependency(ExternalDependency): | 99 | @@ -330,7 +330,7 @@ class QtBaseDependency(ExternalDependency): |
100 | self.bindir = self.get_pkgconfig_host_bins(core) | 100 | self.bindir = self.get_pkgconfig_host_bins(core) |
101 | if not self.bindir: | 101 | if not self.bindir: |
102 | # If exec_prefix is not defined, the pkg-config file is broken | 102 | # If exec_prefix is not defined, the pkg-config file is broken |
@@ -105,7 +105,7 @@ index 197d22c..c683d21 100644 | |||
105 | if prefix: | 105 | if prefix: |
106 | self.bindir = os.path.join(prefix, 'bin') | 106 | self.bindir = os.path.join(prefix, 'bin') |
107 | 107 | ||
108 | @@ -427,7 +427,7 @@ class Qt4Dependency(QtBaseDependency): | 108 | @@ -507,7 +507,7 @@ class Qt4Dependency(QtBaseDependency): |
109 | applications = ['moc', 'uic', 'rcc', 'lupdate', 'lrelease'] | 109 | applications = ['moc', 'uic', 'rcc', 'lupdate', 'lrelease'] |
110 | for application in applications: | 110 | for application in applications: |
111 | try: | 111 | try: |
@@ -114,7 +114,7 @@ index 197d22c..c683d21 100644 | |||
114 | except MesonException: | 114 | except MesonException: |
115 | pass | 115 | pass |
116 | 116 | ||
117 | @@ -437,7 +437,7 @@ class Qt5Dependency(QtBaseDependency): | 117 | @@ -517,7 +517,7 @@ class Qt5Dependency(QtBaseDependency): |
118 | QtBaseDependency.__init__(self, 'qt5', env, kwargs) | 118 | QtBaseDependency.__init__(self, 'qt5', env, kwargs) |
119 | 119 | ||
120 | def get_pkgconfig_host_bins(self, core): | 120 | def get_pkgconfig_host_bins(self, core): |
diff --git a/meta/recipes-devtools/meson/meson/0007-mesonbuild-allow-multiple-cross-file-options.patch b/meta/recipes-devtools/meson/meson/0007-mesonbuild-allow-multiple-cross-file-options.patch deleted file mode 100644 index 6c2949c0e8..0000000000 --- a/meta/recipes-devtools/meson/meson/0007-mesonbuild-allow-multiple-cross-file-options.patch +++ /dev/null | |||
@@ -1,185 +0,0 @@ | |||
1 | From 07ae4f949b8402cff178dd12c210d9a726ffe2da Mon Sep 17 00:00:00 2001 | ||
2 | From: Ross Burton <ross.burton@intel.com> | ||
3 | Date: Mon, 18 Mar 2019 17:27:57 +0000 | ||
4 | Subject: [PATCH] mesonbuild: allow multiple --cross-file options | ||
5 | |||
6 | Just like --native-file, allow multiple --cross-file options. This is mostly | ||
7 | unifying the logic between cross_files and config_files. | ||
8 | |||
9 | Upstream-Status: Backport [will be in 0.50.1] | ||
10 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
11 | |||
12 | --- | ||
13 | .../markdown/snippets/multiple-cross-files.md | 3 ++ | ||
14 | mesonbuild/backend/backends.py | 3 +- | ||
15 | mesonbuild/coredata.py | 52 +++---------------- | ||
16 | mesonbuild/environment.py | 5 +- | ||
17 | mesonbuild/msetup.py | 4 +- | ||
18 | mesonbuild/munstable_coredata.py | 5 +- | ||
19 | 6 files changed, 20 insertions(+), 52 deletions(-) | ||
20 | create mode 100644 docs/markdown/snippets/multiple-cross-files.md | ||
21 | |||
22 | diff --git a/docs/markdown/snippets/multiple-cross-files.md b/docs/markdown/snippets/multiple-cross-files.md | ||
23 | new file mode 100644 | ||
24 | index 0000000..de229be | ||
25 | --- /dev/null | ||
26 | +++ b/docs/markdown/snippets/multiple-cross-files.md | ||
27 | @@ -0,0 +1,3 @@ | ||
28 | +## Multipe cross files can be specified | ||
29 | + | ||
30 | +`--cross-file` can be passed multiple times, with the configuration files overlaying the same way as `--native-file`. | ||
31 | diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py | ||
32 | index 4d35d22..5b270d3 100644 | ||
33 | --- a/mesonbuild/backend/backends.py | ||
34 | +++ b/mesonbuild/backend/backends.py | ||
35 | @@ -788,8 +788,7 @@ class Backend: | ||
36 | deps = [os.path.join(self.build_to_src, df) | ||
37 | for df in self.interpreter.get_build_def_files()] | ||
38 | if self.environment.is_cross_build(): | ||
39 | - deps.append(os.path.join(self.build_to_src, | ||
40 | - self.environment.coredata.cross_file)) | ||
41 | + deps.extend(self.environment.coredata.cross_files) | ||
42 | deps.append('meson-private/coredata.dat') | ||
43 | if os.path.exists(os.path.join(self.environment.get_source_dir(), 'meson_options.txt')): | ||
44 | deps.append(os.path.join(self.build_to_src, 'meson_options.txt')) | ||
45 | diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py | ||
46 | index 066ad30..d80e9a0 100644 | ||
47 | --- a/mesonbuild/coredata.py | ||
48 | +++ b/mesonbuild/coredata.py | ||
49 | @@ -265,7 +265,7 @@ class CoreData: | ||
50 | self.compiler_options = PerMachine({}, {}, {}) | ||
51 | self.base_options = {} | ||
52 | self.external_preprocess_args = PerMachine({}, {}, {}) # CPPFLAGS only | ||
53 | - self.cross_file = self.__load_cross_file(options.cross_file) | ||
54 | + self.cross_files = self.__load_config_files(options.cross_file) | ||
55 | self.compilers = OrderedDict() | ||
56 | self.cross_compilers = OrderedDict() | ||
57 | self.deps = OrderedDict() | ||
58 | @@ -276,57 +276,19 @@ class CoreData: | ||
59 | |||
60 | @staticmethod | ||
61 | def __load_config_files(filenames): | ||
62 | + # Need to try and make the passed filenames absolute because when the | ||
63 | + # files are parsed later we'll have chdir()d. | ||
64 | if not filenames: | ||
65 | return [] | ||
66 | filenames = [os.path.abspath(os.path.expanduser(os.path.expanduser(f))) | ||
67 | for f in filenames] | ||
68 | return filenames | ||
69 | |||
70 | - @staticmethod | ||
71 | - def __load_cross_file(filename): | ||
72 | - """Try to load the cross file. | ||
73 | - | ||
74 | - If the filename is None return None. If the filename is an absolute | ||
75 | - (after resolving variables and ~), return that absolute path. Next, | ||
76 | - check if the file is relative to the current source dir. If the path | ||
77 | - still isn't resolved do the following: | ||
78 | - Windows: | ||
79 | - - Error | ||
80 | - *: | ||
81 | - - $XDG_DATA_HOME/meson/cross (or ~/.local/share/meson/cross if | ||
82 | - undefined) | ||
83 | - - $XDG_DATA_DIRS/meson/cross (or | ||
84 | - /usr/local/share/meson/cross:/usr/share/meson/cross if undefined) | ||
85 | - - Error | ||
86 | - | ||
87 | - Non-Windows follows the Linux path and will honor XDG_* if set. This | ||
88 | - simplifies the implementation somewhat. | ||
89 | - """ | ||
90 | - if filename is None: | ||
91 | - return None | ||
92 | - filename = os.path.expanduser(os.path.expandvars(filename)) | ||
93 | - if os.path.isabs(filename): | ||
94 | - return filename | ||
95 | - path_to_try = os.path.abspath(filename) | ||
96 | - if os.path.isfile(path_to_try): | ||
97 | - return path_to_try | ||
98 | - if sys.platform != 'win32': | ||
99 | - paths = [ | ||
100 | - os.environ.get('XDG_DATA_HOME', os.path.expanduser('~/.local/share')), | ||
101 | - ] + os.environ.get('XDG_DATA_DIRS', '/usr/local/share:/usr/share').split(':') | ||
102 | - for path in paths: | ||
103 | - path_to_try = os.path.join(path, 'meson', 'cross', filename) | ||
104 | - if os.path.isfile(path_to_try): | ||
105 | - return path_to_try | ||
106 | - raise MesonException('Cannot find specified cross file: ' + filename) | ||
107 | - | ||
108 | - raise MesonException('Cannot find specified cross file: ' + filename) | ||
109 | - | ||
110 | def libdir_cross_fixup(self): | ||
111 | # By default set libdir to "lib" when cross compiling since | ||
112 | # getting the "system default" is always wrong on multiarch | ||
113 | # platforms as it gets a value like lib/x86_64-linux-gnu. | ||
114 | - if self.cross_file is not None: | ||
115 | + if self.cross_files: | ||
116 | self.builtins['libdir'].value = 'lib' | ||
117 | |||
118 | def sanitize_prefix(self, prefix): | ||
119 | @@ -642,8 +604,8 @@ def read_cmd_line_file(build_dir, options): | ||
120 | options.cmd_line_options = d | ||
121 | |||
122 | properties = config['properties'] | ||
123 | - if options.cross_file is None: | ||
124 | - options.cross_file = properties.get('cross_file', None) | ||
125 | + if not options.cross_file: | ||
126 | + options.cross_file = ast.literal_eval(properties.get('cross_file', '[]')) | ||
127 | if not options.native_file: | ||
128 | # This will be a string in the form: "['first', 'second', ...]", use | ||
129 | # literal_eval to get it into the list of strings. | ||
130 | @@ -654,7 +616,7 @@ def write_cmd_line_file(build_dir, options): | ||
131 | config = CmdLineFileParser() | ||
132 | |||
133 | properties = {} | ||
134 | - if options.cross_file is not None: | ||
135 | + if options.cross_file: | ||
136 | properties['cross_file'] = options.cross_file | ||
137 | if options.native_file: | ||
138 | properties['native_file'] = options.native_file | ||
139 | diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py | ||
140 | index c25ef33..4c1c5ac 100644 | ||
141 | --- a/mesonbuild/environment.py | ||
142 | +++ b/mesonbuild/environment.py | ||
143 | @@ -394,8 +394,9 @@ class Environment: | ||
144 | self.binaries.build = BinaryTable(config.get('binaries', {})) | ||
145 | self.paths.build = Directories(**config.get('paths', {})) | ||
146 | |||
147 | - if self.coredata.cross_file is not None: | ||
148 | - config = MesonConfigFile.parse_datafile(self.coredata.cross_file) | ||
149 | + if self.coredata.cross_files: | ||
150 | + config = MesonConfigFile.from_config_parser( | ||
151 | + coredata.load_configs(self.coredata.cross_files, 'cross')) | ||
152 | self.properties.host = Properties(config.get('properties', {}), False) | ||
153 | self.binaries.host = BinaryTable(config.get('binaries', {}), False) | ||
154 | if 'host_machine' in config: | ||
155 | diff --git a/mesonbuild/msetup.py b/mesonbuild/msetup.py | ||
156 | index 023afdb..6e8ca83 100644 | ||
157 | --- a/mesonbuild/msetup.py | ||
158 | +++ b/mesonbuild/msetup.py | ||
159 | @@ -29,7 +29,9 @@ from .mesonlib import MesonException | ||
160 | |||
161 | def add_arguments(parser): | ||
162 | coredata.register_builtin_arguments(parser) | ||
163 | - parser.add_argument('--cross-file', default=None, | ||
164 | + parser.add_argument('--cross-file', | ||
165 | + default=[], | ||
166 | + action='append', | ||
167 | help='File describing cross compilation environment.') | ||
168 | parser.add_argument('--native-file', | ||
169 | default=[], | ||
170 | diff --git a/mesonbuild/munstable_coredata.py b/mesonbuild/munstable_coredata.py | ||
171 | index 78f3f34..913f942 100644 | ||
172 | --- a/mesonbuild/munstable_coredata.py | ||
173 | +++ b/mesonbuild/munstable_coredata.py | ||
174 | @@ -81,8 +81,9 @@ def run(options): | ||
175 | print('Last seen PKGCONFIG enviroment variable value: ' + v) | ||
176 | elif k == 'version': | ||
177 | print('Meson version: ' + v) | ||
178 | - elif k == 'cross_file': | ||
179 | - print('Cross File: ' + (v or 'None')) | ||
180 | + elif k == 'cross_files': | ||
181 | + if v: | ||
182 | + print('Cross File: ' + ' '.join(v)) | ||
183 | elif k == 'config_files': | ||
184 | if v: | ||
185 | print('Native File: ' + ' '.join(v)) | ||
diff --git a/meta/recipes-devtools/meson/meson/load-configs-generalise-search-path.patch b/meta/recipes-devtools/meson/meson/load-configs-generalise-search-path.patch deleted file mode 100644 index 2056763db5..0000000000 --- a/meta/recipes-devtools/meson/meson/load-configs-generalise-search-path.patch +++ /dev/null | |||
@@ -1,53 +0,0 @@ | |||
1 | From d57dd1092e84e08ee15d7063b6c56bd6d864f2e1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Ross Burton <ross.burton@intel.com> | ||
3 | Date: Mon, 18 Mar 2019 16:16:56 +0000 | ||
4 | Subject: [PATCH] load_configs: generalise the search path | ||
5 | |||
6 | Instead of hard-coding the fact that load_configs() searches for files under | ||
7 | meson/native, pass in the subdirectory allowing the cross-file code to use the | ||
8 | same logic. | ||
9 | |||
10 | Upstream-Status: Backport | ||
11 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
12 | --- | ||
13 | mesonbuild/coredata.py | 6 +++--- | ||
14 | mesonbuild/environment.py | 2 +- | ||
15 | 2 files changed, 4 insertions(+), 4 deletions(-) | ||
16 | |||
17 | diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py | ||
18 | index fba90fa369..6e60917d10 100644 | ||
19 | --- a/mesonbuild/coredata.py | ||
20 | +++ b/mesonbuild/coredata.py | ||
21 | @@ -211,8 +211,8 @@ def is_auto(self): | ||
22 | return self.value == 'auto' | ||
23 | |||
24 | |||
25 | -def load_configs(filenames): | ||
26 | - """Load native files.""" | ||
27 | +def load_configs(filenames, subdir): | ||
28 | + """Load configuration files from a named subdirectory.""" | ||
29 | def gen(): | ||
30 | for f in filenames: | ||
31 | f = os.path.expanduser(os.path.expandvars(f)) | ||
32 | @@ -225,7 +225,7 @@ def gen(): | ||
33 | os.environ.get('XDG_DATA_HOME', os.path.expanduser('~/.local/share')), | ||
34 | ] + os.environ.get('XDG_DATA_DIRS', '/usr/local/share:/usr/share').split(':') | ||
35 | for path in paths: | ||
36 | - path_to_try = os.path.join(path, 'meson', 'native', f) | ||
37 | + path_to_try = os.path.join(path, 'meson', subdir, f) | ||
38 | if os.path.isfile(path_to_try): | ||
39 | yield path_to_try | ||
40 | break | ||
41 | diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py | ||
42 | index 58adb06960..92a00dd7bf 100644 | ||
43 | --- a/mesonbuild/environment.py | ||
44 | +++ b/mesonbuild/environment.py | ||
45 | @@ -408,7 +408,7 @@ def __init__(self, source_dir, build_dir, options): | ||
46 | |||
47 | if self.coredata.config_files is not None: | ||
48 | config = MesonConfigFile.from_config_parser( | ||
49 | - coredata.load_configs(self.coredata.config_files)) | ||
50 | + coredata.load_configs(self.coredata.config_files, 'native')) | ||
51 | self.binaries.build = BinaryTable(config.get('binaries', {})) | ||
52 | self.paths.build = Directories(**config.get('paths', {})) | ||
53 | |||
diff --git a/meta/recipes-devtools/meson/meson_0.50.1.bb b/meta/recipes-devtools/meson/meson_0.51.1.bb index de9b905c12..de9b905c12 100644 --- a/meta/recipes-devtools/meson/meson_0.50.1.bb +++ b/meta/recipes-devtools/meson/meson_0.51.1.bb | |||
diff --git a/meta/recipes-devtools/meson/nativesdk-meson_0.50.1.bb b/meta/recipes-devtools/meson/nativesdk-meson_0.51.1.bb index 1756f342ce..1756f342ce 100644 --- a/meta/recipes-devtools/meson/nativesdk-meson_0.50.1.bb +++ b/meta/recipes-devtools/meson/nativesdk-meson_0.51.1.bb | |||