[oe-commits] [meta-openembedded] 22/129: meson: Use pkgconfig-native for the native tools
git at git.openembedded.org
git at git.openembedded.org
Mon Sep 11 16:10:31 UTC 2017
This is an automated email from the git hooks/post-receive script.
martin_jansa pushed a commit to branch pyro-next
in repository meta-openembedded.
commit 9be0ac6e72eeaaf1a9cb47a20d950a1a8cd61c4b
Author: Ricardo Ribalda Delgado <ricardo.ribalda at gmail.com>
AuthorDate: Tue May 23 10:48:31 2017 +0200
meson: Use pkgconfig-native for the native tools
QT relies on host compilers such mas mocc. Modify meson to use
pkgconfig-native instead of pkgconfig in such cases.
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda at gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
Signed-off-by: Armin Kuster <akuster808 at gmail.com>
---
.../meson/meson/native_bindir.patch | 52 ++++++++++++++++++++++
meta-oe/recipes-devtools/meson/meson_0.37.1.bb | 5 ++-
2 files changed, 56 insertions(+), 1 deletion(-)
diff --git a/meta-oe/recipes-devtools/meson/meson/native_bindir.patch b/meta-oe/recipes-devtools/meson/meson/native_bindir.patch
new file mode 100644
index 0000000..53eeff7
--- /dev/null
+++ b/meta-oe/recipes-devtools/meson/meson/native_bindir.patch
@@ -0,0 +1,52 @@
+diff --git a/mesonbuild/dependencies.py b/mesonbuild/dependencies.py
+index da73a57b7ecd..22100f69c580 100644
+--- a/mesonbuild/dependencies.py
++++ b/mesonbuild/dependencies.py
+@@ -65,7 +65,7 @@ class Dependency():
+ def need_threads(self):
+ return False
+
+- def get_pkgconfig_variable(self, variable_name):
++ def get_pkgconfig_variable(self, variable_name, use_native=False):
+ raise MesonException('Tried to get a pkg-config variable from a non-pkgconfig dependency.')
+
+ class InternalDependency(Dependency):
+@@ -177,8 +177,12 @@ class PkgConfigDependency(Dependency):
+ return s.format(self.__class__.__name__, self.name, self.is_found,
+ self.version_reqs)
+
+- def _call_pkgbin(self, args):
+- p, out = Popen_safe([self.pkgbin] + args, env=os.environ)[0:2]
++ def _call_pkgbin(self, args, use_native=False):
++ if use_native:
++ pkgbin = [self.pkgbin + "-native"]
++ else:
++ pkgbin = [self.pkgbin]
++ p, out = Popen_safe(pkgbin + args, env=os.environ)[0:2]
+ return (p.returncode, out.strip())
+
+ def _set_cargs(self):
+@@ -212,8 +216,8 @@ class PkgConfigDependency(Dependency):
+ self.is_libtool = True
+ self.libs.append(lib)
+
+- def get_pkgconfig_variable(self, variable_name):
+- ret, out = self._call_pkgbin(['--variable=' + variable_name, self.name])
++ def get_pkgconfig_variable(self, variable_name, use_native=False):
++ ret, out = self._call_pkgbin(['--variable=' + variable_name, self.name], use_native=use_native)
+ variable = ''
+ if ret != 0:
+ if self.required:
+@@ -933,10 +937,10 @@ class QtBaseDependency(Dependency):
+ corekwargs = {'required': 'false', 'silent': 'true'}
+ core = PkgConfigDependency(self.qtpkgname + 'Core', env, corekwargs)
+ # Used by self.compilers_detect()
+- self.bindir = core.get_pkgconfig_variable('host_bins')
++ self.bindir = core.get_pkgconfig_variable('host_bins', use_native=True)
+ 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')
+
diff --git a/meta-oe/recipes-devtools/meson/meson_0.37.1.bb b/meta-oe/recipes-devtools/meson/meson_0.37.1.bb
index a83af77..dbbea64 100644
--- a/meta-oe/recipes-devtools/meson/meson_0.37.1.bb
+++ b/meta-oe/recipes-devtools/meson/meson_0.37.1.bb
@@ -4,7 +4,10 @@ SUMMARY = "A high performance build system"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://COPYING;md5=3b83ef96387f14655fc854ddc3c6bd57"
-SRC_URI = "git://github.com/mesonbuild/meson.git"
+SRC_URI = " \
+ git://github.com/mesonbuild/meson.git \
+ file://native_bindir.patch \
+"
SRCREV = "3d4bfdcb22314ea7db45a5b075f8b2a9c1498aab"
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list