diff options
Diffstat (limited to 'meta/recipes-devtools/meson')
14 files changed, 231 insertions, 413 deletions
diff --git a/meta/recipes-devtools/meson/meson.inc b/meta/recipes-devtools/meson/meson.inc deleted file mode 100644 index 622c22affd..0000000000 --- a/meta/recipes-devtools/meson/meson.inc +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | HOMEPAGE = "http://mesonbuild.com" | ||
2 | SUMMARY = "A high performance build system" | ||
3 | DESCRIPTION = "Meson is a build system designed to increase programmer \ | ||
4 | productivity. It does this by providing a fast, simple and easy to use \ | ||
5 | interface for modern software development tools and practices." | ||
6 | |||
7 | LICENSE = "Apache-2.0" | ||
8 | LIC_FILES_CHKSUM = "file://COPYING;md5=3b83ef96387f14655fc854ddc3c6bd57" | ||
9 | |||
10 | SRC_URI = "https://github.com/mesonbuild/meson/releases/download/${PV}/meson-${PV}.tar.gz \ | ||
11 | file://0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch \ | ||
12 | file://0003-native_bindir.patch \ | ||
13 | file://0001-python-module-do-not-manipulate-the-environment-when.patch \ | ||
14 | file://disable-rpath-handling.patch \ | ||
15 | file://cross-prop-default.patch \ | ||
16 | file://0001-modules-python.py-do-not-substitute-python-s-install.patch \ | ||
17 | " | ||
18 | SRC_URI[sha256sum] = "72e1c782ba9bda204f4a1ed57f98d027d7b6eb9414c723eebbd6ec7f1955c8a6" | ||
19 | |||
20 | SRC_URI_append_class-native = " \ | ||
21 | file://0001-Make-CPU-family-warnings-fatal.patch \ | ||
22 | file://0002-Support-building-allarch-recipes-again.patch \ | ||
23 | " | ||
24 | |||
25 | UPSTREAM_CHECK_URI = "https://github.com/mesonbuild/meson/releases" | ||
26 | UPSTREAM_CHECK_REGEX = "meson-(?P<pver>\d+(\.\d+)+)\.tar" | ||
27 | |||
28 | inherit setuptools3 | ||
29 | |||
30 | RDEPENDS_${PN} = "ninja python3-modules python3-pkg-resources" | ||
31 | |||
32 | FILES_${PN} += "${datadir}/polkit-1" | ||
diff --git a/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch b/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch index 0808891a27..8ea7c35950 100644 --- a/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch +++ b/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 76934bcbf2cfa7304e8864e28c51f58adda0392f Mon Sep 17 00:00:00 2001 | 1 | From b77cbe67df5fa0998946503f207c256ee740bb5f Mon Sep 17 00:00:00 2001 |
2 | From: Ross Burton <ross.burton@intel.com> | 2 | From: Ross Burton <ross.burton@intel.com> |
3 | Date: Tue, 3 Jul 2018 13:59:09 +0100 | 3 | Date: Tue, 3 Jul 2018 13:59:09 +0100 |
4 | Subject: [PATCH] Make CPU family warnings fatal | 4 | Subject: [PATCH] Make CPU family warnings fatal |
@@ -7,34 +7,38 @@ Upstream-Status: Inappropriate [OE specific] | |||
7 | Signed-off-by: Ross Burton <ross.burton@intel.com> | 7 | Signed-off-by: Ross Burton <ross.burton@intel.com> |
8 | 8 | ||
9 | --- | 9 | --- |
10 | mesonbuild/envconfig.py | 2 +- | 10 | mesonbuild/envconfig.py | 4 ++-- |
11 | mesonbuild/environment.py | 4 +--- | 11 | mesonbuild/environment.py | 6 ++---- |
12 | 2 files changed, 2 insertions(+), 4 deletions(-) | 12 | 2 files changed, 4 insertions(+), 6 deletions(-) |
13 | 13 | ||
14 | diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py | 14 | diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py |
15 | index ba35d16..2d3c34c 100644 | 15 | index 07f1229..a35c356 100644 |
16 | --- a/mesonbuild/envconfig.py | 16 | --- a/mesonbuild/envconfig.py |
17 | +++ b/mesonbuild/envconfig.py | 17 | +++ b/mesonbuild/envconfig.py |
18 | @@ -262,7 +262,7 @@ class MachineInfo: | 18 | @@ -285,8 +285,8 @@ class MachineInfo(HoldableObject): |
19 | 'but is missing {}.'.format(minimum_literal - set(literal))) | ||
19 | 20 | ||
20 | cpu_family = literal['cpu_family'] | 21 | cpu_family = literal['cpu_family'] |
21 | if cpu_family not in known_cpu_families: | 22 | - if cpu_family not in known_cpu_families: |
22 | - mlog.warning('Unknown CPU family {}, please report this at https://github.com/mesonbuild/meson/issues/new'.format(cpu_family)) | 23 | - mlog.warning(f'Unknown CPU family {cpu_family}, please report this at https://github.com/mesonbuild/meson/issues/new') |
24 | + if cpu_family not in known_cpu_families and cpu_family != "riscv": | ||
23 | + raise EnvironmentException('Unknown CPU family {}, see https://wiki.yoctoproject.org/wiki/Meson/UnknownCPU for directions.'.format(cpu_family)) | 25 | + raise EnvironmentException('Unknown CPU family {}, see https://wiki.yoctoproject.org/wiki/Meson/UnknownCPU for directions.'.format(cpu_family)) |
24 | 26 | ||
25 | endian = literal['endian'] | 27 | endian = literal['endian'] |
26 | if endian not in ('little', 'big'): | 28 | if endian not in ('little', 'big'): |
27 | diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py | 29 | diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py |
28 | index 756dd81..4d2c2b6 100644 | 30 | index 2ba2054..d798e3b 100644 |
29 | --- a/mesonbuild/environment.py | 31 | --- a/mesonbuild/environment.py |
30 | +++ b/mesonbuild/environment.py | 32 | +++ b/mesonbuild/environment.py |
31 | @@ -434,9 +434,7 @@ def detect_cpu_family(compilers: CompilersDict) -> str: | 33 | @@ -359,10 +359,8 @@ def detect_cpu_family(compilers: CompilersDict) -> str: |
32 | trial = 'ppc64' | 34 | if compilers and not any_compiler_has_define(compilers, '__mips64'): |
35 | trial = 'mips' | ||
33 | 36 | ||
34 | if trial not in known_cpu_families: | 37 | - if trial not in known_cpu_families: |
35 | - mlog.warning('Unknown CPU family {!r}, please report this at ' | 38 | - mlog.warning(f'Unknown CPU family {trial!r}, please report this at ' |
36 | - 'https://github.com/mesonbuild/meson/issues/new with the ' | 39 | - 'https://github.com/mesonbuild/meson/issues/new with the ' |
37 | - 'output of `uname -a` and `cat /proc/cpuinfo`'.format(trial)) | 40 | - 'output of `uname -a` and `cat /proc/cpuinfo`') |
41 | + if trial not in known_cpu_families and trail != "riscv": | ||
38 | + raise EnvironmentException('Unknown CPU family %s, see https://wiki.yoctoproject.org/wiki/Meson/UnknownCPU for directions.' % trial) | 42 | + raise EnvironmentException('Unknown CPU family %s, see https://wiki.yoctoproject.org/wiki/Meson/UnknownCPU for directions.' % trial) |
39 | 43 | ||
40 | return trial | 44 | return trial |
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 deleted file mode 100644 index 471f1500da..0000000000 --- a/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | From d3ef01a4208a801acad380a4aaceb6a21f8fa603 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
3 | Date: Fri, 4 Aug 2017 16:16:41 +0300 | ||
4 | Subject: [PATCH] gtkdoc: fix issues that arise when cross-compiling | ||
5 | |||
6 | Specifically: | ||
7 | 1) Make it possible to specify a wrapper for executing binaries | ||
8 | (usually, some kind of target hardware emulator, such as qemu) | ||
9 | 2) Explicitly provide CC and LD via command line, as otherwise gtk-doc will | ||
10 | try to guess them, incorrectly. | ||
11 | 3) If things break down, print the full command with arguments, | ||
12 | not just the binary name. | ||
13 | 4) Correctly determine the compiler/linker executables and cross-options when cross-compiling | ||
14 | |||
15 | Upstream-Status: Pending | ||
16 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
17 | |||
18 | --- | ||
19 | mesonbuild/modules/gnome.py | 4 ++++ | ||
20 | 1 file changed, 4 insertions(+) | ||
21 | |||
22 | diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py | ||
23 | index bcf77b9..6a4b472 100644 | ||
24 | --- a/mesonbuild/modules/gnome.py | ||
25 | +++ b/mesonbuild/modules/gnome.py | ||
26 | @@ -974,6 +974,10 @@ This will become a hard error in the future.''') | ||
27 | args.append('--{}={}'.format(program_name, path)) | ||
28 | if namespace: | ||
29 | args.append('--namespace=' + namespace) | ||
30 | + gtkdoc_exe_wrapper = state.environment.properties.host.get('gtkdoc_exe_wrapper', None) | ||
31 | + if gtkdoc_exe_wrapper is not None: | ||
32 | + args.append('--run=' + gtkdoc_exe_wrapper) | ||
33 | + | ||
34 | args += self._unpack_args('--htmlargs=', 'html_args', kwargs) | ||
35 | args += self._unpack_args('--scanargs=', 'scan_args', kwargs) | ||
36 | args += self._unpack_args('--scanobjsargs=', 'scanobjs_args', kwargs) | ||
diff --git a/meta/recipes-devtools/meson/meson/0001-modules-python.py-do-not-substitute-python-s-install.patch b/meta/recipes-devtools/meson/meson/0001-modules-python.py-do-not-substitute-python-s-install.patch deleted file mode 100644 index 231414fcb6..0000000000 --- a/meta/recipes-devtools/meson/meson/0001-modules-python.py-do-not-substitute-python-s-install.patch +++ /dev/null | |||
@@ -1,41 +0,0 @@ | |||
1 | From f8f67c8d5c3f374b1e30e2d40cb56a79f0544471 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
3 | Date: Thu, 18 Apr 2019 17:36:11 +0200 | ||
4 | Subject: [PATCH] modules/python.py: do not substitute python's install prefix | ||
5 | with meson's | ||
6 | |||
7 | Not sure why this is being done, but it | ||
8 | a) relies on Python's internal variable substitution which may break in the future | ||
9 | b) shouldn't be necessary as Python's prefix ought to be correct in the first place | ||
10 | |||
11 | Upstream-Status: Pending | ||
12 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
13 | |||
14 | --- | ||
15 | mesonbuild/modules/python.py | 6 +++--- | ||
16 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
17 | |||
18 | diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py | ||
19 | index eda70ce..18edd15 100644 | ||
20 | --- a/mesonbuild/modules/python.py | ||
21 | +++ b/mesonbuild/modules/python.py | ||
22 | @@ -251,7 +251,7 @@ INTROSPECT_COMMAND = '''import sysconfig | ||
23 | import json | ||
24 | import sys | ||
25 | |||
26 | -install_paths = sysconfig.get_paths(scheme='posix_prefix', vars={'base': '', 'platbase': '', 'installed_base': ''}) | ||
27 | +install_paths = sysconfig.get_paths(scheme='posix_prefix') | ||
28 | |||
29 | def links_against_libpython(): | ||
30 | from distutils.core import Distribution, Extension | ||
31 | @@ -280,8 +280,8 @@ class PythonInstallation(ExternalProgramHolder): | ||
32 | self.variables = info['variables'] | ||
33 | self.paths = info['paths'] | ||
34 | install_paths = info['install_paths'] | ||
35 | - self.platlib_install_path = os.path.join(prefix, install_paths['platlib'][1:]) | ||
36 | - self.purelib_install_path = os.path.join(prefix, install_paths['purelib'][1:]) | ||
37 | + self.platlib_install_path = install_paths['platlib'] | ||
38 | + self.purelib_install_path = install_paths['purelib'] | ||
39 | self.version = info['version'] | ||
40 | self.platform = info['platform'] | ||
41 | self.is_pypy = info['is_pypy'] | ||
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 eb0e90dbdd..2e0a4b1bbe 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 @@ | |||
1 | From 689e28c49b85311f93f39df70cbee702fc44afb6 Mon Sep 17 00:00:00 2001 | 1 | From e85683698aa3556bf14fc6d35f2c067f16af520b Mon Sep 17 00:00:00 2001 |
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | 2 | From: Alexander Kanavin <alex.kanavin@gmail.com> |
3 | Date: Mon, 19 Nov 2018 14:24:26 +0100 | 3 | Date: Mon, 19 Nov 2018 14:24:26 +0100 |
4 | Subject: [PATCH] python module: do not manipulate the environment when calling | 4 | Subject: [PATCH] python module: do not manipulate the environment when calling |
@@ -8,36 +8,30 @@ Upstream-Status: Inappropriate [oe-core specific] | |||
8 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | 8 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> |
9 | 9 | ||
10 | --- | 10 | --- |
11 | mesonbuild/modules/python.py | 12 ------------ | 11 | mesonbuild/dependencies/python.py | 6 +----- |
12 | 1 file changed, 12 deletions(-) | 12 | 1 file changed, 1 insertion(+), 5 deletions(-) |
13 | 13 | ||
14 | diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py | 14 | diff --git a/mesonbuild/dependencies/python.py b/mesonbuild/dependencies/python.py |
15 | index 07be318..b770603 100644 | 15 | index 9aea6bd..8c13ede 100644 |
16 | --- a/mesonbuild/modules/python.py | 16 | --- a/mesonbuild/dependencies/python.py |
17 | +++ b/mesonbuild/modules/python.py | 17 | +++ b/mesonbuild/dependencies/python.py |
18 | @@ -71,11 +71,6 @@ class PythonDependency(ExternalDependency): | 18 | @@ -380,9 +380,6 @@ def python_factory(env: 'Environment', for_machine: 'MachineChoice', |
19 | old_pkg_libdir = os.environ.get('PKG_CONFIG_LIBDIR') | 19 | empty.name = 'python' |
20 | old_pkg_path = os.environ.get('PKG_CONFIG_PATH') | 20 | return empty |
21 | 21 | ||
22 | - os.environ.pop('PKG_CONFIG_PATH', None) | 22 | - old_pkg_libdir = os.environ.pop('PKG_CONFIG_LIBDIR', None) |
23 | - | 23 | - old_pkg_path = os.environ.pop('PKG_CONFIG_PATH', None) |
24 | - if pkg_libdir: | 24 | - os.environ['PKG_CONFIG_LIBDIR'] = pkg_libdir |
25 | - os.environ['PKG_CONFIG_LIBDIR'] = pkg_libdir | ||
26 | - | ||
27 | try: | 25 | try: |
28 | self.pkgdep = PkgConfigDependency(pkg_name, environment, kwargs) | 26 | return PythonPkgConfigDependency(name, env, kwargs, installation, True) |
29 | mlog.debug('Found "{}" via pkgconfig lookup in LIBPC ({})'.format(pkg_name, pkg_libdir)) | 27 | finally: |
30 | @@ -84,13 +79,6 @@ class PythonDependency(ExternalDependency): | 28 | @@ -391,8 +388,7 @@ def python_factory(env: 'Environment', for_machine: 'MachineChoice', |
31 | mlog.debug('"{}" could not be found in LIBPC ({})'.format(pkg_name, pkg_libdir)) | 29 | os.environ[name] = value |
32 | mlog.debug(e) | 30 | elif name in os.environ: |
33 | 31 | del os.environ[name] | |
34 | - if old_pkg_path is not None: | 32 | - set_env('PKG_CONFIG_LIBDIR', old_pkg_libdir) |
35 | - os.environ['PKG_CONFIG_PATH'] = old_pkg_path | 33 | - set_env('PKG_CONFIG_PATH', old_pkg_path) |
36 | - | 34 | + pass |
37 | - if old_pkg_libdir is not None: | ||
38 | - os.environ['PKG_CONFIG_LIBDIR'] = old_pkg_libdir | ||
39 | - else: | ||
40 | - os.environ.pop('PKG_CONFIG_LIBDIR', None) | ||
41 | else: | ||
42 | mlog.debug('"{}" could not be found in LIBPC ({}), this is likely due to a relocated python installation'.format(pkg_name, pkg_libdir)) | ||
43 | 35 | ||
36 | candidates.append(functools.partial(wrap_in_pythons_pc_dir, pkg_name, env, kwargs, installation)) | ||
37 | # We only need to check both, if a python install has a LIBPC. It might point to the wrong location, | ||
diff --git a/meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch b/meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch index ddc34c2f49..a8396f30bb 100644 --- a/meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch +++ b/meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 6efb6114836fd4a1e012aa03b37f3beeeb22b466 Mon Sep 17 00:00:00 2001 | 1 | From 6fb8db54929b40e1fd7ac949ef44f0d37df0bae9 Mon Sep 17 00:00:00 2001 |
2 | From: Peter Kjellerstedt <pkj@axis.com> | 2 | From: Peter Kjellerstedt <pkj@axis.com> |
3 | Date: Thu, 26 Jul 2018 16:32:49 +0200 | 3 | Date: Thu, 26 Jul 2018 16:32:49 +0200 |
4 | Subject: [PATCH] Support building allarch recipes again | 4 | Subject: [PATCH] Support building allarch recipes again |
@@ -13,10 +13,10 @@ Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> | |||
13 | 1 file changed, 1 insertion(+) | 13 | 1 file changed, 1 insertion(+) |
14 | 14 | ||
15 | diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py | 15 | diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py |
16 | index 2d3c34c..b9e7908 100644 | 16 | index a35c356..436355f 100644 |
17 | --- a/mesonbuild/envconfig.py | 17 | --- a/mesonbuild/envconfig.py |
18 | +++ b/mesonbuild/envconfig.py | 18 | +++ b/mesonbuild/envconfig.py |
19 | @@ -36,6 +36,7 @@ from pathlib import Path | 19 | @@ -38,6 +38,7 @@ from pathlib import Path |
20 | 20 | ||
21 | 21 | ||
22 | known_cpu_families = ( | 22 | known_cpu_families = ( |
diff --git a/meta/recipes-devtools/meson/meson/0003-native_bindir.patch b/meta/recipes-devtools/meson/meson/0003-native_bindir.patch deleted file mode 100644 index ed85116c4f..0000000000 --- a/meta/recipes-devtools/meson/meson/0003-native_bindir.patch +++ /dev/null | |||
@@ -1,126 +0,0 @@ | |||
1 | From 1546e1f95a119175b7a4e4272a26dd85505e5ede Mon Sep 17 00:00:00 2001 | ||
2 | From: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> | ||
3 | Date: Wed, 15 Nov 2017 15:05:01 +0100 | ||
4 | Subject: [PATCH] native_bindir | ||
5 | |||
6 | Some libraries, like QT, have pre-processors that convert their input | ||
7 | files into something that the cross-compiler can process. We find the | ||
8 | path of those pre-processors via pkg-config-native instead of | ||
9 | pkg-config. | ||
10 | |||
11 | This path forces the use of pkg-config-native for host_bins arguments. | ||
12 | |||
13 | There are some discussions upstream to merge this patch, but I presonaly believe | ||
14 | that is is OE only. https://github.com/mesonbuild/meson/issues/1849#issuecomment-303730323 | ||
15 | |||
16 | Upstream-Status: Inappropriate [OE specific] | ||
17 | Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> | ||
18 | |||
19 | --- | ||
20 | mesonbuild/dependencies/base.py | 19 +++++++++++-------- | ||
21 | mesonbuild/dependencies/ui.py | 6 +++--- | ||
22 | 2 files changed, 14 insertions(+), 11 deletions(-) | ||
23 | |||
24 | diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py | ||
25 | index cd77b4b..7e3f338 100644 | ||
26 | --- a/mesonbuild/dependencies/base.py | ||
27 | +++ b/mesonbuild/dependencies/base.py | ||
28 | @@ -192,7 +192,7 @@ class Dependency: | ||
29 | def get_exe_args(self, compiler): | ||
30 | return [] | ||
31 | |||
32 | - def get_pkgconfig_variable(self, variable_name: str, kwargs: T.Dict[str, T.Any]) -> str: | ||
33 | + def get_pkgconfig_variable(self, variable_name: str, kwargs: T.Dict[str, T.Any], use_native=False) -> str: | ||
34 | raise DependencyException('{!r} is not a pkgconfig dependency'.format(self.name)) | ||
35 | |||
36 | def get_configtool_variable(self, variable_name): | ||
37 | @@ -280,7 +280,7 @@ class InternalDependency(Dependency): | ||
38 | return True | ||
39 | return any(d.is_built() for d in self.ext_deps) | ||
40 | |||
41 | - def get_pkgconfig_variable(self, variable_name: str, kwargs: T.Dict[str, T.Any]) -> str: | ||
42 | + def get_pkgconfig_variable(self, variable_name: str, kwargs: T.Dict[str, T.Any], use_native=False) -> str: | ||
43 | raise DependencyException('Method "get_pkgconfig_variable()" is ' | ||
44 | 'invalid for an internal dependency') | ||
45 | |||
46 | @@ -658,8 +658,11 @@ class PkgConfigDependency(ExternalDependency): | ||
47 | return s.format(self.__class__.__name__, self.name, self.is_found, | ||
48 | self.version_reqs) | ||
49 | |||
50 | - def _call_pkgbin_real(self, args, env): | ||
51 | - cmd = self.pkgbin.get_command() + args | ||
52 | + def _call_pkgbin_real(self, args, env, use_native=False): | ||
53 | + if use_native: | ||
54 | + cmd = [self.pkgbin.get_command()[0] + "-native"] + args | ||
55 | + else: | ||
56 | + cmd = self.pkgbin.get_command() + args | ||
57 | p, out, err = Popen_safe(cmd, env=env) | ||
58 | rc, out, err = p.returncode, out.strip(), err.strip() | ||
59 | call = ' '.join(cmd) | ||
60 | @@ -685,7 +688,7 @@ class PkgConfigDependency(ExternalDependency): | ||
61 | env['PKG_CONFIG_LIBDIR'] = new_pkg_config_libdir | ||
62 | mlog.debug('PKG_CONFIG_LIBDIR: ' + new_pkg_config_libdir) | ||
63 | |||
64 | - def _call_pkgbin(self, args, env=None): | ||
65 | + def _call_pkgbin(self, args, env=None, use_native=False): | ||
66 | # Always copy the environment since we're going to modify it | ||
67 | # with pkg-config variables | ||
68 | if env is None: | ||
69 | @@ -699,7 +702,7 @@ class PkgConfigDependency(ExternalDependency): | ||
70 | targs = tuple(args) | ||
71 | cache = PkgConfigDependency.pkgbin_cache | ||
72 | if (self.pkgbin, targs, fenv) not in cache: | ||
73 | - cache[(self.pkgbin, targs, fenv)] = self._call_pkgbin_real(args, env) | ||
74 | + cache[(self.pkgbin, targs, fenv)] = self._call_pkgbin_real(args, env, use_native) | ||
75 | return cache[(self.pkgbin, targs, fenv)] | ||
76 | |||
77 | def _convert_mingw_paths(self, args: T.List[str]) -> T.List[str]: | ||
78 | @@ -905,7 +908,7 @@ class PkgConfigDependency(ExternalDependency): | ||
79 | (self.name, out_raw)) | ||
80 | self.link_args, self.raw_link_args = self._search_libs(out, out_raw) | ||
81 | |||
82 | - def get_pkgconfig_variable(self, variable_name: str, kwargs: T.Dict[str, T.Any]) -> str: | ||
83 | + def get_pkgconfig_variable(self, variable_name: str, kwargs: T.Dict[str, T.Any], use_native=False) -> str: | ||
84 | options = ['--variable=' + variable_name, self.name] | ||
85 | |||
86 | if 'define_variable' in kwargs: | ||
87 | @@ -918,7 +921,7 @@ class PkgConfigDependency(ExternalDependency): | ||
88 | |||
89 | options = ['--define-variable=' + '='.join(definition)] + options | ||
90 | |||
91 | - ret, out, err = self._call_pkgbin(options) | ||
92 | + ret, out, err = self._call_pkgbin(options, use_native=use_native) | ||
93 | variable = '' | ||
94 | if ret != 0: | ||
95 | if self.required: | ||
96 | diff --git a/mesonbuild/dependencies/ui.py b/mesonbuild/dependencies/ui.py | ||
97 | index d897d76..a598d2e 100644 | ||
98 | --- a/mesonbuild/dependencies/ui.py | ||
99 | +++ b/mesonbuild/dependencies/ui.py | ||
100 | @@ -325,7 +325,7 @@ class QtBaseDependency(ExternalDependency): | ||
101 | self.bindir = self.get_pkgconfig_host_bins(core) | ||
102 | if not self.bindir: | ||
103 | # If exec_prefix is not defined, the pkg-config file is broken | ||
104 | - prefix = core.get_pkgconfig_variable('exec_prefix', {}) | ||
105 | + prefix = core.get_pkgconfig_variable('exec_prefix', {}, use_native=True) | ||
106 | if prefix: | ||
107 | self.bindir = os.path.join(prefix, 'bin') | ||
108 | |||
109 | @@ -528,7 +528,7 @@ class Qt4Dependency(QtBaseDependency): | ||
110 | applications = ['moc', 'uic', 'rcc', 'lupdate', 'lrelease'] | ||
111 | for application in applications: | ||
112 | try: | ||
113 | - return os.path.dirname(core.get_pkgconfig_variable('%s_location' % application, {})) | ||
114 | + return os.path.dirname(core.get_pkgconfig_variable('%s_location' % application, {}, use_native=True)) | ||
115 | except MesonException: | ||
116 | pass | ||
117 | |||
118 | @@ -538,7 +538,7 @@ class Qt5Dependency(QtBaseDependency): | ||
119 | QtBaseDependency.__init__(self, 'qt5', env, kwargs) | ||
120 | |||
121 | def get_pkgconfig_host_bins(self, core): | ||
122 | - return core.get_pkgconfig_variable('host_bins', {}) | ||
123 | + return core.get_pkgconfig_variable('host_bins', {}, use_native=True) | ||
124 | |||
125 | def get_private_includes(self, mod_inc_dir, module): | ||
126 | return _qt_get_private_includes(mod_inc_dir, module, self.version) | ||
diff --git a/meta/recipes-devtools/meson/meson/cross-prop-default.patch b/meta/recipes-devtools/meson/meson/cross-prop-default.patch deleted file mode 100644 index 772395e879..0000000000 --- a/meta/recipes-devtools/meson/meson/cross-prop-default.patch +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | meson.build files that use cc.run() in native builds can silently fallback to | ||
2 | meson.get_cross_property() in cross builds without an exe-wrapper, but there's | ||
3 | no way to know that this is happening. | ||
4 | |||
5 | As the defaults may be pessimistic (for example, disabling the support for a | ||
6 | feature that should be enabled) emit a warning when the default is used, so that | ||
7 | the recipe can explicitly set the cross property as relevant. | ||
8 | |||
9 | Upstream-Status: Submitted [https://github.com/mesonbuild/meson/pull/5071] | ||
10 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
11 | |||
12 | diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py | ||
13 | index 3c3cfae0..10e741ae 100644 | ||
14 | --- a/mesonbuild/interpreter.py | ||
15 | +++ b/mesonbuild/interpreter.py | ||
16 | @@ -1890,6 +1890,7 @@ class MesonMain(InterpreterObject): | ||
17 | return props[propname] | ||
18 | except Exception: | ||
19 | if len(args) == 2: | ||
20 | + mlog.warning('Cross property %s is using default value %s' % (propname, args[1])) | ||
21 | return args[1] | ||
22 | raise InterpreterException('Unknown cross property: %s.' % propname) | ||
23 | |||
diff --git a/meta/recipes-devtools/meson/meson/disable-rpath-handling.patch b/meta/recipes-devtools/meson/meson/disable-rpath-handling.patch deleted file mode 100644 index 7c766c61b0..0000000000 --- a/meta/recipes-devtools/meson/meson/disable-rpath-handling.patch +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | From 27bbd3c9d8d86de545fcf6608564a14571c98a61 Mon Sep 17 00:00:00 2001 | ||
2 | From: Richard Purdie <richard.purdie@linuxfoundation.org> | ||
3 | Date: Fri, 23 Nov 2018 15:28:28 +0000 | ||
4 | Subject: [PATCH] meson: Disable rpath stripping at install time | ||
5 | |||
6 | We need to allow our rpaths generated through the compiler flags to make it into | ||
7 | our binaries. Therefore disable the meson manipulations of these unless there | ||
8 | is a specific directive to do something differently in the project. | ||
9 | |||
10 | RP 2018/11/23 | ||
11 | |||
12 | Upstream-Status: Submitted [https://github.com/mesonbuild/meson/issues/2567] | ||
13 | |||
14 | --- | ||
15 | mesonbuild/minstall.py | 7 +++++-- | ||
16 | 1 file changed, 5 insertions(+), 2 deletions(-) | ||
17 | |||
18 | diff --git a/mesonbuild/minstall.py b/mesonbuild/minstall.py | ||
19 | index 212568a..06366d4 100644 | ||
20 | --- a/mesonbuild/minstall.py | ||
21 | +++ b/mesonbuild/minstall.py | ||
22 | @@ -653,8 +653,11 @@ class Installer: | ||
23 | if file_copied: | ||
24 | self.did_install_something = True | ||
25 | try: | ||
26 | - self.fix_rpath(outname, t.rpath_dirs_to_remove, install_rpath, final_path, | ||
27 | - install_name_mappings, verbose=False) | ||
28 | + if install_rpath: | ||
29 | + self.fix_rpath(outname, t.rpath_dirs_to_remove, install_rpath, final_path, | ||
30 | + install_name_mappings, verbose=False) | ||
31 | + else: | ||
32 | + print("RPATH changes at install time disabled") | ||
33 | except SystemExit as e: | ||
34 | if isinstance(e.code, int) and e.code == 0: | ||
35 | pass | ||
diff --git a/meta/recipes-devtools/meson/meson/meson-setup.py b/meta/recipes-devtools/meson/meson/meson-setup.py index 7ac4e3ad47..daaa551de2 100755 --- a/meta/recipes-devtools/meson/meson/meson-setup.py +++ b/meta/recipes-devtools/meson/meson/meson-setup.py | |||
@@ -27,9 +27,17 @@ except KeyError: | |||
27 | 27 | ||
28 | template_file = os.path.join(sysroot, 'usr/share/meson/meson.cross.template') | 28 | template_file = os.path.join(sysroot, 'usr/share/meson/meson.cross.template') |
29 | cross_file = os.path.join(sysroot, 'usr/share/meson/%smeson.cross' % os.environ["TARGET_PREFIX"]) | 29 | cross_file = os.path.join(sysroot, 'usr/share/meson/%smeson.cross' % os.environ["TARGET_PREFIX"]) |
30 | native_template_file = os.path.join(sysroot, 'usr/share/meson/meson.native.template') | ||
31 | native_file = os.path.join(sysroot, 'usr/share/meson/meson.native') | ||
30 | 32 | ||
31 | with open(template_file) as in_file: | 33 | with open(template_file) as in_file: |
32 | template = in_file.read() | 34 | template = in_file.read() |
33 | output = Template(template).substitute(Environ()) | 35 | output = Template(template).substitute(Environ()) |
34 | with open(cross_file, "w") as out_file: | 36 | with open(cross_file, "w") as out_file: |
35 | out_file.write(output) | 37 | out_file.write(output) |
38 | |||
39 | with open(native_template_file) as in_file: | ||
40 | template = in_file.read() | ||
41 | output = Template(template).substitute({'OECORE_NATIVE_SYSROOT': os.environ['OECORE_NATIVE_SYSROOT']}) | ||
42 | with open(native_file, "w") as out_file: | ||
43 | out_file.write(output) | ||
diff --git a/meta/recipes-devtools/meson/meson/meson-wrapper b/meta/recipes-devtools/meson/meson/meson-wrapper index d4ffe60f9a..7455985297 100755 --- a/meta/recipes-devtools/meson/meson/meson-wrapper +++ b/meta/recipes-devtools/meson/meson/meson-wrapper | |||
@@ -1,7 +1,11 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | if [ -z "$OECORE_NATIVE_SYSROOT" ]; then | 3 | if [ -z "$OECORE_NATIVE_SYSROOT" ]; then |
4 | echo "OECORE_NATIVE_SYSROOT not set; are you in a Yocto SDK environment?" >&2 | 4 | exec "meson.real" "$@" |
5 | fi | ||
6 | |||
7 | if [ -z "$SSL_CERT_DIR" ]; then | ||
8 | export SSL_CERT_DIR="$OECORE_NATIVE_SYSROOT/etc/ssl/certs/" | ||
5 | fi | 9 | fi |
6 | 10 | ||
7 | # If these are set to a cross-compile path, meson will get confused and try to | 11 | # If these are set to a cross-compile path, meson will get confused and try to |
@@ -9,6 +13,19 @@ fi | |||
9 | # config is already in meson.cross. | 13 | # config is already in meson.cross. |
10 | unset CC CXX CPP LD AR NM STRIP | 14 | unset CC CXX CPP LD AR NM STRIP |
11 | 15 | ||
16 | case "$1" in | ||
17 | setup|configure|dist|install|introspect|init|test|wrap|subprojects|rewrite|compile|devenv|env2mfile|help) MESON_CMD="$1" ;; | ||
18 | *) echo meson-wrapper: Implicit setup command assumed; MESON_CMD=setup ;; | ||
19 | esac | ||
20 | |||
21 | if [ "$MESON_CMD" = "setup" ]; then | ||
22 | MESON_SETUP_OPTS=" \ | ||
23 | --cross-file="$OECORE_NATIVE_SYSROOT/usr/share/meson/${TARGET_PREFIX}meson.cross" \ | ||
24 | --native-file="$OECORE_NATIVE_SYSROOT/usr/share/meson/meson.native" \ | ||
25 | " | ||
26 | echo meson-wrapper: Running meson with setup options: \"$MESON_SETUP_OPTS\" | ||
27 | fi | ||
28 | |||
12 | exec "$OECORE_NATIVE_SYSROOT/usr/bin/meson.real" \ | 29 | exec "$OECORE_NATIVE_SYSROOT/usr/bin/meson.real" \ |
13 | --cross-file "${OECORE_NATIVE_SYSROOT}/usr/share/meson/${TARGET_PREFIX}meson.cross" \ | 30 | "$@" \ |
14 | "$@" | 31 | $MESON_SETUP_OPTS |
diff --git a/meta/recipes-devtools/meson/meson_0.57.1.bb b/meta/recipes-devtools/meson/meson_0.57.1.bb deleted file mode 100644 index de9b905c12..0000000000 --- a/meta/recipes-devtools/meson/meson_0.57.1.bb +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | include meson.inc | ||
2 | |||
3 | BBCLASSEXTEND = "native" | ||
4 | |||
diff --git a/meta/recipes-devtools/meson/meson_1.3.1.bb b/meta/recipes-devtools/meson/meson_1.3.1.bb new file mode 100644 index 0000000000..9cc0cc31ab --- /dev/null +++ b/meta/recipes-devtools/meson/meson_1.3.1.bb | |||
@@ -0,0 +1,158 @@ | |||
1 | HOMEPAGE = "http://mesonbuild.com" | ||
2 | SUMMARY = "A high performance build system" | ||
3 | DESCRIPTION = "Meson is a build system designed to increase programmer \ | ||
4 | productivity. It does this by providing a fast, simple and easy to use \ | ||
5 | interface for modern software development tools and practices." | ||
6 | |||
7 | LICENSE = "Apache-2.0" | ||
8 | LIC_FILES_CHKSUM = "file://COPYING;md5=3b83ef96387f14655fc854ddc3c6bd57" | ||
9 | |||
10 | GITHUB_BASE_URI = "https://github.com/mesonbuild/meson/releases/" | ||
11 | SRC_URI = "${GITHUB_BASE_URI}/download/${PV}/meson-${PV}.tar.gz \ | ||
12 | file://meson-setup.py \ | ||
13 | file://meson-wrapper \ | ||
14 | file://0001-python-module-do-not-manipulate-the-environment-when.patch \ | ||
15 | file://0001-Make-CPU-family-warnings-fatal.patch \ | ||
16 | file://0002-Support-building-allarch-recipes-again.patch \ | ||
17 | " | ||
18 | SRC_URI[sha256sum] = "6020568bdede1643d4fb41e28215be38eff5d52da28ac7d125457c59e0032ad7" | ||
19 | UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)$" | ||
20 | |||
21 | inherit python_setuptools_build_meta github-releases | ||
22 | |||
23 | RDEPENDS:${PN} = "ninja python3-modules python3-pkg-resources" | ||
24 | |||
25 | FILES:${PN} += "${datadir}/polkit-1" | ||
26 | |||
27 | do_install:append () { | ||
28 | # As per the same issue in the python recipe itself: | ||
29 | # Unfortunately the following pyc files are non-deterministc due to 'frozenset' | ||
30 | # being written without strict ordering, even with PYTHONHASHSEED = 0 | ||
31 | # Upstream is discussing ways to solve the issue properly, until then let's | ||
32 | # just not install the problematic files. | ||
33 | # More info: http://benno.id.au/blog/2013/01/15/python-determinism | ||
34 | rm -f ${D}${libdir}/python*/site-packages/mesonbuild/dependencies/__pycache__/mpi.cpython* | ||
35 | } | ||
36 | |||
37 | BBCLASSEXTEND = "native nativesdk" | ||
38 | |||
39 | inherit meson-routines | ||
40 | |||
41 | # The cross file logic is similar but not identical to that in meson.bbclass, | ||
42 | # since it's generating for an SDK rather than a cross-compile. Important | ||
43 | # differences are: | ||
44 | # - We can't set vars like CC, CXX, etc. yet because they will be filled in with | ||
45 | # real paths by meson-setup.sh when the SDK is extracted. | ||
46 | # - Some overrides aren't needed, since the SDK injects paths that take care of | ||
47 | # them. | ||
48 | def var_list2str(var, d): | ||
49 | items = d.getVar(var).split() | ||
50 | return items[0] if len(items) == 1 else ', '.join(repr(s) for s in items) | ||
51 | |||
52 | def generate_native_link_template(d): | ||
53 | val = ['-L@{OECORE_NATIVE_SYSROOT}${libdir_native}', | ||
54 | '-L@{OECORE_NATIVE_SYSROOT}${base_libdir_native}', | ||
55 | '-Wl,-rpath-link,@{OECORE_NATIVE_SYSROOT}${libdir_native}', | ||
56 | '-Wl,-rpath-link,@{OECORE_NATIVE_SYSROOT}${base_libdir_native}', | ||
57 | '-Wl,--allow-shlib-undefined' | ||
58 | ] | ||
59 | build_arch = d.getVar('BUILD_ARCH') | ||
60 | if 'x86_64' in build_arch: | ||
61 | loader = 'ld-linux-x86-64.so.2' | ||
62 | elif 'i686' in build_arch: | ||
63 | loader = 'ld-linux.so.2' | ||
64 | elif 'aarch64' in build_arch: | ||
65 | loader = 'ld-linux-aarch64.so.1' | ||
66 | elif 'ppc64le' in build_arch: | ||
67 | loader = 'ld64.so.2' | ||
68 | elif 'loongarch64' in build_arch: | ||
69 | loader = 'ld-linux-loongarch-lp64d.so.1' | ||
70 | elif 'riscv64' in build_arch: | ||
71 | loader = 'ld-linux-riscv64-lp64d.so.1' | ||
72 | |||
73 | if loader: | ||
74 | val += ['-Wl,--dynamic-linker=@{OECORE_NATIVE_SYSROOT}${base_libdir_native}/' + loader] | ||
75 | |||
76 | return repr(val) | ||
77 | |||
78 | install_templates() { | ||
79 | install -d ${D}${datadir}/meson | ||
80 | |||
81 | cat >${D}${datadir}/meson/meson.native.template <<EOF | ||
82 | [binaries] | ||
83 | c = ${@meson_array('BUILD_CC', d)} | ||
84 | cpp = ${@meson_array('BUILD_CXX', d)} | ||
85 | ar = ${@meson_array('BUILD_AR', d)} | ||
86 | nm = ${@meson_array('BUILD_NM', d)} | ||
87 | strip = ${@meson_array('BUILD_STRIP', d)} | ||
88 | readelf = ${@meson_array('BUILD_READELF', d)} | ||
89 | pkgconfig = 'pkg-config-native' | ||
90 | |||
91 | [built-in options] | ||
92 | c_args = ['-isystem@{OECORE_NATIVE_SYSROOT}${includedir_native}' , ${@var_list2str('BUILD_OPTIMIZATION', d)}] | ||
93 | c_link_args = ${@generate_native_link_template(d)} | ||
94 | cpp_args = ['-isystem@{OECORE_NATIVE_SYSROOT}${includedir_native}' , ${@var_list2str('BUILD_OPTIMIZATION', d)}] | ||
95 | cpp_link_args = ${@generate_native_link_template(d)} | ||
96 | [properties] | ||
97 | sys_root = '@OECORE_NATIVE_SYSROOT' | ||
98 | EOF | ||
99 | |||
100 | cat >${D}${datadir}/meson/meson.cross.template <<EOF | ||
101 | [binaries] | ||
102 | c = @CC | ||
103 | cpp = @CXX | ||
104 | ar = @AR | ||
105 | nm = @NM | ||
106 | strip = @STRIP | ||
107 | pkgconfig = 'pkg-config' | ||
108 | |||
109 | [built-in options] | ||
110 | c_args = @CFLAGS | ||
111 | c_link_args = @LDFLAGS | ||
112 | cpp_args = @CPPFLAGS | ||
113 | cpp_link_args = @LDFLAGS | ||
114 | |||
115 | [properties] | ||
116 | needs_exe_wrapper = true | ||
117 | sys_root = @OECORE_TARGET_SYSROOT | ||
118 | |||
119 | [host_machine] | ||
120 | system = '$host_system' | ||
121 | cpu_family = '$host_cpu_family' | ||
122 | cpu = '$host_cpu' | ||
123 | endian = '$host_endian' | ||
124 | EOF | ||
125 | } | ||
126 | |||
127 | do_install:append:class-nativesdk() { | ||
128 | host_system=${SDK_OS} | ||
129 | host_cpu_family=${@meson_cpu_family("SDK_ARCH", d)} | ||
130 | host_cpu=${SDK_ARCH} | ||
131 | host_endian=${@meson_endian("SDK", d)} | ||
132 | install_templates | ||
133 | |||
134 | install -d ${D}${SDKPATHNATIVE}/post-relocate-setup.d | ||
135 | install -m 0755 ${WORKDIR}/meson-setup.py ${D}${SDKPATHNATIVE}/post-relocate-setup.d/ | ||
136 | |||
137 | # We need to wrap the real meson with a thin env setup wrapper. | ||
138 | mv ${D}${bindir}/meson ${D}${bindir}/meson.real | ||
139 | install -m 0755 ${WORKDIR}/meson-wrapper ${D}${bindir}/meson | ||
140 | } | ||
141 | |||
142 | FILES:${PN}:append:class-nativesdk = "${datadir}/meson ${SDKPATHNATIVE}" | ||
143 | |||
144 | do_install:append:class-native() { | ||
145 | host_system=${HOST_OS} | ||
146 | host_cpu_family=${@meson_cpu_family("HOST_ARCH", d)} | ||
147 | host_cpu=${HOST_ARCH} | ||
148 | host_endian=${@meson_endian("HOST", d)} | ||
149 | install_templates | ||
150 | |||
151 | install -d ${D}${datadir}/post-relocate-setup.d | ||
152 | install -m 0755 ${WORKDIR}/meson-setup.py ${D}${datadir}/post-relocate-setup.d/ | ||
153 | |||
154 | # We need to wrap the real meson with a thin wrapper that substitues native/cross files | ||
155 | # when running in a direct SDK environment. | ||
156 | mv ${D}${bindir}/meson ${D}${bindir}/meson.real | ||
157 | install -m 0755 ${WORKDIR}/meson-wrapper ${D}${bindir}/meson | ||
158 | } | ||
diff --git a/meta/recipes-devtools/meson/nativesdk-meson_0.57.1.bb b/meta/recipes-devtools/meson/nativesdk-meson_0.57.1.bb deleted file mode 100644 index 8778cab124..0000000000 --- a/meta/recipes-devtools/meson/nativesdk-meson_0.57.1.bb +++ /dev/null | |||
@@ -1,66 +0,0 @@ | |||
1 | include meson.inc | ||
2 | |||
3 | inherit siteinfo | ||
4 | inherit nativesdk | ||
5 | |||
6 | SRC_URI += "file://meson-setup.py \ | ||
7 | file://meson-wrapper" | ||
8 | |||
9 | def meson_endian(prefix, d): | ||
10 | arch, os = d.getVar(prefix + "_ARCH"), d.getVar(prefix + "_OS") | ||
11 | sitedata = siteinfo_data_for_machine(arch, os, d) | ||
12 | if "endian-little" in sitedata: | ||
13 | return "little" | ||
14 | elif "endian-big" in sitedata: | ||
15 | return "big" | ||
16 | else: | ||
17 | bb.fatal("Cannot determine endianism for %s-%s" % (arch, os)) | ||
18 | |||
19 | # The cross file logic is similar but not identical to that in meson.bbclass, | ||
20 | # since it's generating for an SDK rather than a cross-compile. Important | ||
21 | # differences are: | ||
22 | # - We can't set vars like CC, CXX, etc. yet because they will be filled in with | ||
23 | # real paths by meson-setup.sh when the SDK is extracted. | ||
24 | # - Some overrides aren't needed, since the SDK injects paths that take care of | ||
25 | # them. | ||
26 | do_install_append() { | ||
27 | install -d ${D}${datadir}/meson | ||
28 | cat >${D}${datadir}/meson/meson.cross.template <<EOF | ||
29 | [binaries] | ||
30 | c = @CC | ||
31 | cpp = @CXX | ||
32 | ar = @AR | ||
33 | nm = @NM | ||
34 | strip = @STRIP | ||
35 | pkgconfig = 'pkg-config' | ||
36 | |||
37 | [properties] | ||
38 | needs_exe_wrapper = true | ||
39 | c_args = @CFLAGS | ||
40 | c_link_args = @LDFLAGS | ||
41 | cpp_args = @CPPFLAGS | ||
42 | cpp_link_args = @LDFLAGS | ||
43 | sys_root = @OECORE_TARGET_SYSROOT | ||
44 | |||
45 | [host_machine] | ||
46 | system = '${SDK_OS}' | ||
47 | cpu_family = '${SDK_ARCH}' | ||
48 | cpu = '${SDK_ARCH}' | ||
49 | endian = '${@meson_endian("SDK", d)}' | ||
50 | EOF | ||
51 | |||
52 | install -d ${D}${SDKPATHNATIVE}/post-relocate-setup.d | ||
53 | install -m 0755 ${WORKDIR}/meson-setup.py ${D}${SDKPATHNATIVE}/post-relocate-setup.d/ | ||
54 | |||
55 | # We need to wrap the real meson with a thin env setup wrapper. | ||
56 | mv ${D}${bindir}/meson ${D}${bindir}/meson.real | ||
57 | install -m 0755 ${WORKDIR}/meson-wrapper ${D}${bindir}/meson | ||
58 | } | ||
59 | |||
60 | RDEPENDS_${PN} += "\ | ||
61 | nativesdk-ninja \ | ||
62 | nativesdk-python3 \ | ||
63 | nativesdk-python3-setuptools \ | ||
64 | " | ||
65 | |||
66 | FILES_${PN} += "${datadir}/meson ${SDKPATHNATIVE}" | ||