summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2018-09-06 12:29:27 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-09-06 23:43:34 +0100
commit6c09949663a02015dc8a7b80f581e4867afdd7e3 (patch)
treeeb5cd6178c96372e064ab6b209f02ba0de43f280
parent890093056ccff294364cc768bd797cb54fcbcee3 (diff)
downloadopenembedded-core-6c09949663a02015dc8a7b80f581e4867afdd7e3.tar.gz
openembedded-core-6c09949663a02015dc8a7b80f581e4867afdd7e3.tar.bz2
openembedded-core-6c09949663a02015dc8a7b80f581e4867afdd7e3.zip
meson: update to 0.47.2
Drop backported patches, refresh the rest. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/meson/meson.inc10
-rw-r--r--meta/recipes-devtools/meson/meson/0001-Validate-cpu_family-3753.patch110
-rw-r--r--meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch30
-rw-r--r--meta/recipes-devtools/meson/meson/0001-mesonbuild-Recognise-risc-v-architecture.patch27
-rw-r--r--meta/recipes-devtools/meson/meson/0002-Make-CPU-family-warnings-fatal.patch24
-rw-r--r--meta/recipes-devtools/meson/meson/0003-Send-user-to-our-wiki-instead-of-Meson-bug-system.patch16
-rw-r--r--meta/recipes-devtools/meson/meson/0003-native_bindir.patch44
-rw-r--r--meta/recipes-devtools/meson/meson/0004-Prettifying-some-output-with-pathlib.patch188
-rw-r--r--meta/recipes-devtools/meson/meson/0005-Set-the-meson-command-to-use-when-we-know-what-it-is.patch851
-rw-r--r--meta/recipes-devtools/meson/meson_0.47.2.bb (renamed from meta/recipes-devtools/meson/meson_0.46.1.bb)0
-rw-r--r--meta/recipes-devtools/meson/nativesdk-meson_0.47.2.bb (renamed from meta/recipes-devtools/meson/nativesdk-meson_0.46.1.bb)0
11 files changed, 62 insertions, 1238 deletions
diff --git a/meta/recipes-devtools/meson/meson.inc b/meta/recipes-devtools/meson/meson.inc
index b5dfa2c2a2..e7f999a205 100644
--- a/meta/recipes-devtools/meson/meson.inc
+++ b/meta/recipes-devtools/meson/meson.inc
@@ -9,19 +9,17 @@ SRC_URI = "https://github.com/mesonbuild/meson/releases/download/${PV}/meson-${P
file://0002-gobject-introspection-determine-g-ir-scanner-and-g-i.patch \
file://0001-Linker-rules-move-cross_args-in-front-of-output_args.patch \
file://0003-native_bindir.patch \
- file://0004-Prettifying-some-output-with-pathlib.patch \
- file://0005-Set-the-meson-command-to-use-when-we-know-what-it-is.patch \
- file://0001-Validate-cpu_family-3753.patch \
file://0002-Make-CPU-family-warnings-fatal.patch \
file://0003-Send-user-to-our-wiki-instead-of-Meson-bug-system.patch \
- file://0001-mesonbuild-Recognise-risc-v-architecture.patch \
file://0001-Support-building-allarch-recipes-again.patch \
"
+SRC_URI[sha256sum] = "92d8afd921751261e36151643464efd3394162f69efbe8cd53e0a66b1cf395eb"
+SRC_URI[md5sum] = "31bda3519d8c0eb3438267268a78085e"
-SRC_URI[md5sum] = "1698f6526574839de5dcdc45e3f7d582"
-SRC_URI[sha256sum] = "19497a03e7e5b303d8d11f98789a79aba59b5ad4a81bd00f4d099be0212cee78"
UPSTREAM_CHECK_URI = "https://github.com/mesonbuild/meson/releases"
inherit setuptools3
RDEPENDS_${PN} = "ninja python3-core python3-modules"
+
+FILES_${PN} += "${datadir}/polkit-1"
diff --git a/meta/recipes-devtools/meson/meson/0001-Validate-cpu_family-3753.patch b/meta/recipes-devtools/meson/meson/0001-Validate-cpu_family-3753.patch
deleted file mode 100644
index 6b0d0ca588..0000000000
--- a/meta/recipes-devtools/meson/meson/0001-Validate-cpu_family-3753.patch
+++ /dev/null
@@ -1,110 +0,0 @@
-From 12fe95b1943eb832a54ba09274fa02c60d04f6b0 Mon Sep 17 00:00:00 2001
-From: Ross Burton <ross@burtonini.com>
-Date: Wed, 20 Jun 2018 13:45:44 +0100
-Subject: [PATCH 1/3] Validate cpu_family (#3753)
-
-* environment: validate cpu_family in cross file
-
-* run_unittests: add unittest to ensure CPU family list in docs and environment matches
-
-* run_unittests: skip compiler options test if not in a git repository
-
-* environment: validate the detected cpu_family
-
-* docs: add 32-bit PowerPC and 32/64-bit MIPS to CPU Families table
-
-Names gathered by booting Linux in Qemu and running:
-
-$ python3
-import platform; platform.machine()
-
-Partial fix for #3751
-
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.burton@intel.com>
----
- mesonbuild/environment.py | 24 ++++++++++++++++++++++++
- run_unittests.py | 18 ++++++++++++++++++
- 2 files changed, 42 insertions(+)
-
-diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
-index d02a837..678d009 100644
---- a/mesonbuild/environment.py
-+++ b/mesonbuild/environment.py
-@@ -72,6 +72,22 @@ from .compilers import (
-
- build_filename = 'meson.build'
-
-+known_cpu_families = (
-+ 'aarch64',
-+ 'arm',
-+ 'e2k',
-+ 'ia64',
-+ 'mips',
-+ 'mips64',
-+ 'parisc',
-+ 'ppc',
-+ 'ppc64',
-+ 'ppc64le',
-+ 'sparc64',
-+ 'x86',
-+ 'x86_64'
-+)
-+
- # Environment variables that each lang uses.
- cflags_mapping = {'c': 'CFLAGS',
- 'cpp': 'CXXFLAGS',
-@@ -210,6 +226,10 @@ def detect_cpu_family(compilers):
- pass
- return 'x86_64'
- # Add fixes here as bugs are reported.
-+
-+ if trial not in known_cpu_families:
-+ mlog.warning('Unknown CPU family %s, please report this at https://github.com/mesonbuild/meson/issues/new' % trial)
-+
- return trial
-
- def detect_cpu(compilers):
-@@ -1021,6 +1041,10 @@ class CrossBuildInfo:
- res = eval(value, {'__builtins__': None}, {'true': True, 'false': False})
- except Exception:
- raise EnvironmentException('Malformed value in cross file variable %s.' % entry)
-+
-+ if entry == 'cpu_family' and res not in known_cpu_families:
-+ mlog.warning('Unknown CPU family %s, please report this at https://github.com/mesonbuild/meson/issues/new' % value)
-+
- if self.ok_type(res):
- self.config[s][entry] = res
- elif isinstance(res, list):
-diff --git a/run_unittests.py b/run_unittests.py
-index 3c215db..7185008 100755
---- a/run_unittests.py
-+++ b/run_unittests.py
-@@ -2065,6 +2065,24 @@ recommended as it can lead to undefined behaviour on some platforms''')
- self.wipe()
-
-
-+ @unittest.skipIf(not os.path.isdir('docs'), 'Doc dir not found, presumably because this is a tarball release.')
-+ def test_cpu_families_documented(self):
-+ with open("docs/markdown/Reference-tables.md") as f:
-+ md = f.read()
-+ self.assertIsNotNone(md)
-+
-+ sections = list(re.finditer(r"^## (.+)$", md, re.MULTILINE))
-+ for s1, s2 in zip(sections[::2], sections[1::2]):
-+ if s1.group(1) == "CPU families":
-+ # Extract the content for this section
-+ content = md[s1.end():s2.start()]
-+ # Find the list entries
-+ arches = [m.group(1) for m in re.finditer(r"^\| (\w+) +\|", content, re.MULTILINE)]
-+ # Drop the header
-+ arches = set(arches[1:])
-+ self.assertEqual(arches, set(mesonbuild.environment.known_cpu_families))
-+
-+
- class FailureTests(BasePlatformTests):
- '''
- Tests that test failure conditions. Build files here should be dynamically
---
-2.12.0
-
diff --git a/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch b/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch
index a00743fda8..57cb678f2c 100644
--- a/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch
+++ b/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch
@@ -1,4 +1,4 @@
-From d1c2b3bf01f1a5897cf5c906ba2326fb68c6af12 Mon Sep 17 00:00:00 2001
+From 3ac4e58c5494bd7e603a325b5b5c2b8075849fee Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex.kanavin@gmail.com>
Date: Fri, 4 Aug 2017 16:16:41 +0300
Subject: [PATCH] gtkdoc: fix issues that arise when cross-compiling
@@ -21,10 +21,10 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
2 files changed, 22 insertions(+), 5 deletions(-)
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
-index 569011e..770ff4f 100644
+index cb69641..727eb6a 100644
--- a/mesonbuild/modules/gnome.py
+++ b/mesonbuild/modules/gnome.py
-@@ -773,6 +773,10 @@ This will become a hard error in the future.''')
+@@ -792,6 +792,10 @@ This will become a hard error in the future.''')
'--mode=' + mode]
if namespace:
args.append('--namespace=' + namespace)
@@ -35,10 +35,10 @@ index 569011e..770ff4f 100644
args += self._unpack_args('--htmlargs=', 'html_args', kwargs)
args += self._unpack_args('--scanargs=', 'scan_args', kwargs)
args += self._unpack_args('--scanobjsargs=', 'scanobjs_args', kwargs)
-@@ -829,14 +833,22 @@ This will become a hard error in the future.''')
- cflags.update(get_include_args(inc_dirs))
- cflags.update(state.environment.coredata.external_args['c'])
- ldflags.update(state.environment.coredata.external_link_args['c'])
+@@ -854,14 +858,22 @@ This will become a hard error in the future.''')
+ ldflags.update(internal_ldflags)
+ ldflags.update(state.environment.coredata.get_external_link_args('c'))
+ ldflags.update(external_ldflags)
+
+ cross_c_args = " ".join(state.environment.cross_info.config["properties"].get('c_args', ""))
+ cross_link_args = " ".join(state.environment.cross_info.config["properties"].get('c_link_args', ""))
@@ -62,7 +62,7 @@ index 569011e..770ff4f 100644
return args
diff --git a/mesonbuild/scripts/gtkdochelper.py b/mesonbuild/scripts/gtkdochelper.py
-index 2a5ee8b..2fd692b 100644
+index 948dc5a..9c5bd19 100644
--- a/mesonbuild/scripts/gtkdochelper.py
+++ b/mesonbuild/scripts/gtkdochelper.py
@@ -45,6 +45,7 @@ parser.add_argument('--ignore-headers', dest='ignore_headers', default='')
@@ -71,9 +71,9 @@ index 2a5ee8b..2fd692b 100644
parser.add_argument('--installdir', dest='install_dir')
+parser.add_argument('--gtkdoc-exe-wrapper', dest='gtkdoc_exe_wrapper')
- def gtkdoc_run_check(cmd, cwd, library_path=None):
- env = dict(os.environ)
-@@ -54,7 +55,7 @@ def gtkdoc_run_check(cmd, cwd, library_path=None):
+ def gtkdoc_run_check(cmd, cwd, library_paths=None):
+ if library_paths is None:
+@@ -64,7 +65,7 @@ def gtkdoc_run_check(cmd, cwd, library_paths=None):
# This preserves the order of messages.
p, out = Popen_safe(cmd, cwd=cwd, env=env, stderr=subprocess.STDOUT)[0:2]
if p.returncode != 0:
@@ -82,7 +82,7 @@ index 2a5ee8b..2fd692b 100644
if out:
err_msg.append(out)
raise MesonException('\n'.join(err_msg))
-@@ -62,7 +63,7 @@ def gtkdoc_run_check(cmd, cwd, library_path=None):
+@@ -74,7 +75,7 @@ def gtkdoc_run_check(cmd, cwd, library_paths=None):
def build_gtkdoc(source_root, build_root, doc_subdir, src_subdirs,
main_file, module,
html_args, scan_args, fixxref_args, mkdb_args,
@@ -91,7 +91,7 @@ index 2a5ee8b..2fd692b 100644
html_assets, content_files, ignore_headers, namespace,
expand_content_files, mode):
print("Building documentation for %s" % module)
-@@ -115,6 +116,9 @@ def build_gtkdoc(source_root, build_root, doc_subdir, src_subdirs,
+@@ -135,6 +136,9 @@ def build_gtkdoc(source_root, build_root, doc_subdir, src_subdirs,
if gobject_typesfile:
scanobjs_cmd = ['gtkdoc-scangobj'] + scanobjs_args + ['--types=' + gobject_typesfile,
'--module=' + module,
@@ -100,8 +100,8 @@ index 2a5ee8b..2fd692b 100644
+ '--ld=' + ld,
'--cflags=' + cflags,
'--ldflags=' + ldflags,
- '--ld=' + ld]
-@@ -219,6 +223,7 @@ def run(args):
+ '--cc=' + cc,
+@@ -238,6 +242,7 @@ def run(args):
mkdbargs,
options.gobject_typesfile,
scanobjsargs,
diff --git a/meta/recipes-devtools/meson/meson/0001-mesonbuild-Recognise-risc-v-architecture.patch b/meta/recipes-devtools/meson/meson/0001-mesonbuild-Recognise-risc-v-architecture.patch
deleted file mode 100644
index a983bd7a9b..0000000000
--- a/meta/recipes-devtools/meson/meson/0001-mesonbuild-Recognise-risc-v-architecture.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 85bb96909d2024769d8e758538a7e8e2004dbb4d Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 14 Jul 2018 13:03:39 -0700
-Subject: [PATCH] mesonbuild: Recognise risc-v architecture
-
-Upstream-Status: Backport [https://github.com/mesonbuild/meson/commit/6fafbad6d5ba591075a72e4726af647cece7020d]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- mesonbuild/environment.py | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
-index a0580a21..b2041424 100644
---- a/mesonbuild/environment.py
-+++ b/mesonbuild/environment.py
-@@ -83,6 +83,8 @@ known_cpu_families = (
- 'ppc',
- 'ppc64',
- 'ppc64le',
-+ 'riscv32',
-+ 'riscv64',
- 'sparc64',
- 'x86',
- 'x86_64'
---
-2.18.0
-
diff --git a/meta/recipes-devtools/meson/meson/0002-Make-CPU-family-warnings-fatal.patch b/meta/recipes-devtools/meson/meson/0002-Make-CPU-family-warnings-fatal.patch
index 3b377351a2..a6c1b25c46 100644
--- a/meta/recipes-devtools/meson/meson/0002-Make-CPU-family-warnings-fatal.patch
+++ b/meta/recipes-devtools/meson/meson/0002-Make-CPU-family-warnings-fatal.patch
@@ -1,28 +1,31 @@
-From 9681c5bdea6a67abf014d94a392ef42eea7df0cd Mon Sep 17 00:00:00 2001
+From 2e8553fc01e62ebc4faa240bf20984a8a0ac7387 Mon Sep 17 00:00:00 2001
From: Ross Burton <ross.burton@intel.com>
Date: Tue, 3 Jul 2018 13:59:09 +0100
-Subject: [PATCH 2/3] Make CPU family warnings fatal
+Subject: [PATCH] Make CPU family warnings fatal
Upstream-Status: Inappropriate [OE specific]
Signed-off-by: Ross Burton <ross.burton@intel.com>
+
---
- mesonbuild/environment.py | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
+ mesonbuild/environment.py | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
-index 678d009..8b32892 100644
+index d29a77f..267acf9 100644
--- a/mesonbuild/environment.py
+++ b/mesonbuild/environment.py
-@@ -228,7 +228,7 @@ def detect_cpu_family(compilers):
- # Add fixes here as bugs are reported.
+@@ -239,9 +239,7 @@ def detect_cpu_family(compilers):
+ return 'x86_64'
if trial not in known_cpu_families:
-- mlog.warning('Unknown CPU family %s, please report this at https://github.com/mesonbuild/meson/issues/new' % trial)
+- mlog.warning('Unknown CPU family {!r}, please report this at '
+- 'https://github.com/mesonbuild/meson/issues/new with the'
+- 'output of `uname -a` and `cat /proc/cpuinfo`'.format(trial))
+ raise EnvironmentException('Unknown CPU family %s, please report this at https://github.com/mesonbuild/meson/issues/new' % trial)
return trial
-@@ -1043,7 +1043,7 @@ class CrossBuildInfo:
+@@ -1014,7 +1012,7 @@ class CrossBuildInfo:
raise EnvironmentException('Malformed value in cross file variable %s.' % entry)
if entry == 'cpu_family' and res not in known_cpu_families:
@@ -31,6 +34,3 @@ index 678d009..8b32892 100644
if self.ok_type(res):
self.config[s][entry] = res
---
-2.12.0
-
diff --git a/meta/recipes-devtools/meson/meson/0003-Send-user-to-our-wiki-instead-of-Meson-bug-system.patch b/meta/recipes-devtools/meson/meson/0003-Send-user-to-our-wiki-instead-of-Meson-bug-system.patch
index 8f4603e767..5295335730 100644
--- a/meta/recipes-devtools/meson/meson/0003-Send-user-to-our-wiki-instead-of-Meson-bug-system.patch
+++ b/meta/recipes-devtools/meson/meson/0003-Send-user-to-our-wiki-instead-of-Meson-bug-system.patch
@@ -1,7 +1,7 @@
-From 62f4702a1d5076d0c225f899fe65cd3badfdd022 Mon Sep 17 00:00:00 2001
+From 31df0a854aa40c4ce8fbf1ca02ccc9b6bff0abfd Mon Sep 17 00:00:00 2001
From: Ross Burton <ross.burton@intel.com>
Date: Fri, 6 Jul 2018 15:51:15 +0100
-Subject: [PATCH 3/3] Send user to our wiki instead of Meson bug system
+Subject: [PATCH] Send user to our wiki instead of Meson bug system
If a CPU family isn't recognised the first step should be to verify the
mapping. Send the user to a wiki page explaining what to do, instead of
@@ -9,16 +9,17 @@ directly to the Meson bug tracker.
Upstream-Status: Inappropriate [OE specific]
Signed-off-by: Ross Burton <ross.burton@intel.com>
+
---
mesonbuild/environment.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
-index 8b32892..a0580a2 100644
+index 267acf9..19a3c1e 100644
--- a/mesonbuild/environment.py
+++ b/mesonbuild/environment.py
-@@ -228,7 +228,7 @@ def detect_cpu_family(compilers):
- # Add fixes here as bugs are reported.
+@@ -239,7 +239,7 @@ def detect_cpu_family(compilers):
+ return 'x86_64'
if trial not in known_cpu_families:
- raise EnvironmentException('Unknown CPU family %s, please report this at https://github.com/mesonbuild/meson/issues/new' % trial)
@@ -26,7 +27,7 @@ index 8b32892..a0580a2 100644
return trial
-@@ -1043,7 +1043,7 @@ class CrossBuildInfo:
+@@ -1012,7 +1012,7 @@ class CrossBuildInfo:
raise EnvironmentException('Malformed value in cross file variable %s.' % entry)
if entry == 'cpu_family' and res not in known_cpu_families:
@@ -35,6 +36,3 @@ index 8b32892..a0580a2 100644
if self.ok_type(res):
self.config[s][entry] = res
---
-2.12.0
-
diff --git a/meta/recipes-devtools/meson/meson/0003-native_bindir.patch b/meta/recipes-devtools/meson/meson/0003-native_bindir.patch
index f00327714b..da477454cb 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 @@
-From 0eec9428376450917098c68539a6c9dd60b85d93 Mon Sep 17 00:00:00 2001
+From e762d85c823adfefc27ba6128c7b997aa50166ce Mon Sep 17 00:00:00 2001
From: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Date: Wed, 15 Nov 2017 15:05:01 +0100
Subject: [PATCH] native_bindir
@@ -22,10 +22,10 @@ Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
2 files changed, 14 insertions(+), 11 deletions(-)
diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py
-index 0114a14..f4f19c5 100644
+index 6d3678f..90fdb80 100644
--- a/mesonbuild/dependencies/base.py
+++ b/mesonbuild/dependencies/base.py
-@@ -141,7 +141,7 @@ class Dependency:
+@@ -146,7 +146,7 @@ class Dependency:
def need_threads(self):
return False
@@ -34,7 +34,7 @@ index 0114a14..f4f19c5 100644
raise DependencyException('{!r} is not a pkgconfig dependency'.format(self.name))
def get_configtool_variable(self, variable_name):
-@@ -178,7 +178,7 @@ class InternalDependency(Dependency):
+@@ -183,7 +183,7 @@ class InternalDependency(Dependency):
self.sources = sources
self.ext_deps = ext_deps
@@ -43,25 +43,29 @@ index 0114a14..f4f19c5 100644
raise DependencyException('Method "get_pkgconfig_variable()" is '
'invalid for an internal dependency')
-@@ -517,11 +517,14 @@ class PkgConfigDependency(ExternalDependency):
+@@ -523,15 +523,18 @@ class PkgConfigDependency(ExternalDependency):
return s.format(self.__class__.__name__, self.name, self.is_found,
self.version_reqs)
- def _call_pkgbin_real(self, args, env):
-- p, out = Popen_safe(self.pkgbin.get_command() + args, env=env)[0:2]
+- cmd = self.pkgbin.get_command() + args
+ def _call_pkgbin_real(self, args, env, use_native=False):
+ if use_native:
-+ p, out = Popen_safe(self.pkgbin.get_command() + "-native" + args, env=env)[0:2]
++ cmd = self.pkgbin.get_command() + "-native" + args
+ else:
-+ p, out = Popen_safe(self.pkgbin.get_command() + args, env=env)[0:2]
- return p.returncode, out.strip()
++ cmd = self.pkgbin.get_command() + args
+ p, out = Popen_safe(cmd, env=env)[0:2]
+ rc, out = p.returncode, out.strip()
+ call = ' '.join(cmd)
+ mlog.debug("Called `{}` -> {}\n{}".format(call, rc, out))
+ return rc, out
- def _call_pkgbin(self, args, env=None):
+ def _call_pkgbin(self, args, env=None, use_native=False):
if env is None:
fenv = env
env = os.environ
-@@ -530,7 +533,7 @@ class PkgConfigDependency(ExternalDependency):
+@@ -540,7 +543,7 @@ class PkgConfigDependency(ExternalDependency):
targs = tuple(args)
cache = PkgConfigDependency.pkgbin_cache
if (self.pkgbin, targs, fenv) not in cache:
@@ -70,16 +74,16 @@ index 0114a14..f4f19c5 100644
return cache[(self.pkgbin, targs, fenv)]
def _convert_mingw_paths(self, args):
-@@ -630,7 +633,7 @@ class PkgConfigDependency(ExternalDependency):
- # linkers such as MSVC, so prepend them.
- self.link_args = ['-L' + lp for lp in libpaths] + self.link_args
+@@ -718,7 +721,7 @@ class PkgConfigDependency(ExternalDependency):
+ (self.name, out_raw))
+ self.link_args, self.raw_link_args = self._search_libs(out, out_raw)
- def get_pkgconfig_variable(self, variable_name, kwargs):
+ def get_pkgconfig_variable(self, variable_name, kwargs, use_native=False):
options = ['--variable=' + variable_name, self.name]
if 'define_variable' in kwargs:
-@@ -643,7 +646,7 @@ class PkgConfigDependency(ExternalDependency):
+@@ -731,7 +734,7 @@ class PkgConfigDependency(ExternalDependency):
options = ['--define-variable=' + '='.join(definition)] + options
@@ -89,10 +93,10 @@ index 0114a14..f4f19c5 100644
if ret != 0:
if self.required:
diff --git a/mesonbuild/dependencies/ui.py b/mesonbuild/dependencies/ui.py
-index 2f31196..916f648 100644
+index 197d22c..c683d21 100644
--- a/mesonbuild/dependencies/ui.py
+++ b/mesonbuild/dependencies/ui.py
-@@ -240,7 +240,7 @@ class QtBaseDependency(ExternalDependency):
+@@ -285,7 +285,7 @@ class QtBaseDependency(ExternalDependency):
self.bindir = self.get_pkgconfig_host_bins(core)
if not self.bindir:
# If exec_prefix is not defined, the pkg-config file is broken
@@ -101,7 +105,7 @@ index 2f31196..916f648 100644
if prefix:
self.bindir = os.path.join(prefix, 'bin')
-@@ -374,7 +374,7 @@ class Qt4Dependency(QtBaseDependency):
+@@ -427,7 +427,7 @@ class Qt4Dependency(QtBaseDependency):
applications = ['moc', 'uic', 'rcc', 'lupdate', 'lrelease']
for application in applications:
try:
@@ -110,12 +114,12 @@ index 2f31196..916f648 100644
except MesonException:
pass
-@@ -384,7 +384,7 @@ class Qt5Dependency(QtBaseDependency):
+@@ -437,7 +437,7 @@ class Qt5Dependency(QtBaseDependency):
QtBaseDependency.__init__(self, 'qt5', env, kwargs)
def get_pkgconfig_host_bins(self, core):
- return core.get_pkgconfig_variable('host_bins', {})
+ return core.get_pkgconfig_variable('host_bins', {}, use_native=True)
-
- # There are three different ways of depending on SDL2:
+ def get_private_includes(self, mod_inc_dir, module):
+ return _qt_get_private_includes(mod_inc_dir, module, self.version)
diff --git a/meta/recipes-devtools/meson/meson/0004-Prettifying-some-output-with-pathlib.patch b/meta/recipes-devtools/meson/meson/0004-Prettifying-some-output-with-pathlib.patch
deleted file mode 100644
index e75633beb9..0000000000
--- a/meta/recipes-devtools/meson/meson/0004-Prettifying-some-output-with-pathlib.patch
+++ /dev/null
@@ -1,188 +0,0 @@
-From 253ab5bf6d6d925abcf625b72f5fcacf99be13bd Mon Sep 17 00:00:00 2001
-From: Niklas Claesson <nicke.claesson@gmail.com>
-Date: Wed, 18 Apr 2018 15:25:03 +0200
-Subject: [PATCH] Prettifying some output with pathlib
-
-This is a backport required in order to make
-0005-Set-the-meson-command-to-use-when-we-know-what-it-is.patch apply.
-
-Upstream-Status: Accepted [https://github.com/mesonbuild/meson/pull/3423]
-Should be in the 0.47.0 release.
-
-Signed-off-by: Martin Kelly <mkelly@xevo.com>
----
- run_cross_test.py | 6 ++++--
- run_project_tests.py | 51 +++++++++++++++++++++++++++++----------------------
- 2 files changed, 33 insertions(+), 24 deletions(-)
-
-diff --git a/run_cross_test.py b/run_cross_test.py
-index e285e218..71914028 100755
---- a/run_cross_test.py
-+++ b/run_cross_test.py
-@@ -22,13 +22,15 @@ Not part of the main test suite because of two reasons:
-
- Eventually migrate to something fancier.'''
-
--import sys, os
-+import sys
-+import os
-+from pathlib import Path
-
- from run_project_tests import gather_tests, run_tests, StopException, setup_commands
- from run_project_tests import failing_logs
-
- def runtests(cross_file):
-- commontests = [('common', gather_tests('test cases/common'), False)]
-+ commontests = [('common', gather_tests(Path('test cases', 'common')), False)]
- try:
- (passing_tests, failing_tests, skipped_tests) = run_tests(commontests, 'meson-cross-test-run', ['--cross', cross_file])
- except StopException:
-diff --git a/run_project_tests.py b/run_project_tests.py
-index 8c02a9ee..3c516240 100755
---- a/run_project_tests.py
-+++ b/run_project_tests.py
-@@ -14,14 +14,22 @@
- # See the License for the specific language governing permissions and
- # limitations under the License.
-
--from glob import glob
- import itertools
--import os, subprocess, shutil, sys, signal
-+import os
-+import subprocess
-+import shutil
-+import sys
-+import signal
- from io import StringIO
- from ast import literal_eval
- from enum import Enum
- import tempfile
--from mesonbuild import build, environment, mesonlib, mlog, mtest
-+from pathlib import Path, PurePath
-+from mesonbuild import build
-+from mesonbuild import environment
-+from mesonbuild import mesonlib
-+from mesonbuild import mlog
-+from mesonbuild import mtest
- from mesonbuild.mesonlib import stringlistify, Popen_safe
- from mesonbuild.coredata import backendlist
- import argparse
-@@ -198,7 +206,7 @@ def validate_install(srcdir, installdir, compiler, env):
-
- def log_text_file(logfile, testdir, stdo, stde):
- global stop, executor, futures
-- logfile.write('%s\nstdout\n\n---\n' % testdir)
-+ logfile.write('%s\nstdout\n\n---\n' % testdir.as_posix())
- logfile.write(stdo)
- logfile.write('\n\n---\n\nstderr\n\n---\n')
- logfile.write(stde)
-@@ -245,11 +253,11 @@ def run_test_inprocess(testdir):
- sys.stderr = mystderr = StringIO()
- old_cwd = os.getcwd()
- os.chdir(testdir)
-- test_log_fname = 'meson-logs/testlog.txt'
-+ test_log_fname = Path('meson-logs', 'testlog.txt')
- try:
- returncode_test = mtest.run(['--no-rebuild'])
-- if os.path.exists(test_log_fname):
-- test_log = open(test_log_fname, errors='ignore').read()
-+ if test_log_fname.exists():
-+ test_log = test_log_fname.open(errors='ignore').read()
- else:
- test_log = ''
- returncode_benchmark = mtest.run(['--no-rebuild', '--benchmark', '--logbase', 'benchmarklog'])
-@@ -318,9 +326,8 @@ def _run_test(testdir, test_build_dir, install_dir, extra_args, compiler, backen
- gen_args += [testdir, test_build_dir] + flags + test_args + extra_args
- (returncode, stdo, stde) = run_configure(meson_command, gen_args)
- try:
-- logfile = os.path.join(test_build_dir, 'meson-logs/meson-log.txt')
-- with open(logfile, encoding='utf-8', errors='ignore') as f:
-- mesonlog = f.read()
-+ logfile = Path(test_build_dir, 'meson-logs', 'meson-log.txt')
-+ mesonlog = logfile.open(errors='ignore', encoding='utf-8').read()
- except Exception:
- mesonlog = no_meson_log_msg
- gen_time = time.time() - gen_start
-@@ -390,11 +397,11 @@ def _run_test(testdir, test_build_dir, install_dir, extra_args, compiler, backen
- return TestResult(validate_install(testdir, install_dir, compiler, builddata.environment),
- BuildStep.validate, stdo, stde, mesonlog, gen_time, build_time, test_time)
-
--def gather_tests(testdir):
-- tests = [t.replace('\\', '/').split('/', 2)[2] for t in glob(testdir + '/*')]
-+def gather_tests(testdir: Path):
-+ tests = [t.name for t in testdir.glob('*')]
- testlist = [(int(t.split()[0]), t) for t in tests]
- testlist.sort()
-- tests = [os.path.join(testdir, t[1]) for t in testlist]
-+ tests = [testdir / t[1] for t in testlist]
- return tests
-
- def have_d_compiler():
-@@ -517,7 +524,7 @@ def detect_tests_to_run():
- ('fpga', 'fpga', shutil.which('yosys') is None),
- ('frameworks', 'frameworks', False),
- ]
-- gathered_tests = [(name, gather_tests('test cases/' + subdir), skip) for name, subdir, skip in all_tests]
-+ gathered_tests = [(name, gather_tests(Path('test cases', subdir)), skip) for name, subdir, skip in all_tests]
- return gathered_tests
-
- def run_tests(all_tests, log_name_base, extra_args):
-@@ -566,18 +573,18 @@ def _run_tests(all_tests, log_name_base, extra_args):
- for t in test_cases:
- # Jenkins screws us over by automatically sorting test cases by name
- # and getting it wrong by not doing logical number sorting.
-- (testnum, testbase) = os.path.split(t)[-1].split(' ', 1)
-+ (testnum, testbase) = t.name.split(' ', 1)
- testname = '%.3d %s' % (int(testnum), testbase)
- should_fail = False
- if name.startswith('failing'):
- should_fail = name.split('failing-')[1]
-- result = executor.submit(run_test, skipped, t, extra_args, system_compiler, backend, backend_flags, commands, should_fail)
-+ result = executor.submit(run_test, skipped, t.as_posix(), extra_args, system_compiler, backend, backend_flags, commands, should_fail)
- futures.append((testname, t, result))
- for (testname, t, result) in futures:
- sys.stdout.flush()
- result = result.result()
-- if (result is None) or (('MESON_SKIP_TEST' in result.stdo) and (skippable(name, t))):
-- print(yellow('Skipping:'), t)
-+ if (result is None) or (('MESON_SKIP_TEST' in result.stdo) and (skippable(name, t.as_posix()))):
-+ print(yellow('Skipping:'), t.as_posix())
- current_test = ET.SubElement(current_suite, 'testcase', {'name': testname,
- 'classname': name})
- ET.SubElement(current_test, 'skipped', {})
-@@ -585,7 +592,7 @@ def _run_tests(all_tests, log_name_base, extra_args):
- else:
- without_install = "" if len(install_commands) > 0 else " (without install)"
- if result.msg != '':
-- print(red('Failed test{} during {}: {!r}'.format(without_install, result.step.name, t)))
-+ print(red('Failed test{} during {}: {!r}'.format(without_install, result.step.name, t.as_posix())))
- print('Reason:', result.msg)
- failing_tests += 1
- if result.step == BuildStep.configure and result.mlog != no_meson_log_msg:
-@@ -597,7 +604,7 @@ def _run_tests(all_tests, log_name_base, extra_args):
- failing_logs.append(result.stdo)
- failing_logs.append(result.stde)
- else:
-- print('Succeeded test%s: %s' % (without_install, t))
-+ print('Succeeded test%s: %s' % (without_install, t.as_posix()))
- passing_tests += 1
- conf_time += result.conftime
- build_time += result.buildtime
-@@ -641,7 +648,7 @@ def check_format():
-
- def check_meson_commands_work():
- global backend, meson_command, compile_commands, test_commands, install_commands
-- testdir = 'test cases/common/1 trivial'
-+ testdir = PurePath('test cases', 'common', '1 trivial').as_posix()
- with AutoDeletedDir(tempfile.mkdtemp(prefix='b ', dir='.')) as build_dir:
- print('Checking that configuring works...')
- gen_cmd = mesonlib.meson_command + [testdir, build_dir] + backend_flags
-@@ -706,7 +713,7 @@ if __name__ == '__main__':
- except UnicodeError:
- print(l.encode('ascii', errors='replace').decode(), '\n')
- for name, dirs, skip in all_tests:
-- dirs = (os.path.basename(x) for x in dirs)
-+ dirs = (x.name for x in dirs)
- for k, g in itertools.groupby(dirs, key=lambda x: x.split()[0]):
- tests = list(g)
- if len(tests) != 1:
diff --git a/meta/recipes-devtools/meson/meson/0005-Set-the-meson-command-to-use-when-we-know-what-it-is.patch b/meta/recipes-devtools/meson/meson/0005-Set-the-meson-command-to-use-when-we-know-what-it-is.patch
deleted file mode 100644
index 8fb277a150..0000000000
--- a/meta/recipes-devtools/meson/meson/0005-Set-the-meson-command-to-use-when-we-know-what-it-is.patch
+++ /dev/null
@@ -1,851 +0,0 @@
-From 717480549bea68ed2da1420141f64c1c15cda11d Mon Sep 17 00:00:00 2001
-From: Nirbheek Chauhan <nirbheek@centricular.com>
-Date: Fri, 1 Jun 2018 13:00:17 +0530
-Subject: [PATCH] Set the meson command to use when we know what it is
-
-Instead of using fragile guessing to figure out how to invoke meson,
-set the value when meson is run. Also rework how we pass of
-meson_script_launcher to regenchecker.py -- it wasn't even being used
-
-With this change, we only need to guess the meson path when running
-the tests, and in that case:
-
-1. If MESON_EXE is set in the env, we know how to run meson
- for project tests.
-2. MESON_EXE is not set, which means we run the configure in-process
- for project tests and need to guess what meson to run, so either
- - meson.py is found next to run_tests.py, or
- - meson, meson.py, or meson.exe is in PATH
-
-Otherwise, you can invoke meson in the following ways:
-
-1. meson is installed, and mesonbuild is available in PYTHONPATH:
- - meson, meson.py, meson.exe from PATH
- - python3 -m mesonbuild.mesonmain
- - python3 /path/to/meson.py
- - meson is a shell wrapper to meson.real
-2. meson is not installed, and is run from git:
- - Absolute path to meson.py
- - Relative path to meson.py
- - Symlink to meson.py
-
-All these are tested in test_meson_commands.py, except meson.exe since
-that involves building the meson msi and installing it.
-
-Upstream-Status: Accepted [https://github.com/mesonbuild/meson/pull/3654]
-Should be in the 0.47.0 release.
-
-Signed-off-by: Martin Kelly <mkelly@xevo.com>
----
- meson.py | 17 ++--
- mesonbuild/environment.py | 6 +-
- mesonbuild/mesonlib.py | 48 +---------
- mesonbuild/mesonmain.py | 34 +++++--
- mesonbuild/scripts/regen_checker.py | 6 +-
- run_meson_command_tests.py | 186 ++++++++++++++++++++++++++++++++++++
- run_project_tests.py | 20 ++--
- run_tests.py | 43 +++++++--
- run_unittests.py | 64 +++++--------
- 9 files changed, 297 insertions(+), 127 delet