From 6cc5c57c38d2da37b4f15dea6e1fb97e3a0bae73 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Tue, 18 Dec 2018 17:29:54 +0100 Subject: meson: update to 0.49.0 Drop upstreamed gi-flags.patch and gtkdoc-flags.patch, rebase the rest. Signed-off-by: Alexander Kanavin Signed-off-by: Richard Purdie --- meta/recipes-devtools/meson/meson.inc | 10 ++- .../0001-Make-CPU-family-warnings-fatal.patch | 39 ++++++++++++ ...01-Support-building-allarch-recipes-again.patch | 25 -------- ...ix-issues-that-arise-when-cross-compiling.patch | 61 ++---------------- ...le-do-not-manipulate-the-environment-when.patch | 52 +++++++-------- .../0002-Make-CPU-family-warnings-fatal.patch | 36 ----------- ...02-Support-building-allarch-recipes-again.patch | 29 +++++++++ ...rospection-determine-g-ir-scanner-and-g-i.patch | 37 +++++------ meta/recipes-devtools/meson/meson/gi-flags.patch | 35 ---------- .../meson/meson/gtkdoc-flags.patch | 44 ------------- meta/recipes-devtools/meson/meson_0.47.2.bb | 3 - meta/recipes-devtools/meson/meson_0.49.0.bb | 4 ++ .../meson/nativesdk-meson_0.47.2.bb | 74 ---------------------- .../meson/nativesdk-meson_0.49.0.bb | 74 ++++++++++++++++++++++ 14 files changed, 201 insertions(+), 322 deletions(-) create mode 100644 meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch delete mode 100644 meta/recipes-devtools/meson/meson/0001-Support-building-allarch-recipes-again.patch delete mode 100644 meta/recipes-devtools/meson/meson/0002-Make-CPU-family-warnings-fatal.patch create mode 100644 meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch delete mode 100644 meta/recipes-devtools/meson/meson/gi-flags.patch delete mode 100644 meta/recipes-devtools/meson/meson/gtkdoc-flags.patch delete mode 100644 meta/recipes-devtools/meson/meson_0.47.2.bb create mode 100644 meta/recipes-devtools/meson/meson_0.49.0.bb delete mode 100644 meta/recipes-devtools/meson/nativesdk-meson_0.47.2.bb create mode 100644 meta/recipes-devtools/meson/nativesdk-meson_0.49.0.bb diff --git a/meta/recipes-devtools/meson/meson.inc b/meta/recipes-devtools/meson/meson.inc index 61b2391484..ef8c5aefa5 100644 --- a/meta/recipes-devtools/meson/meson.inc +++ b/meta/recipes-devtools/meson/meson.inc @@ -9,17 +9,15 @@ 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://gi-flags.patch \ - file://gtkdoc-flags.patch \ file://0001-python-module-do-not-manipulate-the-environment-when.patch \ file://disable-rpath-handling.patch \ " -SRC_URI[sha256sum] = "92d8afd921751261e36151643464efd3394162f69efbe8cd53e0a66b1cf395eb" -SRC_URI[md5sum] = "31bda3519d8c0eb3438267268a78085e" +SRC_URI[sha256sum] = "fb0395c4ac208eab381cd1a20571584bdbba176eb562a7efa9cb17cace0e1551" +SRC_URI[md5sum] = "3c35b91e8040901034809576d54007c6" SRC_URI_append_class-native = " \ - file://0002-Make-CPU-family-warnings-fatal.patch \ - file://0001-Support-building-allarch-recipes-again.patch \ + file://0001-Make-CPU-family-warnings-fatal.patch \ + file://0002-Support-building-allarch-recipes-again.patch \ " UPSTREAM_CHECK_URI = "https://github.com/mesonbuild/meson/releases" diff --git a/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch b/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch new file mode 100644 index 0000000000..785c0f027b --- /dev/null +++ b/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch @@ -0,0 +1,39 @@ +From d058d0f1d8833d99e8a3d3b9bcc383db23b52671 Mon Sep 17 00:00:00 2001 +From: Ross Burton +Date: Tue, 3 Jul 2018 13:59:09 +0100 +Subject: [PATCH 1/2] Make CPU family warnings fatal + +Upstream-Status: Inappropriate [OE specific] +Signed-off-by: Ross Burton + +--- + mesonbuild/environment.py | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py +index 2ccd31e..5fcf9df 100644 +--- a/mesonbuild/environment.py ++++ b/mesonbuild/environment.py +@@ -265,9 +265,7 @@ def detect_cpu_family(compilers): + # below. + + if trial not in known_cpu_families: +- 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, see https://wiki.yoctoproject.org/wiki/Meson/UnknownCPU for directions.' % trial) + + return trial + +@@ -1232,7 +1230,7 @@ class MachineInfo: + + cpu_family = literal['cpu_family'] + if cpu_family not in known_cpu_families: +- mlog.warning('Unknown CPU family %s, please report this at https://github.com/mesonbuild/meson/issues/new' % cpu_family) ++ raise EnvironmentException('Unknown CPU family %s, see https://wiki.yoctoproject.org/wiki/Meson/UnknownCPU for directions.' % cpu_family) + + endian = literal['endian'] + if endian not in ('little', 'big'): +-- +2.17.1 + diff --git a/meta/recipes-devtools/meson/meson/0001-Support-building-allarch-recipes-again.patch b/meta/recipes-devtools/meson/meson/0001-Support-building-allarch-recipes-again.patch deleted file mode 100644 index 96be104a52..0000000000 --- a/meta/recipes-devtools/meson/meson/0001-Support-building-allarch-recipes-again.patch +++ /dev/null @@ -1,25 +0,0 @@ -From d80d02a3ca6e21fa3d055c88c05234c2eb4db128 Mon Sep 17 00:00:00 2001 -From: Peter Kjellerstedt -Date: Thu, 26 Jul 2018 16:32:49 +0200 -Subject: [PATCH] Support building allarch recipes again - -This registers "allarch" as a known CPU family. - -Upstream-Status: Inappropriate [OE specific] -Signed-off-by: Peter Kjellerstedt ---- - mesonbuild/environment.py | 1 + - 1 file changed, 1 insertion(+) - -Index: meson-0.47.2/mesonbuild/environment.py -=================================================================== ---- meson-0.47.2.orig/mesonbuild/environment.py -+++ meson-0.47.2/mesonbuild/environment.py -@@ -75,6 +75,7 @@ from .compilers import ( - build_filename = 'meson.build' - - known_cpu_families = ( -+ 'allarch', - 'aarch64', - 'arm', - 'e2k', 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 7ffd6c54cb..11fd9ed3ac 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 3ac4e58c5494bd7e603a325b5b5c2b8075849fee Mon Sep 17 00:00:00 2001 +From 1afbf5ccff56e582229c8f673f50aedf2b24117e Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Fri, 4 Aug 2017 16:16:41 +0300 Subject: [PATCH] gtkdoc: fix issues that arise when cross-compiling @@ -16,70 +16,21 @@ Upstream-Status: Pending Signed-off-by: Alexander Kanavin --- - mesonbuild/modules/gnome.py | 18 +++++++++++++++--- - mesonbuild/scripts/gtkdochelper.py | 9 +++++++-- - 2 files changed, 22 insertions(+), 5 deletions(-) + mesonbuild/modules/gnome.py | 4 ++++ + 1 file changed, 4 insertions(+) diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py -index cb69641..727eb6a 100644 +index bf49770..7c5a363 100644 --- a/mesonbuild/modules/gnome.py +++ b/mesonbuild/modules/gnome.py -@@ -792,6 +792,10 @@ This will become a hard error in the future.''') +@@ -972,6 +972,10 @@ This will become a hard error in the future.''') '--mode=' + mode] if namespace: args.append('--namespace=' + namespace) + gtkdoc_exe_wrapper = state.environment.cross_info.config["properties"].get('gtkdoc_exe_wrapper', None) + if gtkdoc_exe_wrapper is not None: -+ args.append('--gtkdoc-exe-wrapper=' + gtkdoc_exe_wrapper) ++ args.append('--run=' + gtkdoc_exe_wrapper) + args += self._unpack_args('--htmlargs=', 'html_args', kwargs) args += self._unpack_args('--scanargs=', 'scan_args', kwargs) args += self._unpack_args('--scanobjsargs=', 'scanobjs_args', kwargs) -diff --git a/mesonbuild/scripts/gtkdochelper.py b/mesonbuild/scripts/gtkdochelper.py -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='') - parser.add_argument('--namespace', dest='namespace', default='') - parser.add_argument('--mode', dest='mode', default='') - parser.add_argument('--installdir', dest='install_dir') -+parser.add_argument('--gtkdoc-exe-wrapper', dest='gtkdoc_exe_wrapper') - - 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: -- err_msg = ["{!r} failed with status {:d}".format(cmd[0], p.returncode)] -+ err_msg = ["{!r} failed with status {:d}".format(cmd, p.returncode)] - if out: - err_msg.append(out) - raise MesonException('\n'.join(err_msg)) -@@ -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, -- gobject_typesfile, scanobjs_args, ld, cc, ldflags, cflags, -+ gobject_typesfile, scanobjs_args, gtkdoc_exe_wrapper, ld, cc, ldflags, cflags, - html_assets, content_files, ignore_headers, namespace, - expand_content_files, mode): - print("Building documentation for %s" % module) -@@ -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, -+ '--run=' + gtkdoc_exe_wrapper, -+ '--cc=' + cc, -+ '--ld=' + ld, - '--cflags=' + cflags, - '--ldflags=' + ldflags, - '--cc=' + cc, -@@ -238,6 +242,7 @@ def run(args): - mkdbargs, - options.gobject_typesfile, - scanobjsargs, -+ options.gtkdoc_exe_wrapper, - options.ld, - options.cc, - options.ldflags, diff --git a/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch b/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch index 6072985404..bf715d1e9f 100644 --- a/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch +++ b/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch @@ -1,4 +1,4 @@ -From 45426f06689a520fc47f81ee29b49d509f11ba58 Mon Sep 17 00:00:00 2001 +From 3cb2c811dc6d4890342afa5b709cd30cf7b8f3ca Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Mon, 19 Nov 2018 14:24:26 +0100 Subject: [PATCH] python module: do not manipulate the environment when calling @@ -6,38 +6,38 @@ Subject: [PATCH] python module: do not manipulate the environment when calling Upstream-Status: Inappropriate [oe-core specific] Signed-off-by: Alexander Kanavin + --- - mesonbuild/modules/python.py | 14 -------------- - 1 file changed, 14 deletions(-) + mesonbuild/modules/python.py | 12 ------------ + 1 file changed, 12 deletions(-) diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py -index 1195d8a..df81da4 100644 +index 9cfbd6f..3ff687a 100644 --- a/mesonbuild/modules/python.py +++ b/mesonbuild/modules/python.py -@@ -67,26 +67,12 @@ class PythonDependency(ExternalDependency): - if DependencyMethods.PKGCONFIG in self.methods and not python_holder.is_pypy: - pkg_version = self.variables.get('LDVERSION') or self.version - pkg_libdir = self.variables.get('LIBPC') -- old_pkg_libdir = os.environ.get('PKG_CONFIG_LIBDIR') -- old_pkg_path = os.environ.get('PKG_CONFIG_PATH') +@@ -75,11 +75,6 @@ class PythonDependency(ExternalDependency): + old_pkg_libdir = os.environ.get('PKG_CONFIG_LIBDIR') + old_pkg_path = os.environ.get('PKG_CONFIG_PATH') + +- os.environ.pop('PKG_CONFIG_PATH', None) - -- os.environ.pop('PKG_CONFIG_PATH', None) +- if pkg_libdir: +- os.environ['PKG_CONFIG_LIBDIR'] = pkg_libdir - -- if pkg_libdir: -- os.environ['PKG_CONFIG_LIBDIR'] = pkg_libdir - - try: - self.pkgdep = PkgConfigDependency('python-{}'.format(pkg_version), environment, kwargs) - except Exception: - pass + try: + self.pkgdep = PkgConfigDependency('python-{}'.format(pkg_version), environment, kwargs) + mlog.debug('Found "python-{}" via pkgconfig lookup in LIBPC ({})'.format(pkg_version, pkg_libdir)) +@@ -88,13 +83,6 @@ class PythonDependency(ExternalDependency): + mlog.debug('"python-{}" could not be found in LIBPC ({})'.format(pkg_version, pkg_libdir)) + mlog.debug(e) -- if old_pkg_path is not None: -- os.environ['PKG_CONFIG_PATH'] = old_pkg_path +- if old_pkg_path is not None: +- os.environ['PKG_CONFIG_PATH'] = old_pkg_path - -- if old_pkg_libdir is not None: -- os.environ['PKG_CONFIG_LIBDIR'] = old_pkg_libdir -- else: -- os.environ.pop('PKG_CONFIG_LIBDIR', None) +- if old_pkg_libdir is not None: +- os.environ['PKG_CONFIG_LIBDIR'] = old_pkg_libdir +- else: +- os.environ.pop('PKG_CONFIG_LIBDIR', None) + else: + mlog.debug('"python-{}" could not be found in LIBPC ({}), this is likely due to a relocated python installation'.format(pkg_version, pkg_libdir)) - if self.pkgdep and self.pkgdep.found(): - self.compile_args = self.pkgdep.get_compile_args() 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 deleted file mode 100644 index ca56a6a8bf..0000000000 --- a/meta/recipes-devtools/meson/meson/0002-Make-CPU-family-warnings-fatal.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 2e8553fc01e62ebc4faa240bf20984a8a0ac7387 Mon Sep 17 00:00:00 2001 -From: Ross Burton -Date: Tue, 3 Jul 2018 13:59:09 +0100 -Subject: [PATCH] Make CPU family warnings fatal - -Upstream-Status: Inappropriate [OE specific] -Signed-off-by: Ross Burton - ---- - mesonbuild/environment.py | 6 ++---- - 1 file changed, 2 insertions(+), 4 deletions(-) - -diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py -index d29a77f..267acf9 100644 ---- a/mesonbuild/environment.py -+++ b/mesonbuild/environment.py -@@ -239,9 +239,7 @@ def detect_cpu_family(compilers): - return 'x86_64' - - if trial not in known_cpu_families: -- 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, see https://wiki.yoctoproject.org/wiki/Meson/UnknownCPU for directions.' % trial) - - return trial - -@@ -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: -- mlog.warning('Unknown CPU family %s, please report this at https://github.com/mesonbuild/meson/issues/new' % value) -+ raise EnvironmentException('Unknown CPU family %s, see https://wiki.yoctoproject.org/wiki/Meson/UnknownCPU for directions.' % value) - - if self.ok_type(res): - self.config[s][entry] = res diff --git a/meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch b/meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch new file mode 100644 index 0000000000..e7ba40701f --- /dev/null +++ b/meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch @@ -0,0 +1,29 @@ +From ffab5c5046da29fc20b074d21f6de46520cee58c Mon Sep 17 00:00:00 2001 +From: Peter Kjellerstedt +Date: Thu, 26 Jul 2018 16:32:49 +0200 +Subject: [PATCH 2/2] Support building allarch recipes again + +This registers "allarch" as a known CPU family. + +Upstream-Status: Inappropriate [OE specific] +Signed-off-by: Peter Kjellerstedt + +--- + mesonbuild/environment.py | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py +index 5fcf9df..b4fc0dc 100644 +--- a/mesonbuild/environment.py ++++ b/mesonbuild/environment.py +@@ -72,6 +72,7 @@ from .compilers import ( + build_filename = 'meson.build' + + known_cpu_families = ( ++ 'allarch', + 'aarch64', + 'arc', + 'arm', +-- +2.17.1 + diff --git a/meta/recipes-devtools/meson/meson/0002-gobject-introspection-determine-g-ir-scanner-and-g-i.patch b/meta/recipes-devtools/meson/meson/0002-gobject-introspection-determine-g-ir-scanner-and-g-i.patch index f32267d0c4..61b26bb883 100644 --- a/meta/recipes-devtools/meson/meson/0002-gobject-introspection-determine-g-ir-scanner-and-g-i.patch +++ b/meta/recipes-devtools/meson/meson/0002-gobject-introspection-determine-g-ir-scanner-and-g-i.patch @@ -1,4 +1,4 @@ -From 0b860cb8a22ae876b6088939dbabca216bc29431 Mon Sep 17 00:00:00 2001 +From 9ccaed380780178c4dab3a681f652ac7cd27452d Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Fri, 4 Aug 2017 16:18:47 +0300 Subject: [PATCH] gobject-introspection: determine g-ir-scanner and @@ -12,28 +12,29 @@ Upstream-Status: Pending Signed-off-by: Alexander Kanavin --- - mesonbuild/modules/gnome.py | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) + mesonbuild/modules/gnome.py | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py -index b29bab9..dc4c401 100644 +index 7c5a363..0002498 100644 --- a/mesonbuild/modules/gnome.py +++ b/mesonbuild/modules/gnome.py -@@ -393,8 +393,6 @@ class GnomeModule(ExtensionModule): - raise MesonException('Gir takes one argument') +@@ -744,15 +744,15 @@ class GnomeModule(ExtensionModule): if kwargs.get('install_dir'): raise MesonException('install_dir is not supported with generate_gir(), see "install_dir_gir" and "install_dir_typelib"') + - giscanner = self.interpreter.find_program_impl('g-ir-scanner') - gicompiler = self.interpreter.find_program_impl('g-ir-compiler') - girtarget = args[0] - while hasattr(girtarget, 'held_object'): - girtarget = girtarget.held_object -@@ -405,6 +403,8 @@ class GnomeModule(ExtensionModule): - self.gir_dep = PkgConfigDependency('gobject-introspection-1.0', - state.environment, - {'native': True}) -+ giscanner = os.environ['PKG_CONFIG_SYSROOT_DIR'] + self.gir_dep.get_pkgconfig_variable('g_ir_scanner', {}) -+ gicompiler = os.environ['PKG_CONFIG_SYSROOT_DIR'] + self.gir_dep.get_pkgconfig_variable('g_ir_compiler', {}) - pkgargs = self.gir_dep.get_compile_args() - except Exception: - raise MesonException('gobject-introspection dependency was not found, gir cannot be generated.') +- + girtargets = [self._unwrap_gir_target(arg, state) for arg in args] + + if len(girtargets) > 1 and any([isinstance(el, build.Executable) for el in girtargets]): + raise MesonException('generate_gir only accepts a single argument when one of the arguments is an executable') + + self.gir_dep, pkgargs = self._get_gir_dep(state) ++ giscanner = os.environ['PKG_CONFIG_SYSROOT_DIR'] + self.gir_dep.get_pkgconfig_variable('g_ir_scanner', {}) ++ gicompiler = os.environ['PKG_CONFIG_SYSROOT_DIR'] + self.gir_dep.get_pkgconfig_variable('g_ir_compiler', {}) ++ + + ns = kwargs.pop('namespace') + nsversion = kwargs.pop('nsversion') diff --git a/meta/recipes-devtools/meson/meson/gi-flags.patch b/meta/recipes-devtools/meson/meson/gi-flags.patch deleted file mode 100644 index 9a4c296191..0000000000 --- a/meta/recipes-devtools/meson/meson/gi-flags.patch +++ /dev/null @@ -1,35 +0,0 @@ -Pass the correct cflags/ldflags to the gobject-introspection tools. - -Upstream-Status: Submitted [https://github.com/mesonbuild/meson/pull/4261] -Signed-off-by: Ross Burton - -diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py -index cb69641e..bb4449a0 100644 ---- a/mesonbuild/modules/gnome.py -+++ b/mesonbuild/modules/gnome.py -@@ -579,7 +579,10 @@ class GnomeModule(ExtensionModule): - external_ldflags += list(dep_external_ldflags) - scan_command += ['--cflags-begin'] - scan_command += cflags -- scan_command += state.environment.coredata.get_external_args(lang) -+ if state.environment.is_cross_build(): -+ scan_command += state.environment.cross_info.config["properties"].get(lang + '_args', "") -+ else: -+ scan_command += state.environment.coredata.get_external_args(lang) - scan_command += ['--cflags-end'] - # need to put our output directory first as we need to use the - # generated libraries instead of any possibly installed system/prefix -@@ -614,7 +614,12 @@ class GnomeModule(ExtensionModule): - scan_command.append('-L' + d) - scan_command += ['--library', libname] - -- for link_arg in state.environment.coredata.get_external_link_args(lang): -+ if state.environment.is_cross_build(): -+ link_args = state.environment.cross_info.config["properties"].get(lang + '_link_args', "") -+ else: -+ link_args = state.environment.coredata.get_external_link_args(lang) -+ -+ for link_arg in link_args: - if link_arg.startswith('-L'): - scan_command.append(link_arg) - scan_command += list(external_ldflags) diff --git a/meta/recipes-devtools/meson/meson/gtkdoc-flags.patch b/meta/recipes-devtools/meson/meson/gtkdoc-flags.patch deleted file mode 100644 index ecf3489bbe..0000000000 --- a/meta/recipes-devtools/meson/meson/gtkdoc-flags.patch +++ /dev/null @@ -1,44 +0,0 @@ -Ensure that in a cross compile only the target flags are passed to gtk-doc, and -not the native flags. - -Upstream-Status: Submitted [https://github.com/mesonbuild/meson/pull/4261] -Signed-off-by: Ross Burton - -diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py -index 4af33304..8751f53c 100644 ---- a/mesonbuild/modules/gnome.py -+++ b/mesonbuild/modules/gnome.py -@@ -851,17 +851,30 @@ This will become a hard error in the future.''') - if not isinstance(incd.held_object, (str, build.IncludeDirs)): - raise MesonException( - 'Gir include dirs should be include_directories().') -+ - cflags.update(get_include_args(inc_dirs)) -- cflags.update(state.environment.coredata.get_external_args('c')) -+ if state.environment.is_cross_build(): -+ cflags.update(state.environment.cross_info.config["properties"].get('c_args', "")) -+ else: -+ cflags.update(state.environment.coredata.get_external_args('c')) -+ - ldflags = OrderedSet() - ldflags.update(internal_ldflags) -- ldflags.update(state.environment.coredata.get_external_link_args('c')) -+ if state.environment.is_cross_build(): -+ ldflags.update(state.environment.cross_info.config["properties"].get('c_link_args', "")) -+ else: -+ ldflags.update(state.environment.coredata.get_external_link_args('c')) - ldflags.update(external_ldflags) -+ - if cflags: - args += ['--cflags=%s' % ' '.join(cflags)] - if ldflags: - args += ['--ldflags=%s' % ' '.join(ldflags)] -- compiler = state.environment.coredata.compilers.get('c') -+ -+ if state.environment.is_cross_build(): -+ compiler = state.environment.coredata.cross_compilers.get('c') -+ else: -+ compiler = state.environment.coredata.compilers.get('c') - if compiler: - args += ['--cc=%s' % ' '.join(compiler.get_exelist())] - args += ['--ld=%s' % ' '.join(compiler.get_linker_exelist())] diff --git a/meta/recipes-devtools/meson/meson_0.47.2.bb b/meta/recipes-devtools/meson/meson_0.47.2.bb deleted file mode 100644 index 897fa148d9..0000000000 --- a/meta/recipes-devtools/meson/meson_0.47.2.bb +++ /dev/null @@ -1,3 +0,0 @@ -include meson.inc - -BBCLASSEXTEND = "native" diff --git a/meta/recipes-devtools/meson/meson_0.49.0.bb b/meta/recipes-devtools/meson/meson_0.49.0.bb new file mode 100644 index 0000000000..de9b905c12 --- /dev/null +++ b/meta/recipes-devtools/meson/meson_0.49.0.bb @@ -0,0 +1,4 @@ +include meson.inc + +BBCLASSEXTEND = "native" + diff --git a/meta/recipes-devtools/meson/nativesdk-meson_0.47.2.bb b/meta/recipes-devtools/meson/nativesdk-meson_0.47.2.bb deleted file mode 100644 index 53503aa998..0000000000 --- a/meta/recipes-devtools/meson/nativesdk-meson_0.47.2.bb +++ /dev/null @@ -1,74 +0,0 @@ -include meson.inc - -inherit nativesdk - -SRC_URI += "file://meson-setup.py \ - file://meson-wrapper" - -def meson_array(var, d): - return "', '".join(d.getVar(var).split()).join(("'", "'")) - -# both are required but not used by meson -MESON_SDK_ENDIAN = "bogus-endian" -MESON_TARGET_ENDIAN = "bogus-endian" - -MESON_TOOLCHAIN_ARGS = "${BUILDSDK_CC_ARCH}${TOOLCHAIN_OPTIONS}" -MESON_C_ARGS = "${MESON_TOOLCHAIN_ARGS} ${BUILDSDK_CFLAGS}" -MESON_CPP_ARGS = "${MESON_TOOLCHAIN_ARGS} ${BUILDSDK_CXXFLAGS}" -MESON_LINK_ARGS = "${MESON_TOOLCHAIN_ARGS} ${BUILDSDK_LDFLAGS}" - -# This logic is similar but not identical to that in meson.bbclass, since it's -# generating for an SDK rather than a cross-compile. Important differences are: -# - We can't set vars like CC, CXX, etc. yet because they will be filled in with -# real paths by meson-setup.sh when the SDK is extracted. -# - Some overrides aren't needed, since the SDK injects paths that take care of -# them. -addtask write_config before do_install -do_write_config[vardeps] += "MESON_C_ARGS MESON_CPP_ARGS MESON_LINK_ARGS CC CXX LD AR NM STRIP READELF" -do_write_config() { - # This needs to be Py to split the args into single-element lists - cat >${WORKDIR}/meson.cross <${WORKDIR}/meson.cross <