summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/meson/meson/load-configs-generalise-search-path.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/meson/meson/load-configs-generalise-search-path.patch')
-rw-r--r--meta/recipes-devtools/meson/meson/load-configs-generalise-search-path.patch53
1 files changed, 0 insertions, 53 deletions
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 @@
1From d57dd1092e84e08ee15d7063b6c56bd6d864f2e1 Mon Sep 17 00:00:00 2001
2From: Ross Burton <ross.burton@intel.com>
3Date: Mon, 18 Mar 2019 16:16:56 +0000
4Subject: [PATCH] load_configs: generalise the search path
5
6Instead of hard-coding the fact that load_configs() searches for files under
7meson/native, pass in the subdirectory allowing the cross-file code to use the
8same logic.
9
10Upstream-Status: Backport
11Signed-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
17diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py
18index 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
41diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
42index 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