Hello community,

here is the log from the commit of package meson for openSUSE:Leap:15.2 checked 
in at 2020-05-31 13:45:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/meson (Old)
 and      /work/SRC/openSUSE:Leap:15.2/.meson.new.3606 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "meson"

Sun May 31 13:45:27 2020 rev:52 rq:809619 version:0.54.2

Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/meson/meson.changes    2020-05-20 
09:06:19.492266177 +0200
+++ /work/SRC/openSUSE:Leap:15.2/.meson.new.3606/meson.changes  2020-05-31 
13:45:36.549653167 +0200
@@ -1,0 +2,15 @@
+Wed May 20 19:27:23 UTC 2020 - Michael Gorse <mgo...@suse.com>
+
+- Make tests arch-dependent. Needed to exclude mono tests on s390x
+  (bsc#1171934).
+
+-------------------------------------------------------------------
+Fri May 15 10:23:21 UTC 2020 - Dominique Leuenberger <dims...@opensuse.org>
+
+- Update to version 0.54.2:
+  + Various fixes around boost.
+  + More robust cmake version detection.
+  + Various GCC10 related fixes.
+- Drop meson-gcc10.patch: fixed upstream.
+
+-------------------------------------------------------------------

Old:
----
  meson-0.54.1.tar.gz
  meson-0.54.1.tar.gz.asc
  meson-gcc10.patch

New:
----
  meson-0.54.2.tar.gz
  meson-0.54.2.tar.gz.asc

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ meson.spec ++++++
--- /var/tmp/diff_new_pack.AbH0Xa/_old  2020-05-31 13:45:37.037654677 +0200
+++ /var/tmp/diff_new_pack.AbH0Xa/_new  2020-05-31 13:45:37.041654689 +0200
@@ -28,7 +28,7 @@
 %{!?vim_data_dir:%global vim_data_dir %{_datadir}/vim}
 %bcond_with     setuptools
 Name:           meson%{name_ext}
-Version:        0.54.1
+Version:        0.54.2
 Release:        0
 Summary:        Python-based build system
 License:        Apache-2.0
@@ -49,12 +49,12 @@
 Patch4:         meson-fix-gcc48.patch
 # PATCH-FEATURE-OPENSUSE meson-distutils.patch tchva...@suse.com -- build and 
install using distutils instead of full setuptools
 Patch5:         meson-distutils.patch
-# PATCH-FIX-UPSTREAM dims...@opensuse.org -- Fix test suite with GCC 10
-Patch6:         meson-gcc10.patch
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
 BuildRequires:  python3-base
+%if "%{flavor}" != "test"
 BuildArch:      noarch
+%endif
 %if %{with setuptools}
 BuildRequires:  python3-setuptools
 Requires:       python3-setuptools
@@ -173,7 +173,6 @@
 %if !%{with setuptools}
 %patch5 -p1
 %endif
-%patch6 -p1
 
 # We do not have gmock available at this moment - can't run the test suite for 
it
 rm -r "test cases/frameworks/3 gmock" \

++++++ meson-0.54.1.tar.gz -> meson-0.54.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meson-0.54.1/PKG-INFO new/meson-0.54.2/PKG-INFO
--- old/meson-0.54.1/PKG-INFO   2020-04-26 11:09:31.108047200 +0200
+++ new/meson-0.54.2/PKG-INFO   2020-05-15 09:24:43.618322600 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: meson
-Version: 0.54.1
+Version: 0.54.2
 Summary: A high performance build system
 Home-page: https://mesonbuild.com
 Author: Jussi Pakkanen
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meson-0.54.1/man/meson.1 new/meson-0.54.2/man/meson.1
--- old/meson-0.54.1/man/meson.1        2020-04-26 11:07:17.000000000 +0200
+++ new/meson-0.54.2/man/meson.1        2020-05-15 09:23:18.000000000 +0200
@@ -1,4 +1,4 @@
-.TH MESON "1" "April 2020" "meson 0.54.1" "User Commands"
+.TH MESON "1" "May 2020" "meson 0.54.2" "User Commands"
 .SH NAME
 meson - a high productivity build system
 .SH DESCRIPTION
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meson-0.54.1/meson.egg-info/PKG-INFO 
new/meson-0.54.2/meson.egg-info/PKG-INFO
--- old/meson-0.54.1/meson.egg-info/PKG-INFO    2020-04-26 11:09:19.000000000 
+0200
+++ new/meson-0.54.2/meson.egg-info/PKG-INFO    2020-05-15 09:24:26.000000000 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: meson
-Version: 0.54.1
+Version: 0.54.2
 Summary: A high performance build system
 Home-page: https://mesonbuild.com
 Author: Jussi Pakkanen
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meson-0.54.1/meson.egg-info/SOURCES.txt 
new/meson-0.54.2/meson.egg-info/SOURCES.txt
--- old/meson-0.54.1/meson.egg-info/SOURCES.txt 2020-04-26 11:09:19.000000000 
+0200
+++ new/meson-0.54.2/meson.egg-info/SOURCES.txt 2020-05-15 09:24:26.000000000 
+0200
@@ -1124,6 +1124,9 @@
 test cases/common/23 object extraction/meson.build
 test cases/common/23 object extraction/src/lib.c
 test cases/common/230 arithmetic operators/meson.build
+test cases/common/233 link depends indexed custom target/foo.c
+test cases/common/233 link depends indexed custom target/make_file.py
+test cases/common/233 link depends indexed custom target/meson.build
 test cases/common/24 endian/meson.build
 test cases/common/24 endian/prog.c
 test cases/common/25 library versions/lib.c
@@ -2125,6 +2128,9 @@
 test cases/frameworks/7 gnome/gir/dep1/dep2/dep2.c
 test cases/frameworks/7 gnome/gir/dep1/dep2/dep2.h
 test cases/frameworks/7 gnome/gir/dep1/dep2/meson.build
+test cases/frameworks/7 gnome/gir/dep1/dep3/dep3.c
+test cases/frameworks/7 gnome/gir/dep1/dep3/dep3.h
+test cases/frameworks/7 gnome/gir/dep1/dep3/meson.build
 test cases/frameworks/7 gnome/mkenums/enums.c.in
 test cases/frameworks/7 gnome/mkenums/enums.h.in
 test cases/frameworks/7 gnome/mkenums/enums2.c.in
@@ -2767,6 +2773,8 @@
 test cases/unit/73 wrap file url/subprojects/foo.tar.xz
 test cases/unit/74 dep files/foo.c
 test cases/unit/74 dep files/meson.build
+test cases/unit/75 subdir libdir/meson.build
+test cases/unit/75 subdir libdir/subprojects/flub/meson.build
 test cases/unit/8 -L -l order/first.pc
 test cases/unit/8 -L -l order/meson.build
 test cases/unit/8 -L -l order/prog.c
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meson-0.54.1/mesonbuild/backend/backends.py 
new/meson-0.54.2/mesonbuild/backend/backends.py
--- old/meson-0.54.1/mesonbuild/backend/backends.py     2020-04-26 
11:07:17.000000000 +0200
+++ new/meson-0.54.2/mesonbuild/backend/backends.py     2020-05-15 
09:23:18.000000000 +0200
@@ -734,7 +734,7 @@
                 # E.g. an external verifier or simulator program run on a 
generated executable.
                 # Can always be run without a wrapper.
                 test_for_machine = MachineChoice.BUILD
-            is_cross = not 
self.environment.machines.matches_build_machine(test_for_machine)
+            is_cross = self.environment.is_cross_build(test_for_machine)
             if is_cross and self.environment.need_exe_wrapper():
                 exe_wrapper = self.environment.get_exe_wrapper()
             else:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meson-0.54.1/mesonbuild/build.py 
new/meson-0.54.2/mesonbuild/build.py
--- old/meson-0.54.1/mesonbuild/build.py        2020-04-26 11:07:17.000000000 
+0200
+++ new/meson-0.54.2/mesonbuild/build.py        2020-05-15 09:23:18.000000000 
+0200
@@ -482,6 +482,7 @@
         self.link_targets = []
         self.link_whole_targets = []
         self.link_depends = []
+        self.added_deps = set()
         self.name_prefix_set = False
         self.name_suffix_set = False
         self.filename = 'no_name'
@@ -714,7 +715,7 @@
                     File.from_source_file(environment.source_dir, self.subdir, 
s))
             elif hasattr(s, 'get_outputs'):
                 self.link_depends.extend(
-                    [File.from_built_file(s.subdir, p) for p in 
s.get_outputs()])
+                    [File.from_built_file(s.get_subdir(), p) for p in 
s.get_outputs()])
             else:
                 raise InvalidArguments(
                     'Link_depends arguments must be strings, Files, '
@@ -1037,6 +1038,8 @@
     def add_deps(self, deps):
         deps = listify(deps)
         for dep in unholder(deps):
+            if dep in self.added_deps:
+                continue
             if isinstance(dep, dependencies.InternalDependency):
                 # Those parts that are internal.
                 self.process_sourcelist(dep.sources)
@@ -1075,6 +1078,7 @@
                                        'either an external dependency 
(returned by find_library() or '
                                        'dependency()) or an internal 
dependency (returned by '
                                        
'declare_dependency()).'.format(type(dep).__name__))
+            self.added_deps.add(dep)
 
     def get_external_deps(self):
         return self.external_deps
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meson-0.54.1/mesonbuild/cmake/executor.py 
new/meson-0.54.2/mesonbuild/cmake/executor.py
--- old/meson-0.54.1/mesonbuild/cmake/executor.py       2020-04-26 
11:07:10.000000000 +0200
+++ new/meson-0.54.2/mesonbuild/cmake/executor.py       2020-05-15 
09:23:18.000000000 +0200
@@ -132,7 +132,7 @@
                 msg += '\n\nOn Unix-like systems this is often caused by 
scripts that are not executable.'
             mlog.warning(msg)
             return None
-        cmvers = re.sub(r'\s*(cmake|cmake3) version\s*', '', 
out.split('\n')[0]).strip()
+        cmvers = re.search(r'(cmake|cmake3)\s*version\s*([\d.]+)', 
out).group(2)
         return cmvers
 
     def set_exec_mode(self, print_cmout: T.Optional[bool] = None, 
always_capture_stderr: T.Optional[bool] = None) -> None:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meson-0.54.1/mesonbuild/cmake/interpreter.py 
new/meson-0.54.2/mesonbuild/cmake/interpreter.py
--- old/meson-0.54.1/mesonbuild/cmake/interpreter.py    2020-04-26 
11:07:17.000000000 +0200
+++ new/meson-0.54.2/mesonbuild/cmake/interpreter.py    2020-05-15 
09:23:18.000000000 +0200
@@ -287,7 +287,17 @@
             for j in self.compile_opts[i]:
                 m = ConverterTarget.std_regex.match(j)
                 if m:
-                    self.override_options += ['{}_std={}'.format(i, 
m.group(2))]
+                    std = m.group(2)
+                    supported = self._all_lang_stds(i)
+                    if std not in supported:
+                        mlog.warning(
+                            'Unknown {0}_std "{1}" -> Ignoring. Try setting 
the project-'
+                            'level {0}_std if build errors occur. Known '
+                            '{0}_stds are: {2}'.format(i, std, ' 
'.join(supported)),
+                            once=True
+                        )
+                        continue
+                    self.override_options += ['{}_std={}'.format(i, std)]
                 elif j in ['-fPIC', '-fpic', '-fPIE', '-fpie']:
                     self.pie = True
                 elif j in blacklist_compiler_flags:
@@ -537,6 +547,13 @@
             suffixes += [x for x in exts]
         return suffixes
 
+    @lru_cache(maxsize=None)
+    def _all_lang_stds(self, lang: str) -> T.List[str]:
+        lang_std = self.env.coredata.compiler_options.build.get(lang + '_std', 
None)
+        if not lang_std:
+            return []
+        return lang_std.choices
+
     def process_inter_target_dependencies(self):
         # Move the dependencies from all transfer_dependencies_from to the 
target
         to_process = list(self.depends)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meson-0.54.1/mesonbuild/cmake/traceparser.py 
new/meson-0.54.2/mesonbuild/cmake/traceparser.py
--- old/meson-0.54.1/mesonbuild/cmake/traceparser.py    2020-04-26 
11:07:17.000000000 +0200
+++ new/meson-0.54.2/mesonbuild/cmake/traceparser.py    2020-05-15 
09:23:18.000000000 +0200
@@ -660,25 +660,40 @@
 
         fixed_list = []  # type: T.List[str]
         curr_str = None  # type: T.Optional[str]
+        path_found = False # type: bool
 
         for i in broken_list:
             if curr_str is None:
                 curr_str = i
+                path_found = False
             elif os.path.isfile(curr_str):
                 # Abort concatenation if curr_str is an existing file
                 fixed_list += [curr_str]
                 curr_str = i
+                path_found = False
             elif not reg_start.match(curr_str):
                 # Abort concatenation if curr_str no longer matches the regex
                 fixed_list += [curr_str]
                 curr_str = i
-            elif reg_end.match(i) or os.path.exists('{} {}'.format(curr_str, 
i)):
+                path_found = False
+            elif reg_end.match(i):
                 # File detected
                 curr_str = '{} {}'.format(curr_str, i)
                 fixed_list += [curr_str]
                 curr_str = None
+                path_found = False
+            elif os.path.exists('{} {}'.format(curr_str, i)):
+                # Path detected
+                curr_str = '{} {}'.format(curr_str, i)
+                path_found = True
+            elif path_found:
+                # Add path to fixed_list after ensuring the whole path is in 
curr_str
+                fixed_list += [curr_str]
+                curr_str = i
+                path_found = False
             else:
                 curr_str = '{} {}'.format(curr_str, i)
+                path_found = False
 
         if curr_str:
             fixed_list += [curr_str]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meson-0.54.1/mesonbuild/compilers/compilers.py 
new/meson-0.54.2/mesonbuild/compilers/compilers.py
--- old/meson-0.54.1/mesonbuild/compilers/compilers.py  2020-04-26 
11:07:17.000000000 +0200
+++ new/meson-0.54.2/mesonbuild/compilers/compilers.py  2020-05-15 
09:23:18.000000000 +0200
@@ -1131,7 +1131,7 @@
     def remove_linkerlike_args(self, args):
         rm_exact = ('-headerpad_max_install_names',)
         rm_prefixes = ('-Wl,', '-L',)
-        rm_next = ('-L',)
+        rm_next = ('-L', '-framework',)
         ret = []
         iargs = iter(args)
         for arg in iargs:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meson-0.54.1/mesonbuild/compilers/fortran.py 
new/meson-0.54.2/mesonbuild/compilers/fortran.py
--- old/meson-0.54.1/mesonbuild/compilers/fortran.py    2020-04-26 
11:07:17.000000000 +0200
+++ new/meson-0.54.2/mesonbuild/compilers/fortran.py    2020-05-15 
09:23:18.000000000 +0200
@@ -208,6 +208,18 @@
     def language_stdlib_only_link_flags(self):
         return ['-lgfortran', '-lm']
 
+    def has_header(self, hname, prefix, env, *, extra_args=None, 
dependencies=None, disable_cache=False):
+        '''
+        Derived from mixins/clike.py:has_header, but without C-style usage of
+        __has_include which breaks with GCC-Fortran 10:
+        https://github.com/mesonbuild/meson/issues/7017
+        '''
+        fargs = {'prefix': prefix, 'header': hname}
+        code = '{prefix}\n#include <{header}>'
+        return self.compiles(code.format(**fargs), env, extra_args=extra_args,
+                             dependencies=dependencies, mode='preprocess', 
disable_cache=disable_cache)
+
+
 class ElbrusFortranCompiler(GnuFortranCompiler, ElbrusCompiler):
     def __init__(self, exelist, version, for_machine: MachineChoice,
                  is_cross, info: 'MachineInfo', exe_wrapper=None,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meson-0.54.1/mesonbuild/compilers/mixins/clike.py 
new/meson-0.54.2/mesonbuild/compilers/mixins/clike.py
--- old/meson-0.54.1/mesonbuild/compilers/mixins/clike.py       2020-04-26 
11:07:17.000000000 +0200
+++ new/meson-0.54.2/mesonbuild/compilers/mixins/clike.py       2020-05-15 
09:23:18.000000000 +0200
@@ -369,7 +369,8 @@
                              dependencies=dependencies, mode='link', 
disable_cache=disable_cache)
 
     def run(self, code: str, env, *, extra_args=None, dependencies=None):
-        if self.is_cross and self.exe_wrapper is None:
+        need_exe_wrapper = env.need_exe_wrapper(self.for_machine)
+        if need_exe_wrapper and self.exe_wrapper is None:
             raise compilers.CrossNoRunException('Can not run test applications 
in this cross environment.')
         with self._build_wrapper(code, env, extra_args, dependencies, 
mode='link', want_output=True) as p:
             if p.returncode != 0:
@@ -377,7 +378,7 @@
                     p.input_name,
                     p.returncode))
                 return compilers.RunResult(False)
-            if self.is_cross:
+            if need_exe_wrapper:
                 cmdlist = self.exe_wrapper + [p.output_name]
             else:
                 cmdlist = p.output_name
@@ -658,7 +659,7 @@
         # is not run so we don't care what the return value is.
         main = '''\nint main(void) {{
             void *a = (void*) &{func};
-            long b = (long) a;
+            long long b = (long long) a;
             return (int) b;
         }}'''
         return head, main
@@ -727,23 +728,29 @@
         # need to look for them differently. On nice compilers like clang, we
         # can just directly use the __has_builtin() macro.
         fargs['no_includes'] = '#include' not in prefix
+        is_builtin = funcname.startswith('__builtin_')
+        fargs['is_builtin'] = is_builtin
+        fargs['__builtin_'] = '' if is_builtin else '__builtin_'
         t = '''{prefix}
         int main(void) {{
+
+        /* With some toolchains (MSYS2/mingw for example) the compiler
+         * provides various builtins which are not really implemented and
+         * fall back to the stdlib where they aren't provided and fail at
+         * build/link time. In case the user provides a header, including
+         * the header didn't lead to the function being defined, and the
+         * function we are checking isn't a builtin itself we assume the
+         * builtin is not functional and we just error out. */
+        #if !{no_includes:d} && !defined({func}) && !{is_builtin:d}
+            #error "No definition for {__builtin_}{func} found in the prefix"
+        #endif
+
         #ifdef __has_builtin
-            #if !__has_builtin(__builtin_{func})
-                #error "__builtin_{func} not found"
+            #if !__has_builtin({__builtin_}{func})
+                #error "{__builtin_}{func} not found"
             #endif
         #elif ! defined({func})
-            /* Check for __builtin_{func} only if no includes were added to the
-             * prefix above, which means no definition of {func} can be found.
-             * We would always check for this, but we get false positives on
-             * MSYS2 if we do. Their toolchain is broken, but we can at least
-             * give them a workaround. */
-            #if {no_includes:d}
-                __builtin_{func};
-            #else
-                #error "No definition for __builtin_{func} found in the prefix"
-            #endif
+            {__builtin_}{func};
         #endif
         return 0;
         }}'''
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meson-0.54.1/mesonbuild/coredata.py 
new/meson-0.54.2/mesonbuild/coredata.py
--- old/meson-0.54.1/mesonbuild/coredata.py     2020-04-26 11:07:17.000000000 
+0200
+++ new/meson-0.54.2/mesonbuild/coredata.py     2020-05-15 09:23:18.000000000 
+0200
@@ -38,7 +38,7 @@
 
     OptionDictType = T.Dict[str, 'UserOption[T.Any]']
 
-version = '0.54.1'
+version = '0.54.2'
 backendlist = ['ninja', 'vs', 'vs2010', 'vs2015', 'vs2017', 'vs2019', 'xcode']
 
 default_yielding = False
@@ -381,6 +381,7 @@
         self.compiler_check_cache = OrderedDict()
         # Only to print a warning if it changes between Meson invocations.
         self.config_files = self.__load_config_files(options, scratch_dir, 
'native')
+        self.builtin_options_libdir_cross_fixup()
         self.init_builtins('')
 
     @staticmethod
@@ -441,12 +442,12 @@
             raise MesonException('Cannot find specified {} file: 
{}'.format(ftype, f))
         return real
 
-    def libdir_cross_fixup(self):
+    def builtin_options_libdir_cross_fixup(self):
         # By default set libdir to "lib" when cross compiling since
         # getting the "system default" is always wrong on multiarch
         # platforms as it gets a value like lib/x86_64-linux-gnu.
         if self.cross_files:
-            self.builtins['libdir'].value = 'lib'
+            builtin_options['libdir'].default = 'lib'
 
     def sanitize_prefix(self, prefix):
         prefix = os.path.expanduser(prefix)
@@ -507,7 +508,6 @@
         for for_machine in iter(MachineChoice):
             for key, opt in builtin_options_per_machine.items():
                 
self.add_builtin_option(self.builtins_per_machine[for_machine], key, opt, 
subproject)
-        self.libdir_cross_fixup()
 
     def add_builtin_option(self, opts_map, key, opt, subproject):
         if subproject:
@@ -665,7 +665,9 @@
                 if type(oldval) != type(value):
                     self.user_options[name] = value
 
-    def is_cross_build(self) -> bool:
+    def is_cross_build(self, when_building_for: MachineChoice = 
MachineChoice.HOST) -> bool:
+        if when_building_for == MachineChoice.BUILD:
+            return False
         return len(self.cross_files) > 0
 
     def strip_build_option_names(self, options):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meson-0.54.1/mesonbuild/dependencies/boost.py 
new/meson-0.54.2/mesonbuild/dependencies/boost.py
--- old/meson-0.54.1/mesonbuild/dependencies/boost.py   2020-04-12 
23:07:59.000000000 +0200
+++ new/meson-0.54.2/mesonbuild/dependencies/boost.py   2020-05-15 
09:23:18.000000000 +0200
@@ -344,6 +344,7 @@
         self.multithreading = kwargs.get('threading', 'multi') == 'multi'
 
         self.boost_root = None
+        self.explicit_static = 'static' in kwargs
 
         # Extract and validate modules
         self.modules = mesonlib.extract_as_list(kwargs, 'modules')  # type: 
T.List[str]
@@ -411,10 +412,19 @@
                 break
 
     def run_check(self, inc_dirs: T.List[BoostIncludeDir], lib_dirs: 
T.List[Path]) -> bool:
+        mlog.debug('  - potential library dirs: {}'.format([x.as_posix() for x 
in lib_dirs]))
+        mlog.debug('  - potential include dirs: {}'.format([x.path.as_posix() 
for x in inc_dirs]))
+
         #   2. Find all boost libraries
         libs = []  # type: T.List[BoostLibraryFile]
         for i in lib_dirs:
-            libs += self.detect_libraries(i)
+            libs = self.detect_libraries(i)
+            if libs:
+                mlog.debug('  - found boost library dir: {}'.format(i))
+                # mlog.debug('  - raw library list:')
+                # for j in libs:
+                #     mlog.debug('    - {}'.format(j))
+                break
         libs = sorted(set(libs))
 
         modules = ['boost_' + x for x in self.modules]
@@ -422,9 +432,6 @@
             mlog.debug('  - found boost {} include dir: 
{}'.format(inc.version, inc.path))
             f_libs = self.filter_libraries(libs, inc.version_lib)
 
-            # mlog.debug('  - raw library list:')
-            # for j in libs:
-            #     mlog.debug('    - {}'.format(j))
             mlog.debug('  - filtered library list:')
             for j in f_libs:
                 mlog.debug('    - {}'.format(j))
@@ -499,6 +506,19 @@
         return [self._include_dir_from_version_header(x) for x in candidates]
 
     def detect_lib_dirs(self, root: Path) -> T.List[Path]:
+        # First check the system include paths. Only consider those within the
+        # given root path
+        system_dirs_t = self.clib_compiler.get_library_dirs(self.env)
+        system_dirs = [Path(x) for x in system_dirs_t]
+        system_dirs = [x.resolve() for x in system_dirs if x.exists()]
+        system_dirs = [x for x in system_dirs if mesonlib.path_is_in_root(x, 
root)]
+        system_dirs = list(mesonlib.OrderedSet(system_dirs))
+
+        if system_dirs:
+            return system_dirs
+
+        # No system include paths were found --> fall back to manually looking
+        # for library dirs in root
         dirs = []     # type: T.List[Path]
         subdirs = []  # type: T.List[Path]
         for i in root.iterdir():
@@ -510,7 +530,25 @@
             for j in i.iterdir():
                 if j.is_dir() and j.name.endswith('-linux-gnu'):
                     subdirs += [j]
-        return dirs + subdirs
+
+        # Filter out paths that don't match the target arch to avoid finding
+        # the wrong libraries. See 
https://github.com/mesonbuild/meson/issues/7110
+        if not self.arch:
+            return dirs + subdirs
+
+        arch_list_32 = ['32', 'i386']
+        arch_list_64 = ['64']
+
+        raw_list = dirs + subdirs
+        no_arch = [x for x in raw_list if not any([y in x.name for y in 
arch_list_32 + arch_list_64])]
+
+        matching_arch = []  # type: T.List[Path]
+        if '32' in self.arch:
+            matching_arch = [x for x in raw_list if any([y in x.name for y in 
arch_list_32])]
+        elif '64' in self.arch:
+            matching_arch = [x for x in raw_list if any([y in x.name for y in 
arch_list_64])]
+
+        return sorted(matching_arch) + sorted(no_arch)
 
     def filter_libraries(self, libs: T.List[BoostLibraryFile], lib_vers: str) 
-> T.List[BoostLibraryFile]:
         # MSVC is very picky with the library tags
@@ -522,7 +560,7 @@
         except (KeyError, IndexError, AttributeError):
             pass
 
-        libs = [x for x in libs if x.static == self.static]
+        libs = [x for x in libs if x.static == self.static or not 
self.explicit_static]
         libs = [x for x in libs if x.mt == self.multithreading]
         libs = [x for x in libs if x.version_matches(lib_vers)]
         libs = [x for x in libs if x.arch_matches(self.arch)]
@@ -567,6 +605,12 @@
                 roots += paths
                 return roots  # Do not add system paths if BOOST_ROOT is 
present
 
+        # Add roots from system paths
+        inc_paths = [Path(x) for x in 
self.clib_compiler.get_default_include_dirs()]
+        inc_paths = [x.parent for x in inc_paths if x.exists()]
+        inc_paths = [x.resolve() for x in inc_paths]
+        roots += inc_paths
+
         # Add system paths
         if self.env.machines[self.for_machine].is_windows():
             # Where boost built from source actually installs it
@@ -588,8 +632,6 @@
             roots += [x for x in candidates if 
x.name.lower().startswith('boost') and x.is_dir()]
         else:
             tmp = []  # type: T.List[Path]
-            # Add unix paths
-            tmp += [Path(x).parent for x in 
self.clib_compiler.get_default_include_dirs()]
 
             # Homebrew
             brew_boost = Path('/usr/local/Cellar/boost')
@@ -637,11 +679,8 @@
         return BoostIncludeDir(hfile.parents[1], int(m.group(1)))
 
     def _extra_compile_args(self) -> T.List[str]:
-        args = []  # type: T.List[str]
-        args += ['-DBOOST_ALL_NO_LIB']  # Disable automatic linking
-        if not self.static:
-            args += ['-DBOOST_ALL_DYN_LINK']
-        return args
+        # BOOST_ALL_DYN_LINK should not be required with the known defines 
below
+        return ['-DBOOST_ALL_NO_LIB']  # Disable automatic linking
 
 
 # See 
https://www.boost.org/doc/libs/1_72_0/more/getting_started/unix-variants.html#library-naming
@@ -665,9 +704,9 @@
 ####      ---- BEGIN GENERATED ----      ####
 #                                           #
 # Generated with tools/boost_names.py:
-#  - boost version:   1.72.0
-#  - modules found:   158
-#  - libraries found: 42
+#  - boost version:   1.73.0
+#  - modules found:   159
+#  - libraries found: 43
 #
 
 class BoostLibrary():
@@ -690,16 +729,16 @@
 boost_libraries = {
     'boost_atomic': BoostLibrary(
         name='boost_atomic',
-        shared=[],
-        static=[],
+        shared=['-DBOOST_ATOMIC_DYN_LINK=1'],
+        static=['-DBOOST_ATOMIC_STATIC_LINK=1'],
         single=[],
         multi=[],
     ),
     'boost_chrono': BoostLibrary(
         name='boost_chrono',
-        shared=['-DBOOST_ALL_DYN_LINK=1'],
-        static=['-DBOOST_All_STATIC_LINK=1'],
-        single=[],
+        shared=['-DBOOST_CHRONO_DYN_LINK=1'],
+        static=['-DBOOST_CHRONO_STATIC_LINK=1'],
+        single=['-DBOOST_CHRONO_THREAD_DISABLED'],
         multi=[],
     ),
     'boost_container': BoostLibrary(
@@ -711,28 +750,28 @@
     ),
     'boost_context': BoostLibrary(
         name='boost_context',
-        shared=[],
+        shared=['-DBOOST_CONTEXT_DYN_LINK=1'],
         static=[],
         single=[],
         multi=[],
     ),
     'boost_contract': BoostLibrary(
         name='boost_contract',
-        shared=[],
-        static=[],
-        single=[],
+        shared=['-DBOOST_CONTRACT_DYN_LINK'],
+        static=['-DBOOST_CONTRACT_STATIC_LINK'],
+        single=['-DBOOST_CONTRACT_DISABLE_THREADS'],
         multi=[],
     ),
     'boost_coroutine': BoostLibrary(
         name='boost_coroutine',
-        shared=[],
+        shared=['-DBOOST_COROUTINES_DYN_LINK=1'],
         static=[],
         single=[],
         multi=[],
     ),
     'boost_date_time': BoostLibrary(
         name='boost_date_time',
-        shared=[],
+        shared=['-DBOOST_DATE_TIME_DYN_LINK=1'],
         static=[],
         single=[],
         multi=[],
@@ -746,14 +785,14 @@
     ),
     'boost_fiber': BoostLibrary(
         name='boost_fiber',
-        shared=[],
+        shared=['-DBOOST_FIBERS_DYN_LINK=1'],
         static=[],
         single=[],
         multi=[],
     ),
     'boost_fiber_numa': BoostLibrary(
         name='boost_fiber_numa',
-        shared=[],
+        shared=['-DBOOST_FIBERS_DYN_LINK=1'],
         static=[],
         single=[],
         multi=[],
@@ -767,84 +806,91 @@
     ),
     'boost_graph': BoostLibrary(
         name='boost_graph',
-        shared=['-DBOOST_GRAPH_DYN_LINK=1'],
+        shared=[],
         static=[],
         single=[],
         multi=[],
     ),
     'boost_iostreams': BoostLibrary(
         name='boost_iostreams',
-        shared=['-DBOOST_IOSTREAMS_DYN_LINK=1', 
'-DBOOST_IOSTREAMS_DYN_LINK=1'],
+        shared=['-DBOOST_IOSTREAMS_DYN_LINK=1'],
         static=[],
         single=[],
         multi=[],
     ),
     'boost_locale': BoostLibrary(
         name='boost_locale',
-        shared=['-DBOOST_LOCALE_DYN_LINK=1'],
+        shared=[],
         static=[],
         single=[],
         multi=[],
     ),
     'boost_log': BoostLibrary(
         name='boost_log',
-        shared=['-DBOOST_LOG_DLL', '-DBOOST_LOG_DYN_LINK=1'],
+        shared=['-DBOOST_LOG_DYN_LINK=1'],
         static=[],
-        single=['BOOST_LOG_NO_THREADS'],
+        single=['-DBOOST_LOG_NO_THREADS'],
         multi=[],
     ),
     'boost_log_setup': BoostLibrary(
         name='boost_log_setup',
-        shared=['-DBOOST_LOG_DYN_LINK=1', '-DBOOST_LOG_SETUP_DLL', 
'-DBOOST_LOG_SETUP_DYN_LINK=1'],
+        shared=['-DBOOST_LOG_SETUP_DYN_LINK=1'],
         static=[],
-        single=['BOOST_LOG_NO_THREADS'],
+        single=['-DBOOST_LOG_NO_THREADS'],
         multi=[],
     ),
     'boost_math_c99': BoostLibrary(
         name='boost_math_c99',
-        shared=['-DBOOST_MATH_TR1_DYN_LINK=1'],
+        shared=[],
         static=[],
         single=[],
         multi=[],
     ),
     'boost_math_c99f': BoostLibrary(
         name='boost_math_c99f',
-        shared=['-DBOOST_MATH_TR1_DYN_LINK=1'],
+        shared=[],
         static=[],
         single=[],
         multi=[],
     ),
     'boost_math_c99l': BoostLibrary(
         name='boost_math_c99l',
-        shared=['-DBOOST_MATH_TR1_DYN_LINK=1'],
+        shared=[],
         static=[],
         single=[],
         multi=[],
     ),
     'boost_math_tr1': BoostLibrary(
         name='boost_math_tr1',
-        shared=['-DBOOST_MATH_TR1_DYN_LINK=1'],
+        shared=[],
         static=[],
         single=[],
         multi=[],
     ),
     'boost_math_tr1f': BoostLibrary(
         name='boost_math_tr1f',
-        shared=['-DBOOST_MATH_TR1_DYN_LINK=1'],
+        shared=[],
         static=[],
         single=[],
         multi=[],
     ),
     'boost_math_tr1l': BoostLibrary(
         name='boost_math_tr1l',
-        shared=['-DBOOST_MATH_TR1_DYN_LINK=1'],
+        shared=[],
         static=[],
         single=[],
         multi=[],
     ),
     'boost_mpi': BoostLibrary(
         name='boost_mpi',
-        shared=['-DBOOST_MPI_DYN_LINK=1'],
+        shared=[],
+        static=[],
+        single=[],
+        multi=[],
+    ),
+    'boost_nowide': BoostLibrary(
+        name='boost_nowide',
+        shared=['-DBOOST_NOWIDE_DYN_LINK=1'],
         static=[],
         single=[],
         multi=[],
@@ -865,63 +911,63 @@
     ),
     'boost_random': BoostLibrary(
         name='boost_random',
-        shared=[],
+        shared=['-DBOOST_RANDOM_DYN_LINK'],
         static=[],
         single=[],
         multi=[],
     ),
     'boost_regex': BoostLibrary(
         name='boost_regex',
-        shared=['-DBOOST_REGEX_DYN_LINK=1'],
+        shared=[],
         static=[],
         single=[],
         multi=[],
     ),
     'boost_serialization': BoostLibrary(
         name='boost_serialization',
-        shared=['-DBOOST_SERIALIZATION_DYN_LINK=1'],
+        shared=[],
         static=[],
         single=[],
         multi=[],
     ),
     'boost_stacktrace_addr2line': BoostLibrary(
         name='boost_stacktrace_addr2line',
-        shared=['-DBOOST_STACKTRACE_DYN_LINK=1'],
+        shared=[],
         static=[],
         single=[],
         multi=[],
     ),
     'boost_stacktrace_backtrace': BoostLibrary(
         name='boost_stacktrace_backtrace',
-        shared=['-DBOOST_STACKTRACE_DYN_LINK=1'],
+        shared=[],
         static=[],
         single=[],
         multi=[],
     ),
     'boost_stacktrace_basic': BoostLibrary(
         name='boost_stacktrace_basic',
-        shared=['-DBOOST_STACKTRACE_DYN_LINK=1'],
+        shared=[],
         static=[],
         single=[],
         multi=[],
     ),
     'boost_stacktrace_noop': BoostLibrary(
         name='boost_stacktrace_noop',
-        shared=['-DBOOST_STACKTRACE_DYN_LINK=1'],
+        shared=[],
         static=[],
         single=[],
         multi=[],
     ),
     'boost_stacktrace_windbg': BoostLibrary(
         name='boost_stacktrace_windbg',
-        shared=['-DBOOST_STACKTRACE_DYN_LINK=1'],
+        shared=[],
         static=[],
         single=[],
         multi=[],
     ),
     'boost_stacktrace_windbg_cached': BoostLibrary(
         name='boost_stacktrace_windbg_cached',
-        shared=['-DBOOST_STACKTRACE_DYN_LINK=1'],
+        shared=[],
         static=[],
         single=[],
         multi=[],
@@ -942,8 +988,8 @@
     ),
     'boost_thread': BoostLibrary(
         name='boost_thread',
-        shared=['-DBOOST_THREAD_USE_DLL=1'],
-        static=['-DBOOST_THREAD_USE_LIB=1'],
+        shared=['-DBOOST_THREAD_BUILD_DLL=1', '-DBOOST_THREAD_USE_DLL=1'],
+        static=['-DBOOST_THREAD_BUILD_LIB=1', '-DBOOST_THREAD_USE_LIB=1'],
         single=[],
         multi=[],
     ),
@@ -956,7 +1002,7 @@
     ),
     'boost_type_erasure': BoostLibrary(
         name='boost_type_erasure',
-        shared=[],
+        shared=['-DBOOST_TYPE_ERASURE_DYN_LINK'],
         static=[],
         single=[],
         multi=[],
@@ -977,7 +1023,7 @@
     ),
     'boost_wserialization': BoostLibrary(
         name='boost_wserialization',
-        shared=['-DBOOST_SERIALIZATION_DYN_LINK=1'],
+        shared=[],
         static=[],
         single=[],
         multi=[],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meson-0.54.1/mesonbuild/dependencies/ui.py 
new/meson-0.54.2/mesonbuild/dependencies/ui.py
--- old/meson-0.54.1/mesonbuild/dependencies/ui.py      2020-04-12 
23:07:59.000000000 +0200
+++ new/meson-0.54.2/mesonbuild/dependencies/ui.py      2020-05-15 
09:23:18.000000000 +0200
@@ -406,6 +406,9 @@
             if libfile:
                 libfile = libfile[0]
             else:
+                mlog.log("Could not find:", module,
+                         self.qtpkgname + module + modules_lib_suffix,
+                         'in', libdir)
                 self.is_found = False
                 break
             self.link_args.append(libfile)
@@ -426,6 +429,20 @@
         if self.env.machines[self.for_machine].is_darwin():
             if is_debug:
                 suffix += '_debug'
+        if mesonlib.version_compare(self.version, '>= 5.14.0'):
+            if self.env.machines[self.for_machine].is_android():
+                cpu_family = self.env.machines[self.for_machine].cpu_family
+                if cpu_family == 'x86':
+                    suffix += '_x86'
+                elif cpu_family == 'x86_64':
+                    suffix += '_x86_64'
+                elif cpu_family == 'arm':
+                    suffix += '_armeabi-v7a'
+                elif cpu_family == 'aarch64':
+                    suffix += '_arm64-v8a'
+                else:
+                    mlog.warning('Android target arch {!r} for Qt5 is unknown, 
'
+                                 'module detection may not 
work'.format(cpu_family))
         return suffix
 
     def _link_with_qtmain(self, is_debug, libdir):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meson-0.54.1/mesonbuild/envconfig.py 
new/meson-0.54.2/mesonbuild/envconfig.py
--- old/meson-0.54.1/mesonbuild/envconfig.py    2020-04-26 11:07:17.000000000 
+0200
+++ new/meson-0.54.2/mesonbuild/envconfig.py    2020-05-15 09:23:18.000000000 
+0200
@@ -40,6 +40,7 @@
     'alpha',
     'arc',
     'arm',
+    'avr',
     'c2000',
     'e2k',
     'ia64',
@@ -121,7 +122,7 @@
         # ones.
         ([var_name + '_FOR_BUILD'] if is_cross else [var_name]),
         # Always just the unprefixed host verions
-        ([] if is_cross else [var_name]),
+        [var_name]
     )[for_machine]
     for var in candidates:
         value = os.environ.get(var)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meson-0.54.1/mesonbuild/environment.py 
new/meson-0.54.2/mesonbuild/environment.py
--- old/meson-0.54.1/mesonbuild/environment.py  2020-04-26 11:07:17.000000000 
+0200
+++ new/meson-0.54.2/mesonbuild/environment.py  2020-05-15 09:23:18.000000000 
+0200
@@ -637,8 +637,8 @@
         self.coredata.meson_command = mesonlib.meson_command
         self.first_invocation = True
 
-    def is_cross_build(self) -> bool:
-        return self.coredata.is_cross_build()
+    def is_cross_build(self, when_building_for: MachineChoice = 
MachineChoice.HOST) -> bool:
+        return self.coredata.is_cross_build(when_building_for)
 
     def dump_coredata(self):
         return coredata.save(self.coredata, self.get_build_dir())
@@ -901,7 +901,7 @@
     def _detect_c_or_cpp_compiler(self, lang: str, for_machine: MachineChoice) 
-> Compiler:
         popen_exceptions = {}
         compilers, ccache, exe_wrap = self._get_compilers(lang, for_machine)
-        is_cross = not self.machines.matches_build_machine(for_machine)
+        is_cross = self.is_cross_build(for_machine)
         info = self.machines[for_machine]
 
         for compiler in compilers:
@@ -1151,7 +1151,7 @@
 
     def detect_cuda_compiler(self, for_machine):
         popen_exceptions = {}
-        is_cross = not self.machines.matches_build_machine(for_machine)
+        is_cross = self.is_cross_build(for_machine)
         compilers, ccache, exe_wrap = self._get_compilers('cuda', for_machine)
         info = self.machines[for_machine]
         for compiler in compilers:
@@ -1191,7 +1191,7 @@
     def detect_fortran_compiler(self, for_machine: MachineChoice):
         popen_exceptions = {}
         compilers, ccache, exe_wrap = self._get_compilers('fortran', 
for_machine)
-        is_cross = not self.machines.matches_build_machine(for_machine)
+        is_cross = self.is_cross_build(for_machine)
         info = self.machines[for_machine]
         for compiler in compilers:
             if isinstance(compiler, str):
@@ -1310,7 +1310,7 @@
     def _detect_objc_or_objcpp_compiler(self, for_machine: MachineInfo, objc: 
bool) -> 'Compiler':
         popen_exceptions = {}
         compilers, ccache, exe_wrap = self._get_compilers('objc' if objc else 
'objcpp', for_machine)
-        is_cross = not self.machines.matches_build_machine(for_machine)
+        is_cross = self.is_cross_build(for_machine)
         info = self.machines[for_machine]
 
         for compiler in compilers:
@@ -1401,7 +1401,7 @@
 
     def detect_vala_compiler(self, for_machine):
         exelist = self.lookup_binary_entry(for_machine, 'vala')
-        is_cross = not self.machines.matches_build_machine(for_machine)
+        is_cross = self.is_cross_build(for_machine)
         info = self.machines[for_machine]
         if exelist is None:
             # TODO support fallback
@@ -1421,7 +1421,7 @@
     def detect_rust_compiler(self, for_machine):
         popen_exceptions = {}
         compilers, ccache, exe_wrap = self._get_compilers('rust', for_machine)
-        is_cross = not self.machines.matches_build_machine(for_machine)
+        is_cross = self.is_cross_build(for_machine)
         info = self.machines[for_machine]
 
         cc = self.detect_c_compiler(for_machine)
@@ -1512,7 +1512,7 @@
             arch = 'x86_mscoff'
 
         popen_exceptions = {}
-        is_cross = not self.machines.matches_build_machine(for_machine)
+        is_cross = self.is_cross_build(for_machine)
         results, ccache, exe_wrap = self._get_compilers('d', for_machine)
         for exelist in results:
             # Search for a D compiler.
@@ -1603,7 +1603,7 @@
 
     def detect_swift_compiler(self, for_machine):
         exelist = self.lookup_binary_entry(for_machine, 'swift')
-        is_cross = not self.machines.matches_build_machine(for_machine)
+        is_cross = self.is_cross_build(for_machine)
         info = self.machines[for_machine]
         if exelist is None:
             # TODO support fallback
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meson-0.54.1/mesonbuild/interpreterbase.py 
new/meson-0.54.2/mesonbuild/interpreterbase.py
--- old/meson-0.54.1/mesonbuild/interpreterbase.py      2020-03-23 
18:22:09.000000000 +0100
+++ new/meson-0.54.2/mesonbuild/interpreterbase.py      2020-05-15 
09:23:18.000000000 +0200
@@ -18,6 +18,7 @@
 from . import mparser, mesonlib, mlog
 from . import environment, dependencies
 
+import abc
 import os, copy, re
 import collections.abc
 from functools import wraps
@@ -212,12 +213,11 @@
             return f(*wrapped_args, **wrapped_kwargs)
         return wrapped
 
-class FeatureCheckBase:
+class FeatureCheckBase(metaclass=abc.ABCMeta):
     "Base class for feature version checks"
 
-    # Class variable, shared across all instances
-    #
-    # Format: {subproject: {feature_version: set(feature_names)}}
+    # In python 3.6 we can just forward declare this, but in 3.5 we can't
+    # This will be overwritten by the subclasses by necessity
     feature_registry = {}  # type: T.ClassVar[T.Dict[str, T.Dict[str, 
T.Set[str]]]]
 
     def __init__(self, feature_name: str, version: str):
@@ -231,13 +231,18 @@
             return ''
         return mesonlib.project_meson_versions[subproject]
 
+    @staticmethod
+    @abc.abstractmethod
+    def check_version(target_version: str, feature_Version: str) -> bool:
+        pass
+
     def use(self, subproject: str) -> None:
         tv = self.get_target_version(subproject)
         # No target version
         if tv == '':
             return
         # Target version is new enough
-        if mesonlib.version_compare_condition_with_min(tv, 
self.feature_version):
+        if self.check_version(tv, self.feature_version):
             return
         # Feature is too new for target version, register it
         if subproject not in self.feature_registry:
@@ -283,6 +288,15 @@
 class FeatureNew(FeatureCheckBase):
     """Checks for new features"""
 
+    # Class variable, shared across all instances
+    #
+    # Format: {subproject: {feature_version: set(feature_names)}}
+    feature_registry = {}  # type: T.ClassVar[T.Dict[str, T.Dict[str, 
T.Set[str]]]]
+
+    @staticmethod
+    def check_version(target_version: str, feature_version: str) -> bool:
+        return mesonlib.version_compare_condition_with_min(target_version, 
feature_version)
+
     @staticmethod
     def get_warning_str_prefix(tv: str) -> str:
         return 'Project specifies a minimum meson_version \'{}\' but uses 
features which were added in newer versions:'.format(tv)
@@ -294,6 +308,16 @@
 class FeatureDeprecated(FeatureCheckBase):
     """Checks for deprecated features"""
 
+    # Class variable, shared across all instances
+    #
+    # Format: {subproject: {feature_version: set(feature_names)}}
+    feature_registry = {}  # type: T.ClassVar[T.Dict[str, T.Dict[str, 
T.Set[str]]]]
+
+    @staticmethod
+    def check_version(target_version: str, feature_version: str) -> bool:
+        # For deprecatoin checks we need to return the inverse of FeatureNew 
checks
+        return not mesonlib.version_compare_condition_with_min(target_version, 
feature_version)
+
     @staticmethod
     def get_warning_str_prefix(tv: str) -> str:
         return 'Deprecated features used:'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meson-0.54.1/mesonbuild/linkers.py 
new/meson-0.54.2/mesonbuild/linkers.py
--- old/meson-0.54.1/mesonbuild/linkers.py      2020-04-26 11:07:17.000000000 
+0200
+++ new/meson-0.54.2/mesonbuild/linkers.py      2020-05-15 09:23:18.000000000 
+0200
@@ -761,6 +761,11 @@
     def get_asneeded_args(self) -> T.List[str]:
         return []
 
+    def build_rpath_args(self, env: 'Environment', build_dir: str, from_dir: 
str,
+                         rpath_paths: str, build_rpath: str,
+                         install_rpath: str) -> T.List[str]:
+        return []
+
 
 class CcrxDynamicLinker(DynamicLinker):
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meson-0.54.1/mesonbuild/mesonlib.py 
new/meson-0.54.2/mesonbuild/mesonlib.py
--- old/meson-0.54.1/mesonbuild/mesonlib.py     2020-04-26 11:07:17.000000000 
+0200
+++ new/meson-0.54.2/mesonbuild/mesonlib.py     2020-05-15 09:23:18.000000000 
+0200
@@ -1529,6 +1529,16 @@
     except (TypeError, ValueError):
         return path
 
+def path_is_in_root(path: Path, root: Path, resolve: bool = False) -> bool:
+    # Check wheter a path is within the root directory root
+    try:
+        if resolve:
+            path.resolve().relative_to(root.resolve())
+        else:
+            path.relative_to(root)
+    except ValueError:
+        return False
+    return True
 
 class LibType(Enum):
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meson-0.54.1/mesonbuild/modules/gnome.py 
new/meson-0.54.2/mesonbuild/modules/gnome.py
--- old/meson-0.54.1/mesonbuild/modules/gnome.py        2020-04-26 
11:07:17.000000000 +0200
+++ new/meson-0.54.2/mesonbuild/modules/gnome.py        2020-05-15 
09:23:18.000000000 +0200
@@ -685,11 +685,10 @@
                                               source.get_subdir())
                         if subdir not in typelib_includes:
                             typelib_includes.append(subdir)
-            elif isinstance(dep, PkgConfigDependency):
-                girdir = dep.get_pkgconfig_variable("girdir", {'default': ''})
+            if isinstance(dep, Dependency):
+                girdir = dep.get_variable(pkgconfig='girdir', 
internal='girdir', default_value='')
                 if girdir and girdir not in typelib_includes:
                     typelib_includes.append(girdir)
-
         return typelib_includes
 
     def _get_external_args_for_langs(self, state, langs):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meson-0.54.1/mesonbuild/templates/mesontemplates.py 
new/meson-0.54.2/mesonbuild/templates/mesontemplates.py
--- old/meson-0.54.1/mesonbuild/templates/mesontemplates.py     2020-04-26 
11:07:17.000000000 +0200
+++ new/meson-0.54.2/mesonbuild/templates/mesontemplates.py     2020-05-15 
09:23:18.000000000 +0200
@@ -27,8 +27,8 @@
   default_options : [{default_options}])
 
 jar('{executable}',
-    {sourcespec},{depspec},
-    main_class: {main_class},
+    {sourcespec},{depspec}
+    main_class: '{main_class}',
     install : true)
 '''
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meson-0.54.1/run_unittests.py 
new/meson-0.54.2/run_unittests.py
--- old/meson-0.54.1/run_unittests.py   2020-04-26 11:07:17.000000000 +0200
+++ new/meson-0.54.2/run_unittests.py   2020-05-15 09:23:18.000000000 +0200
@@ -1442,14 +1442,14 @@
 
 
 class BasePlatformTests(unittest.TestCase):
+    prefix = '/usr'
+    libdir = 'lib'
     def setUp(self):
         super().setUp()
         self.maxDiff = None
         src_root = os.path.dirname(__file__)
         src_root = os.path.join(os.getcwd(), src_root)
         self.src_root = src_root
-        self.prefix = '/usr'
-        self.libdir = 'lib'
         # Get the backend
         # FIXME: Extract this from argv?
         self.backend = getattr(Backend, 
os.environ.get('MESON_UNIT_TEST_BACKEND', 'ninja'))
@@ -1562,8 +1562,9 @@
             extra_args = [extra_args]
         args = [srcdir, self.builddir]
         if default_args:
-            args += ['--prefix', self.prefix,
-                     '--libdir', self.libdir]
+            args += ['--prefix', self.prefix]
+            if self.libdir:
+                args += ['--libdir', self.libdir]
             if self.meson_native_file:
                 args += ['--native-file', self.meson_native_file]
             if self.meson_cross_file:
@@ -5256,7 +5257,7 @@
 
     def test_removing_unused_linker_args(self):
         testdir = os.path.join(self.common_test_dir, '108 has arg')
-        env = {'CFLAGS': '-L/tmp -L /var/tmp -headerpad_max_install_names 
-Wl,-export_dynamic'}
+        env = {'CFLAGS': '-L/tmp -L /var/tmp -headerpad_max_install_names 
-Wl,-export_dynamic -framework Foundation'}
         self.init(testdir, override_envvars=env)
 
 
@@ -6564,11 +6565,17 @@
         os.unlink(wrap_filename)
 
 
+class BaseLinuxCrossTests(BasePlatformTests):
+    # Don't pass --libdir when cross-compiling. We have tests that
+    # check whether meson auto-detects it correctly.
+    libdir = None
+
+
 def should_run_cross_arm_tests():
     return shutil.which('arm-linux-gnueabihf-gcc') and not 
platform.machine().lower().startswith('arm')
 
 @unittest.skipUnless(not is_windows() and should_run_cross_arm_tests(), 
"requires ability to cross compile to ARM")
-class LinuxCrossArmTests(BasePlatformTests):
+class LinuxCrossArmTests(BaseLinuxCrossTests):
     '''
     Tests that cross-compilation to Linux/ARM works
     '''
@@ -6615,6 +6622,17 @@
                 return
         self.assertTrue(False, 'Option libdir not in introspect data.')
 
+    def test_cross_libdir_subproject(self):
+        # Guard against a regression where calling "subproject"
+        # would reset the value of libdir to its default value.
+        testdir = os.path.join(self.unit_test_dir, '75 subdir libdir')
+        self.init(testdir, extra_args=['--libdir=fuf'])
+        for i in self.introspect('--buildoptions'):
+            if i['name'] == 'libdir':
+                self.assertEqual(i['value'], 'fuf')
+                return
+        self.assertTrue(False, 'Libdir specified on command line gets reset.')
+
     def test_std_remains(self):
         # C_std defined in project options must be in effect also when cross 
compiling.
         testdir = os.path.join(self.unit_test_dir, '51 noncross options')
@@ -6638,7 +6656,7 @@
     return shutil.which('x86_64-w64-mingw32-gcc') and not (is_windows() or 
is_cygwin())
 
 @unittest.skipUnless(not is_windows() and should_run_cross_mingw_tests(), 
"requires ability to cross compile with MinGW")
-class LinuxCrossMingwTests(BasePlatformTests):
+class LinuxCrossMingwTests(BaseLinuxCrossTests):
     '''
     Tests that cross-compilation to Windows/MinGW works
     '''
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' "old/meson-0.54.1/test cases/common/233 link depends 
indexed custom target/foo.c" "new/meson-0.54.2/test cases/common/233 link 
depends indexed custom target/foo.c"
--- "old/meson-0.54.1/test cases/common/233 link depends indexed custom 
target/foo.c"   1970-01-01 01:00:00.000000000 +0100
+++ "new/meson-0.54.2/test cases/common/233 link depends indexed custom 
target/foo.c"   2020-05-15 09:23:18.000000000 +0200
@@ -0,0 +1,15 @@
+#include <stdio.h>
+
+int main(void) {
+  const char *fn = DEPFILE;
+  FILE *f = fopen(fn, "r");
+  if (!f) {
+    printf("could not open %s", fn);
+    return 1;
+  }
+  else {
+    printf("successfully opened %s", fn);
+  }
+
+  return 0;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' "old/meson-0.54.1/test cases/common/233 link depends 
indexed custom target/make_file.py" "new/meson-0.54.2/test cases/common/233 
link depends indexed custom target/make_file.py"
--- "old/meson-0.54.1/test cases/common/233 link depends indexed custom 
target/make_file.py"    1970-01-01 01:00:00.000000000 +0100
+++ "new/meson-0.54.2/test cases/common/233 link depends indexed custom 
target/make_file.py"    2020-05-15 09:23:18.000000000 +0200
@@ -0,0 +1,8 @@
+#!/usr/bin/env python3
+import sys
+
+with open(sys.argv[1], 'w') as f:
+    print('# this file does nothing', file=f)
+
+with open(sys.argv[2], 'w') as f:
+    print('# this file does nothing', file=f)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' "old/meson-0.54.1/test cases/common/233 link depends 
indexed custom target/meson.build" "new/meson-0.54.2/test cases/common/233 link 
depends indexed custom target/meson.build"
--- "old/meson-0.54.1/test cases/common/233 link depends indexed custom 
target/meson.build"     1970-01-01 01:00:00.000000000 +0100
+++ "new/meson-0.54.2/test cases/common/233 link depends indexed custom 
target/meson.build"     2020-05-15 09:23:18.000000000 +0200
@@ -0,0 +1,19 @@
+project('link_depends_indexed_custom_target', 'c')
+
+if meson.backend().startswith('vs')
+  # FIXME: Broken on the VS backends
+  error('MESON_SKIP_TEST see https://github.com/mesonbuild/meson/issues/1799')
+endif
+
+cmd = find_program('make_file.py')
+
+dep_files = custom_target('gen_dep',
+        command: [cmd, '@OUTPUT@'],
+        output: ['dep_file1', 'dep_file2'])
+
+exe = executable('foo', 'foo.c',
+        link_depends: dep_files[1],
+        c_args: ['-DDEPFILE="' + dep_files[0].full_path()+ '"'])
+
+# check that dep_file1 exists, which means that link_depends target ran
+test('runtest', exe)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' "old/meson-0.54.1/test cases/common/39 has 
function/meson.build" "new/meson-0.54.2/test cases/common/39 has 
function/meson.build"
--- "old/meson-0.54.1/test cases/common/39 has function/meson.build"    
2020-04-26 11:07:17.000000000 +0200
+++ "new/meson-0.54.2/test cases/common/39 has function/meson.build"    
2020-05-15 09:23:18.000000000 +0200
@@ -88,4 +88,12 @@
     assert (cc.has_function('sendmmsg', args : unit_test_args),
             'Failed to detect function "sendmmsg" (should always exist).')
   endif
+
+  # We should be able to find GCC and Clang __builtin functions
+  if ['gcc', 'clang'].contains(cc.get_id())
+    # __builtin_constant_p is documented to exist at least as far back as
+    # GCC 2.95.3
+    assert(cc.has_function('__builtin_constant_p', args : unit_test_args),
+           '__builtin_constant_p must be found under gcc and clang')
+  endif
 endforeach
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' "old/meson-0.54.1/test cases/frameworks/1 
boost/meson.build" "new/meson-0.54.2/test cases/frameworks/1 boost/meson.build"
--- "old/meson-0.54.1/test cases/frameworks/1 boost/meson.build"        
2020-04-26 11:07:17.000000000 +0200
+++ "new/meson-0.54.2/test cases/frameworks/1 boost/meson.build"        
2020-05-15 09:23:18.000000000 +0200
@@ -13,7 +13,7 @@
 # within one project. The need to be independent of each other.
 # Use one without a library dependency and one with it.
 
-linkdep     = dependency('boost', static: s, modules : ['thread', 'system'])
+linkdep     = dependency('boost', static: s, modules : ['thread', 'system', 
'date_time'])
 testdep     = dependency('boost', static: s, modules : ['unit_test_framework'])
 nomoddep    = dependency('boost', static: s)
 extralibdep = dependency('boost', static: s, modules : ['thread', 'system', 
'date_time', 'log_setup', 'log', 'filesystem', 'regex'])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' "old/meson-0.54.1/test cases/frameworks/7 
gnome/gir/dep1/dep3/dep3.c" "new/meson-0.54.2/test cases/frameworks/7 
gnome/gir/dep1/dep3/dep3.c"
--- "old/meson-0.54.1/test cases/frameworks/7 gnome/gir/dep1/dep3/dep3.c"       
1970-01-01 01:00:00.000000000 +0100
+++ "new/meson-0.54.2/test cases/frameworks/7 gnome/gir/dep1/dep3/dep3.c"       
2020-05-15 09:23:18.000000000 +0200
@@ -0,0 +1,124 @@
+#include "dep3.h"
+
+struct _MesonDep3
+{
+  GObject parent_instance;
+
+  gchar *msg;
+};
+
+G_DEFINE_TYPE (MesonDep3, meson_dep3, G_TYPE_OBJECT)
+
+enum {
+  PROP_0,
+  PROP_MSG,
+  LAST_PROP
+};
+
+static GParamSpec *gParamSpecs [LAST_PROP];
+
+/**
+ * meson_dep3_new:
+ * @msg: The message to set.
+ *
+ * Allocates a new #MesonDep3.
+ *
+ * Returns: (transfer full): a #MesonDep3.
+ */
+MesonDep3 *
+meson_dep3_new (const gchar *msg)
+{
+  g_return_val_if_fail (msg != NULL, NULL);
+
+  return g_object_new (MESON_TYPE_DEP3,
+                       "message", msg,
+                       NULL);
+}
+
+static void
+meson_dep3_finalize (GObject *object)
+{
+  MesonDep3 *self = (MesonDep3 *)object;
+
+  g_clear_pointer (&self->msg, g_free);
+
+  G_OBJECT_CLASS (meson_dep3_parent_class)->finalize (object);
+}
+
+static void
+meson_dep3_get_property (GObject    *object,
+                           guint       prop_id,
+                           GValue     *value,
+                           GParamSpec *pspec)
+{
+  MesonDep3 *self = MESON_DEP3 (object);
+
+  switch (prop_id)
+    {
+    case PROP_MSG:
+      g_value_set_string (value, self->msg);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+    }
+}
+
+static void
+meson_dep3_set_property (GObject      *object,
+                           guint         prop_id,
+                           const GValue *value,
+                           GParamSpec   *pspec)
+{
+  MesonDep3 *self = MESON_DEP3 (object);
+
+  switch (prop_id)
+    {
+    case PROP_MSG:
+      self->msg = g_value_dup_string (value);
+      break;
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+    }
+}
+
+static void
+meson_dep3_class_init (MesonDep3Class *klass)
+{
+  GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+  object_class->finalize = meson_dep3_finalize;
+  object_class->get_property = meson_dep3_get_property;
+  object_class->set_property = meson_dep3_set_property;
+
+  gParamSpecs [PROP_MSG] =
+    g_param_spec_string ("message",
+                         "Message",
+                         "The message to print.",
+                         NULL,
+                         (G_PARAM_READWRITE |
+                          G_PARAM_CONSTRUCT_ONLY |
+                          G_PARAM_STATIC_STRINGS));
+
+  g_object_class_install_properties (object_class, LAST_PROP, gParamSpecs);
+}
+
+static void
+meson_dep3_init (MesonDep3 *self)
+{
+}
+
+/**
+ * meson_dep3_return_message:
+ * @self: a #MesonDep3.
+ *
+ * Returns the message.
+ *
+ * Returns: (transfer none): a const gchar*
+ */
+const gchar*
+meson_dep3_return_message (MesonDep3 *self)
+{
+  g_return_val_if_fail (MESON_IS_DEP3 (self), NULL);
+
+  return (const gchar*) self->msg;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' "old/meson-0.54.1/test cases/frameworks/7 
gnome/gir/dep1/dep3/dep3.h" "new/meson-0.54.2/test cases/frameworks/7 
gnome/gir/dep1/dep3/dep3.h"
--- "old/meson-0.54.1/test cases/frameworks/7 gnome/gir/dep1/dep3/dep3.h"       
1970-01-01 01:00:00.000000000 +0100
+++ "new/meson-0.54.2/test cases/frameworks/7 gnome/gir/dep1/dep3/dep3.h"       
2020-05-15 09:23:18.000000000 +0200
@@ -0,0 +1,21 @@
+#ifndef MESON_DEP3_H
+#define MESON_DEP3_H
+
+#if !defined (MESON_TEST)
+#error "MESON_TEST not defined."
+#endif
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define MESON_TYPE_DEP3 (meson_dep3_get_type())
+
+G_DECLARE_FINAL_TYPE (MesonDep3, meson_dep3, MESON, DEP3, GObject)
+
+MesonDep3   *meson_dep3_new            (const gchar *msg);
+const gchar *meson_dep3_return_message (MesonDep3 *self);
+
+G_END_DECLS
+
+#endif /* MESON_DEP3_H */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' "old/meson-0.54.1/test cases/frameworks/7 
gnome/gir/dep1/dep3/meson.build" "new/meson-0.54.2/test cases/frameworks/7 
gnome/gir/dep1/dep3/meson.build"
--- "old/meson-0.54.1/test cases/frameworks/7 gnome/gir/dep1/dep3/meson.build"  
1970-01-01 01:00:00.000000000 +0100
+++ "new/meson-0.54.2/test cases/frameworks/7 gnome/gir/dep1/dep3/meson.build"  
2020-05-15 09:23:18.000000000 +0200
@@ -0,0 +1,22 @@
+dep3sources = ['dep3.c', 'dep3.h']
+
+dep3lib = shared_library(
+  'dep3lib',
+  sources : dep3sources,
+  dependencies : gobj,
+  install : true
+)
+
+dep3gir = gnome.generate_gir(
+  dep3lib,
+  sources : dep3sources,
+  nsversion : '1.0',
+  namespace : 'MesonDep3',
+  symbol_prefix : 'meson',
+  identifier_prefix : 'Meson',
+  includes : ['GObject-2.0'],
+  install : true
+)
+
+dep3_dep = declare_dependency(link_with : dep3lib,
+  sources : [dep3gir])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' "old/meson-0.54.1/test cases/frameworks/7 
gnome/gir/dep1/meson.build" "new/meson-0.54.2/test cases/frameworks/7 
gnome/gir/dep1/meson.build"
--- "old/meson-0.54.1/test cases/frameworks/7 gnome/gir/dep1/meson.build"       
2018-08-25 10:05:43.000000000 +0200
+++ "new/meson-0.54.2/test cases/frameworks/7 gnome/gir/dep1/meson.build"       
2020-05-15 09:23:18.000000000 +0200
@@ -1,4 +1,5 @@
 subdir('dep2')
+subdir('dep3')
 
 dep1sources = ['dep1.c', 'dep1.h']
 
@@ -20,11 +21,11 @@
   symbol_prefix : 'meson',
   identifier_prefix : 'Meson',
   header: 'dep1.h',
-  includes : ['GObject-2.0', 'MesonDep2-1.0'],
+  includes : ['GObject-2.0', 'MesonDep2-1.0', dep3gir[0]],
   dependencies : [dep2_dep],
   install : true
 )
 
 dep1_dep = declare_dependency(link_with : dep1lib,
-  dependencies : [dep2_dep],
+  dependencies : [dep2_dep, dep3_dep],
   sources : [dep1gir])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' "old/meson-0.54.1/test cases/frameworks/7 
gnome/gir/meson.build" "new/meson-0.54.2/test cases/frameworks/7 
gnome/gir/meson.build"
--- "old/meson-0.54.1/test cases/frameworks/7 gnome/gir/meson.build"    
2018-10-31 10:31:20.000000000 +0100
+++ "new/meson-0.54.2/test cases/frameworks/7 gnome/gir/meson.build"    
2020-05-15 09:23:18.000000000 +0200
@@ -45,7 +45,7 @@
 )
 
 test('gobject introspection/c', girexe)
-gir_paths = ':'.join([girlib.outdir(), dep1lib.outdir(), dep2lib.outdir()])
+gir_paths = ':'.join([girlib.outdir(), dep1lib.outdir(), dep2lib.outdir(), 
dep3lib.outdir()])
 envdata = environment()
 envdata.append('GI_TYPELIB_PATH', gir_paths, separator : ':')
 envdata.append('LD_LIBRARY_PATH', gir_paths)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' "old/meson-0.54.1/test cases/frameworks/7 
gnome/test.json" "new/meson-0.54.2/test cases/frameworks/7 gnome/test.json"
--- "old/meson-0.54.1/test cases/frameworks/7 gnome/test.json"  2020-03-23 
18:22:09.000000000 +0100
+++ "new/meson-0.54.2/test cases/frameworks/7 gnome/test.json"  2020-05-15 
09:23:18.000000000 +0200
@@ -13,12 +13,16 @@
     {"type": "file", "platform": "cygwin", "file": "usr/lib/libdep1lib.dll.a"},
     {"type": "expr", "file": "usr/lib/?libdep2lib.so"},
     {"type": "file", "platform": "cygwin", "file": "usr/lib/libdep2lib.dll.a"},
+    {"type": "expr", "file": "usr/lib/?libdep3lib.so"},
+    {"type": "file", "platform": "cygwin", "file": "usr/lib/libdep3lib.dll.a"},
     {"type": "file", "file": "usr/lib/girepository-1.0/Meson-1.0.typelib"},
     {"type": "file", "file": "usr/lib/girepository-1.0/MesonDep1-1.0.typelib"},
     {"type": "file", "file": "usr/lib/girepository-1.0/MesonDep2-1.0.typelib"},
+    {"type": "file", "file": "usr/lib/girepository-1.0/MesonDep3-1.0.typelib"},
     {"type": "file", "file": "usr/share/gir-1.0/Meson-1.0.gir"},
     {"type": "file", "file": "usr/share/gir-1.0/MesonDep1-1.0.gir"},
     {"type": "file", "file": "usr/share/gir-1.0/MesonDep2-1.0.gir"},
+    {"type": "file", "file": "usr/share/gir-1.0/MesonDep3-1.0.gir"},
     {"type": "file", "file": 
"usr/share/glib-2.0/schemas/com.github.meson.gschema.xml"},
     {"type": "file", "file": "usr/share/simple-resources.gresource"},
     {"type": "file", "file": "usr/include/enums6.h"},
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' "old/meson-0.54.1/test cases/unit/75 subdir 
libdir/meson.build" "new/meson-0.54.2/test cases/unit/75 subdir 
libdir/meson.build"
--- "old/meson-0.54.1/test cases/unit/75 subdir libdir/meson.build"     
1970-01-01 01:00:00.000000000 +0100
+++ "new/meson-0.54.2/test cases/unit/75 subdir libdir/meson.build"     
2020-05-15 09:23:18.000000000 +0200
@@ -0,0 +1,2 @@
+project('toplevel', 'c')
+subproject('flub')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' "old/meson-0.54.1/test cases/unit/75 subdir 
libdir/subprojects/flub/meson.build" "new/meson-0.54.2/test cases/unit/75 
subdir libdir/subprojects/flub/meson.build"
--- "old/meson-0.54.1/test cases/unit/75 subdir 
libdir/subprojects/flub/meson.build"    1970-01-01 01:00:00.000000000 +0100
+++ "new/meson-0.54.2/test cases/unit/75 subdir 
libdir/subprojects/flub/meson.build"    2020-05-15 09:23:18.000000000 +0200
@@ -0,0 +1 @@
+project('subflub', 'c')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/meson-0.54.1/tools/boost_names.py 
new/meson-0.54.2/tools/boost_names.py
--- old/meson-0.54.1/tools/boost_names.py       2020-03-23 18:22:02.000000000 
+0100
+++ new/meson-0.54.2/tools/boost_names.py       2020-05-15 09:23:18.000000000 
+0200
@@ -43,10 +43,10 @@
 class BoostLibrary():
     def __init__(self, name: str, shared: T.List[str], static: T.List[str], 
single: T.List[str], multi: T.List[str]):
         self.name = name
-        self.shared = shared
-        self.static = static
-        self.single = single
-        self.multi = multi
+        self.shared = sorted(set(shared))
+        self.static = sorted(set(static))
+        self.single = sorted(set(single))
+        self.multi = sorted(set(multi))
 
     def __lt__(self, other: T.Any) -> T.Union[bool, 'NotImplemented']:
         if isinstance(other, BoostLibrary):
@@ -99,15 +99,35 @@
     cmds = raw.split(';')              # Commands always terminate with a ; (I 
hope)
     cmds = [x.strip() for x in cmds]   # Some cleanup
 
+    project_usage_requirements: T.List[str] = []
+
     # "Parse" the relevant sections
     for i in cmds:
         parts = i.split(' ')
-        parts = [x for x in parts if x not in ['', ':']]
+        parts = [x for x in parts if x not in ['']]
         if not parts:
             continue
 
-        # Parese libraries
-        if parts[0] in ['lib', 'boost-lib']:
+        # Parse project
+        if parts[0] in ['project']:
+            attributes: T.Dict[str, T.List[str]] = {}
+            curr: T.Optional[str] = None
+
+            for j in parts:
+                if j == ':':
+                    curr = None
+                elif curr is None:
+                    curr = j
+                else:
+                    if curr not in attributes:
+                        attributes[curr] = []
+                    attributes[curr] += [j]
+
+            if 'usage-requirements' in attributes:
+                project_usage_requirements = attributes['usage-requirements']
+
+        # Parse libraries
+        elif parts[0] in ['lib', 'boost-lib']:
             assert len(parts) >= 2
 
             # Get and check the library name
@@ -117,28 +137,36 @@
             if not lname.startswith('boost_'):
                 continue
 
+            # Count `:` to only select the 'usage-requirements'
+            # See 
https://boostorg.github.io/build/manual/master/index.html#bbv2.main-target-rule-syntax
+            colon_counter = 0
+            usage_requirements: T.List[str] = []
+            for j in parts:
+                if j == ':':
+                    colon_counter += 1
+                elif colon_counter >= 4:
+                    usage_requirements += [j]
+
             # Get shared / static defines
             shared: T.List[str] = []
             static: T.List[str] = []
             single: T.List[str] = []
             multi: T.List[str] = []
-            for j in parts:
+            for j in usage_requirements + project_usage_requirements:
                 m1 = re.match(r'<link>shared:<define>(.*)', j)
                 m2 = re.match(r'<link>static:<define>(.*)', j)
                 m3 = re.match(r'<threading>single:<define>(.*)', j)
                 m4 = re.match(r'<threading>multi:<define>(.*)', j)
 
                 if m1:
-                    shared += [m1.group(1)]
+                    shared += [f'-D{m1.group(1)}']
                 if m2:
-                    static += [m2.group(1)]
+                    static += [f'-D{m2.group(1)}']
                 if m3:
-                    single += [m3.group(1)]
+                    single +=[f'-D{m3.group(1)}']
                 if m4:
-                    multi += [m4.group(1)]
+                    multi += [f'-D{m4.group(1)}']
 
-            shared = [f'-D{x}' for x in shared]
-            static = [f'-D{x}' for x in static]
             libs += [BoostLibrary(lname, shared, static, single, multi)]
 
     return libs


Reply via email to