diff options
Diffstat (limited to 'poky/meta/recipes-devtools/meson')
11 files changed, 53 insertions, 151 deletions
diff --git a/poky/meta/recipes-devtools/meson/meson.inc b/poky/meta/recipes-devtools/meson/meson.inc index e186dede9..7ddfccf2d 100644 --- a/poky/meta/recipes-devtools/meson/meson.inc +++ b/poky/meta/recipes-devtools/meson/meson.inc @@ -12,21 +12,12 @@ SRC_URI = "https://github.com/mesonbuild/meson/releases/download/${PV}/meson-${P file://0003-native_bindir.patch \ file://0001-python-module-do-not-manipulate-the-environment-when.patch \ file://disable-rpath-handling.patch \ - file://cross-prop-default.patch \ file://0001-modules-python.py-do-not-substitute-python-s-install.patch \ - file://0001-minstall-Correctly-set-uid-gid-of-installed-files.patch \ file://gi-target-dep.patch \ + file://0001-Make-CPU-family-warnings-fatal.patch \ + file://0002-Support-building-allarch-recipes-again.patch \ " -SRC_URI[sha256sum] = "72e1c782ba9bda204f4a1ed57f98d027d7b6eb9414c723eebbd6ec7f1955c8a6" - -SRC_URI_append_class-native = " \ - file://0001-Make-CPU-family-warnings-fatal.patch \ - file://0002-Support-building-allarch-recipes-again.patch \ -" - -# remove at next version upgrade or when output changes -PR = "r1" -HASHEQUIV_HASH_VERSION .= ".1" +SRC_URI[sha256sum] = "3144a3da662fcf79f1e5602fa929f2821cba4eba28c2c923fe0a7d3e3db04d5d" UPSTREAM_CHECK_URI = "https://github.com/mesonbuild/meson/releases" UPSTREAM_CHECK_REGEX = "meson-(?P<pver>\d+(\.\d+)+)\.tar" diff --git a/poky/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch b/poky/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch index 48941c97f..bcccfabd1 100644 --- a/poky/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch +++ b/poky/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch @@ -1,41 +1,43 @@ -From 76934bcbf2cfa7304e8864e28c51f58adda0392f Mon Sep 17 00:00:00 2001 +From b64032a2eb1fb760f4ffd5b4b666e2433cf80d39 Mon Sep 17 00:00:00 2001 From: Ross Burton <ross.burton@intel.com> Date: Tue, 3 Jul 2018 13:59:09 +0100 -Subject: [PATCH] Make CPU family warnings fatal +Subject: [PATCH 1/2] Make CPU family warnings fatal Upstream-Status: Inappropriate [OE specific] Signed-off-by: Ross Burton <ross.burton@intel.com> - --- mesonbuild/envconfig.py | 2 +- mesonbuild/environment.py | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py -index ba35d16..2d3c34c 100644 +index c6a4df3..4d58c91 100644 --- a/mesonbuild/envconfig.py +++ b/mesonbuild/envconfig.py -@@ -254,7 +254,7 @@ class MachineInfo: - +@@ -266,7 +266,7 @@ class MachineInfo: + cpu_family = literal['cpu_family'] if cpu_family not in known_cpu_families: -- mlog.warning('Unknown CPU family {}, please report this at https://github.com/mesonbuild/meson/issues/new'.format(cpu_family)) +- mlog.warning(f'Unknown CPU family {cpu_family}, please report this at https://github.com/mesonbuild/meson/issues/new') + raise EnvironmentException('Unknown CPU family {}, see https://wiki.yoctoproject.org/wiki/Meson/UnknownCPU for directions.'.format(cpu_family)) - + endian = literal['endian'] if endian not in ('little', 'big'): diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py -index 756dd81..4d2c2b6 100644 +index fc9b703..eea8345 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py -@@ -434,9 +434,7 @@ def detect_cpu_family(compilers: CompilersDict) -> str: +@@ -436,9 +436,7 @@ def detect_cpu_family(compilers: CompilersDict) -> str: trial = 'ppc64' - + 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 + +-- +2.24.0 diff --git a/poky/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch b/poky/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch index 471f1500d..ce90e515d 100644 --- a/poky/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch +++ b/poky/meta/recipes-devtools/meson/meson/0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch @@ -1,4 +1,4 @@ -From d3ef01a4208a801acad380a4aaceb6a21f8fa603 Mon Sep 17 00:00:00 2001 +From 2f9c59e0489e569c5382404667c10f5c200a72ad Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Fri, 4 Aug 2017 16:16:41 +0300 Subject: [PATCH] gtkdoc: fix issues that arise when cross-compiling @@ -20,11 +20,11 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> 1 file changed, 4 insertions(+) diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py -index bcf77b9..6a4b472 100644 +index dc2979e..c9ff9bd 100644 --- a/mesonbuild/modules/gnome.py +++ b/mesonbuild/modules/gnome.py -@@ -974,6 +974,10 @@ This will become a hard error in the future.''') - args.append('--{}={}'.format(program_name, path)) +@@ -1053,6 +1053,10 @@ class GnomeModule(ExtensionModule): + args.append(f'--{program_name}={path}') if namespace: args.append('--namespace=' + namespace) + gtkdoc_exe_wrapper = state.environment.properties.host.get('gtkdoc_exe_wrapper', None) diff --git a/poky/meta/recipes-devtools/meson/meson/0001-minstall-Correctly-set-uid-gid-of-installed-files.patch b/poky/meta/recipes-devtools/meson/meson/0001-minstall-Correctly-set-uid-gid-of-installed-files.patch deleted file mode 100644 index d55b7cc7c..000000000 --- a/poky/meta/recipes-devtools/meson/meson/0001-minstall-Correctly-set-uid-gid-of-installed-files.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 3f6f4964dc79ae986f44afe1687922381f237edd Mon Sep 17 00:00:00 2001 -From: Peter Kjellerstedt <pkj@axis.com> -Date: Wed, 3 Mar 2021 12:47:28 +0100 -Subject: [PATCH] minstall: Correctly set uid/gid of installed files - -In commit caab4d3d, the uid and gid arguments passed to os.chown() by -set_chown() were accidentally swapped, causing files to end up with -incorrect owner/group if the owner and group are not the same. - -Upstream-Status: Backport [https://github.com/mesonbuild/meson/commit/6226ac26ef63335bfb817db02b3f295c78214a82] -Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> ---- - mesonbuild/minstall.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/mesonbuild/minstall.py b/mesonbuild/minstall.py -index 785ff5869..07da408aa 100644 ---- a/mesonbuild/minstall.py -+++ b/mesonbuild/minstall.py -@@ -148,7 +148,7 @@ def set_chown(path: str, user: T.Optional[str] = None, group: T.Optional[str] = - Use a real function rather than a lambda to help mypy out. Also real - functions are faster. - """ -- real_os_chown(path, gid, uid, dir_fd=dir_fd, follow_symlinks=follow_symlinks) -+ real_os_chown(path, uid, gid, dir_fd=dir_fd, follow_symlinks=follow_symlinks) - - try: - os.chown = chown diff --git a/poky/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch b/poky/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch index eb0e90dbd..fdadc6869 100644 --- a/poky/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch +++ b/poky/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch @@ -1,4 +1,4 @@ -From 689e28c49b85311f93f39df70cbee702fc44afb6 Mon Sep 17 00:00:00 2001 +From 2264e67d7c2c22ca634fd26ea8ada6f0344ab280 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Mon, 19 Nov 2018 14:24:26 +0100 Subject: [PATCH] python module: do not manipulate the environment when calling @@ -12,10 +12,10 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> 1 file changed, 12 deletions(-) diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py -index 07be318..b770603 100644 +index 422155b..aaf5844 100644 --- a/mesonbuild/modules/python.py +++ b/mesonbuild/modules/python.py -@@ -71,11 +71,6 @@ class PythonDependency(ExternalDependency): +@@ -70,11 +70,6 @@ class PythonDependency(ExternalDependency): old_pkg_libdir = os.environ.get('PKG_CONFIG_LIBDIR') old_pkg_path = os.environ.get('PKG_CONFIG_PATH') @@ -26,9 +26,9 @@ index 07be318..b770603 100644 - try: self.pkgdep = PkgConfigDependency(pkg_name, environment, kwargs) - mlog.debug('Found "{}" via pkgconfig lookup in LIBPC ({})'.format(pkg_name, pkg_libdir)) -@@ -84,13 +79,6 @@ class PythonDependency(ExternalDependency): - mlog.debug('"{}" could not be found in LIBPC ({})'.format(pkg_name, pkg_libdir)) + mlog.debug(f'Found "{pkg_name}" via pkgconfig lookup in LIBPC ({pkg_libdir})') +@@ -83,13 +78,6 @@ class PythonDependency(ExternalDependency): + mlog.debug(f'"{pkg_name}" could not be found in LIBPC ({pkg_libdir})') mlog.debug(e) - if old_pkg_path is not None: @@ -39,5 +39,5 @@ index 07be318..b770603 100644 - else: - os.environ.pop('PKG_CONFIG_LIBDIR', None) else: - mlog.debug('"{}" could not be found in LIBPC ({}), this is likely due to a relocated python installation'.format(pkg_name, pkg_libdir)) + mlog.debug(f'"{pkg_name}" could not be found in LIBPC ({pkg_libdir}), this is likely due to a relocated python installation') diff --git a/poky/meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch b/poky/meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch index d0fe1126f..dcc1ce9c2 100644 --- a/poky/meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch +++ b/poky/meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch @@ -1,26 +1,28 @@ -From 6efb6114836fd4a1e012aa03b37f3beeeb22b466 Mon Sep 17 00:00:00 2001 +From 656bf55fed01df2d2e2ad6d9d9887173cb16b85c Mon Sep 17 00:00:00 2001 From: Peter Kjellerstedt <pkj@axis.com> Date: Thu, 26 Jul 2018 16:32:49 +0200 -Subject: [PATCH] Support building allarch recipes again +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 <peter.kjellerstedt@axis.com> - --- mesonbuild/envconfig.py | 1 + 1 file changed, 1 insertion(+) diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py -index 2d3c34c..b9e7908 100644 +index 4d58c91..ff01ad1 100644 --- a/mesonbuild/envconfig.py +++ b/mesonbuild/envconfig.py -@@ -38,6 +38,7 @@ _T = T.TypeVar('_T') - - +@@ -36,6 +36,7 @@ from pathlib import Path + + known_cpu_families = ( + 'allarch', 'aarch64', 'alpha', 'arc', +-- +2.24.0 + diff --git a/poky/meta/recipes-devtools/meson/meson/0003-native_bindir.patch b/poky/meta/recipes-devtools/meson/meson/0003-native_bindir.patch index ed85116c4..89257b9e0 100644 --- a/poky/meta/recipes-devtools/meson/meson/0003-native_bindir.patch +++ b/poky/meta/recipes-devtools/meson/meson/0003-native_bindir.patch @@ -1,4 +1,4 @@ -From 1546e1f95a119175b7a4e4272a26dd85505e5ede Mon Sep 17 00:00:00 2001 +From 30e97d4090a3d3f5b7ddcaf27cfa17f3c8c1d462 Mon Sep 17 00:00:00 2001 From: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Date: Wed, 15 Nov 2017 15:05:01 +0100 Subject: [PATCH] native_bindir @@ -18,23 +18,22 @@ Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> --- mesonbuild/dependencies/base.py | 19 +++++++++++-------- - mesonbuild/dependencies/ui.py | 6 +++--- - 2 files changed, 14 insertions(+), 11 deletions(-) + 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py -index cd77b4b..7e3f338 100644 +index 14380d4..d0c443f 100644 --- a/mesonbuild/dependencies/base.py +++ b/mesonbuild/dependencies/base.py -@@ -192,7 +192,7 @@ class Dependency: +@@ -179,7 +179,7 @@ class Dependency: def get_exe_args(self, compiler): return [] - def get_pkgconfig_variable(self, variable_name: str, kwargs: T.Dict[str, T.Any]) -> str: + def get_pkgconfig_variable(self, variable_name: str, kwargs: T.Dict[str, T.Any], use_native=False) -> str: - raise DependencyException('{!r} is not a pkgconfig dependency'.format(self.name)) + raise DependencyException(f'{self.name!r} is not a pkgconfig dependency') def get_configtool_variable(self, variable_name): -@@ -280,7 +280,7 @@ class InternalDependency(Dependency): +@@ -267,7 +267,7 @@ class InternalDependency(Dependency): return True return any(d.is_built() for d in self.ext_deps) @@ -43,7 +42,7 @@ index cd77b4b..7e3f338 100644 raise DependencyException('Method "get_pkgconfig_variable()" is ' 'invalid for an internal dependency') -@@ -658,8 +658,11 @@ class PkgConfigDependency(ExternalDependency): +@@ -645,8 +645,11 @@ class PkgConfigDependency(ExternalDependency): return s.format(self.__class__.__name__, self.name, self.is_found, self.version_reqs) @@ -57,16 +56,16 @@ index cd77b4b..7e3f338 100644 p, out, err = Popen_safe(cmd, env=env) rc, out, err = p.returncode, out.strip(), err.strip() call = ' '.join(cmd) -@@ -685,7 +688,7 @@ class PkgConfigDependency(ExternalDependency): - env['PKG_CONFIG_LIBDIR'] = new_pkg_config_libdir - mlog.debug('PKG_CONFIG_LIBDIR: ' + new_pkg_config_libdir) +@@ -674,7 +677,7 @@ class PkgConfigDependency(ExternalDependency): + if key.startswith('PKG_'): + mlog.debug(f'env[{key}]: {value}') - def _call_pkgbin(self, args, env=None): + def _call_pkgbin(self, args, env=None, use_native=False): # Always copy the environment since we're going to modify it # with pkg-config variables if env is None: -@@ -699,7 +702,7 @@ class PkgConfigDependency(ExternalDependency): +@@ -688,7 +691,7 @@ class PkgConfigDependency(ExternalDependency): targs = tuple(args) cache = PkgConfigDependency.pkgbin_cache if (self.pkgbin, targs, fenv) not in cache: @@ -75,7 +74,7 @@ index cd77b4b..7e3f338 100644 return cache[(self.pkgbin, targs, fenv)] def _convert_mingw_paths(self, args: T.List[str]) -> T.List[str]: -@@ -905,7 +908,7 @@ class PkgConfigDependency(ExternalDependency): +@@ -894,7 +897,7 @@ class PkgConfigDependency(ExternalDependency): (self.name, out_raw)) self.link_args, self.raw_link_args = self._search_libs(out, out_raw) @@ -84,7 +83,7 @@ index cd77b4b..7e3f338 100644 options = ['--variable=' + variable_name, self.name] if 'define_variable' in kwargs: -@@ -918,7 +921,7 @@ class PkgConfigDependency(ExternalDependency): +@@ -907,7 +910,7 @@ class PkgConfigDependency(ExternalDependency): options = ['--define-variable=' + '='.join(definition)] + options @@ -93,34 +92,3 @@ index cd77b4b..7e3f338 100644 variable = '' if ret != 0: if self.required: -diff --git a/mesonbuild/dependencies/ui.py b/mesonbuild/dependencies/ui.py -index d897d76..a598d2e 100644 ---- a/mesonbuild/dependencies/ui.py -+++ b/mesonbuild/dependencies/ui.py -@@ -325,7 +325,7 @@ class QtBaseDependency(ExternalDependency): - self.bindir = self.get_pkgconfig_host_bins(core) - if not self.bindir: - # If exec_prefix is not defined, the pkg-config file is broken -- prefix = core.get_pkgconfig_variable('exec_prefix', {}) -+ prefix = core.get_pkgconfig_variable('exec_prefix', {}, use_native=True) - if prefix: - self.bindir = os.path.join(prefix, 'bin') - -@@ -528,7 +528,7 @@ class Qt4Dependency(QtBaseDependency): - applications = ['moc', 'uic', 'rcc', 'lupdate', 'lrelease'] - for application in applications: - try: -- return os.path.dirname(core.get_pkgconfig_variable('%s_location' % application, {})) -+ return os.path.dirname(core.get_pkgconfig_variable('%s_location' % application, {}, use_native=True)) - except MesonException: - pass - -@@ -538,7 +538,7 @@ class Qt5Dependency(QtBaseDependency): - QtBaseDependency.__init__(self, 'qt5', env, kwargs) - - def get_pkgconfig_host_bins(self, core): -- return core.get_pkgconfig_variable('host_bins', {}) -+ return core.get_pkgconfig_variable('host_bins', {}, use_native=True) - - def get_private_includes(self, mod_inc_dir, module): - return _qt_get_private_includes(mod_inc_dir, module, self.version) diff --git a/poky/meta/recipes-devtools/meson/meson/cross-prop-default.patch b/poky/meta/recipes-devtools/meson/meson/cross-prop-default.patch deleted file mode 100644 index 772395e87..000000000 --- a/poky/meta/recipes-devtools/meson/meson/cross-prop-default.patch +++ /dev/null @@ -1,23 +0,0 @@ -meson.build files that use cc.run() in native builds can silently fallback to -meson.get_cross_property() in cross builds without an exe-wrapper, but there's -no way to know that this is happening. - -As the defaults may be pessimistic (for example, disabling the support for a -feature that should be enabled) emit a warning when the default is used, so that -the recipe can explicitly set the cross property as relevant. - -Upstream-Status: Submitted [https://github.com/mesonbuild/meson/pull/5071] -Signed-off-by: Ross Burton <ross.burton@intel.com> - -diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py -index 3c3cfae0..10e741ae 100644 ---- a/mesonbuild/interpreter.py -+++ b/mesonbuild/interpreter.py -@@ -1890,6 +1890,7 @@ class MesonMain(InterpreterObject): - return props[propname] - except Exception: - if len(args) == 2: -+ mlog.warning('Cross property %s is using default value %s' % (propname, args[1])) - return args[1] - raise InterpreterException('Unknown cross property: %s.' % propname) - diff --git a/poky/meta/recipes-devtools/meson/meson/gi-target-dep.patch b/poky/meta/recipes-devtools/meson/meson/gi-target-dep.patch index 25b30ca27..29e164ccc 100644 --- a/poky/meta/recipes-devtools/meson/meson/gi-target-dep.patch +++ b/poky/meta/recipes-devtools/meson/meson/gi-target-dep.patch @@ -3,7 +3,7 @@ to be executed) but *host* gobject-introspection libraries, as otherwise the native pkg-config can be used and the build will try to link native and host binaries together. -Upstream-Status: Pending +Upstream-Status: Backport [589236226856f591c9e8daf0cb7aa1aef8862388] Signed-off-by: Ross Burton <ross.burton@arm.com> diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py diff --git a/poky/meta/recipes-devtools/meson/meson_0.57.1.bb b/poky/meta/recipes-devtools/meson/meson_0.58.1.bb index de9b905c1..de9b905c1 100644 --- a/poky/meta/recipes-devtools/meson/meson_0.57.1.bb +++ b/poky/meta/recipes-devtools/meson/meson_0.58.1.bb diff --git a/poky/meta/recipes-devtools/meson/nativesdk-meson_0.57.1.bb b/poky/meta/recipes-devtools/meson/nativesdk-meson_0.58.1.bb index 8778cab12..74e1a7104 100644 --- a/poky/meta/recipes-devtools/meson/nativesdk-meson_0.57.1.bb +++ b/poky/meta/recipes-devtools/meson/nativesdk-meson_0.58.1.bb @@ -1,21 +1,11 @@ include meson.inc -inherit siteinfo +inherit meson-routines inherit nativesdk SRC_URI += "file://meson-setup.py \ file://meson-wrapper" -def meson_endian(prefix, d): - arch, os = d.getVar(prefix + "_ARCH"), d.getVar(prefix + "_OS") - sitedata = siteinfo_data_for_machine(arch, os, d) - if "endian-little" in sitedata: - return "little" - elif "endian-big" in sitedata: - return "big" - else: - bb.fatal("Cannot determine endianism for %s-%s" % (arch, os)) - # The cross file 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: @@ -44,7 +34,7 @@ sys_root = @OECORE_TARGET_SYSROOT [host_machine] system = '${SDK_OS}' -cpu_family = '${SDK_ARCH}' +cpu_family = '${@meson_cpu_family("SDK_ARCH", d)}' cpu = '${SDK_ARCH}' endian = '${@meson_endian("SDK", d)}' EOF |