summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRicardo Ribalda Delgado <ricardo.ribalda@gmail.com>2018-01-04 15:12:38 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-01-05 12:02:37 +0000
commit0dab296d48418ef1b4f1f724b8ae21c527c1a027 (patch)
tree54609ab9c3c8f80fbaff29fc8ca42518d78136c2 /meta
parentf43713878453473b1be65fc5669c9c8147ed496f (diff)
downloadpoky-0dab296d48418ef1b4f1f724b8ae21c527c1a027.tar.gz
meson: Port pkgconfig-native patch to 0.44.0
The update to 0.44.0 did not add this patch required for qt builds. (From OE-Core rev: 2aa0400c629e5d63ab6e70be32efa23b77a92eae) Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/meson/meson/0003-native_bindir.patch109
-rw-r--r--meta/recipes-devtools/meson/meson_0.44.0.bb1
2 files changed, 110 insertions, 0 deletions
diff --git a/meta/recipes-devtools/meson/meson/0003-native_bindir.patch b/meta/recipes-devtools/meson/meson/0003-native_bindir.patch
new file mode 100644
index 0000000000..8911dd6b34
--- /dev/null
+++ b/meta/recipes-devtools/meson/meson/0003-native_bindir.patch
@@ -0,0 +1,109 @@
1From: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
2Date: Wed, 15 Nov 2017 15:05:01 +0100
3Subject: [PATCH] native_bindir
4
5Some libraries, like QT, have pre-processors that convert their input
6files into something that the cross-compiler can process. We find the
7path of those pre-processors via pkg-config-native instead of
8pkg-config.
9
10This path forces the use of pkg-config-native for host_bins arguments.
11
12There are some discussions upstream to merge this patch, but I presonaly believe
13that is is OE only. https://github.com/mesonbuild/meson/issues/1849#issuecomment-303730323
14
15Upstream-Status: Inappropriate [OE specific]
16Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
17---
18 mesonbuild/dependencies/base.py | 14 +++++++++-----
19 mesonbuild/dependencies/ui.py | 6 +++---
20 2 files changed, 12 insertions(+), 8 deletions(-)
21
22diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py
23index 0ef33722f196..b3f7e7c06822 100644
24--- a/mesonbuild/dependencies/base.py
25+++ b/mesonbuild/dependencies/base.py
26@@ -130,7 +130,7 @@ class Dependency:
27 def need_threads(self):
28 return False
29
30- def get_pkgconfig_variable(self, variable_name, kwargs):
31+ def get_pkgconfig_variable(self, variable_name, kwargs, use_native=False):
32 raise DependencyException('{!r} is not a pkgconfig dependency'.format(self.name))
33
34 def get_configtool_variable(self, variable_name):
35@@ -149,7 +149,7 @@ class InternalDependency(Dependency):
36 self.sources = sources
37 self.ext_deps = ext_deps
38
39- def get_pkgconfig_variable(self, variable_name, kwargs):
40+ def get_pkgconfig_variable(self, variable_name, kwargs, use_native=False):
41 raise DependencyException('Method "get_pkgconfig_variable()" is '
42 'invalid for an internal dependency')
43
44@@ -414,10 +414,14 @@ class PkgConfigDependency(ExternalDependency):
45 return s.format(self.__class__.__name__, self.name, self.is_found,
46 self.version_reqs)
47
48- def _call_pkgbin(self, args, env=None):
49+ def _call_pkgbin(self, args, env=None, use_native=False):
50 if not env:
51 env = os.environ
52- p, out = Popen_safe([self.pkgbin] + args, env=env)[0:2]
53+ if use_native:
54+ pkgbin = [self.pkgbin + "-native"]
55+ else:
56+ pkgbin = [self.pkgbin]
57+ p, out = Popen_safe(pkgbin + args, env=env)[0:2]
58 return p.returncode, out.strip()
59
60 def _convert_mingw_paths(self, args):
61@@ -499,7 +503,7 @@ class PkgConfigDependency(ExternalDependency):
62 self.is_libtool = True
63 self.link_args.append(lib)
64
65- def get_pkgconfig_variable(self, variable_name, kwargs):
66+ def get_pkgconfig_variable(self, variable_name, kwargs, use_native=False):
67 options = ['--variable=' + variable_name, self.name]
68
69 if 'define_variable' in kwargs:
70@@ -512,7 +516,7 @@ class PkgConfigDependency(ExternalDependency):
71
72 options = ['--define-variable=' + '='.join(definition)] + options
73
74- ret, out = self._call_pkgbin(options)
75+ ret, out = self._call_pkgbin(options, use_native=use_native)
76 variable = ''
77 if ret != 0:
78 if self.required:
79diff --git a/mesonbuild/dependencies/ui.py b/mesonbuild/dependencies/ui.py
80index 1db518c12477..4ed1d041f6f4 100644
81--- a/mesonbuild/dependencies/ui.py
82+++ b/mesonbuild/dependencies/ui.py
83@@ -239,7 +239,7 @@ class QtBaseDependency(ExternalDependency):
84 self.bindir = self.get_pkgconfig_host_bins(core)
85 if not self.bindir:
86 # If exec_prefix is not defined, the pkg-config file is broken
87- prefix = core.get_pkgconfig_variable('exec_prefix', {})
88+ prefix = core.get_pkgconfig_variable('exec_prefix', {}, use_native=True)
89 if prefix:
90 self.bindir = os.path.join(prefix, 'bin')
91
92@@ -359,7 +359,7 @@ class Qt4Dependency(QtBaseDependency):
93 applications = ['moc', 'uic', 'rcc', 'lupdate', 'lrelease']
94 for application in applications:
95 try:
96- return os.path.dirname(core.get_pkgconfig_variable('%s_location' % application, {}))
97+ return os.path.dirname(core.get_pkgconfig_variable('%s_location' % application, {}, use_native=True))
98 except MesonException:
99 pass
100
101@@ -369,7 +369,7 @@ class Qt5Dependency(QtBaseDependency):
102 QtBaseDependency.__init__(self, 'qt5', env, kwargs)
103
104 def get_pkgconfig_host_bins(self, core):
105- return core.get_pkgconfig_variable('host_bins', {})
106+ return core.get_pkgconfig_variable('host_bins', {}, use_native=True)
107
108
109 # There are three different ways of depending on SDL2:
diff --git a/meta/recipes-devtools/meson/meson_0.44.0.bb b/meta/recipes-devtools/meson/meson_0.44.0.bb
index 9b4c7e6ab1..d9c691c7f8 100644
--- a/meta/recipes-devtools/meson/meson_0.44.0.bb
+++ b/meta/recipes-devtools/meson/meson_0.44.0.bb
@@ -8,6 +8,7 @@ SRC_URI = "https://github.com/mesonbuild/meson/releases/download/${PV}/${BP}.tar
8 file://0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch \ 8 file://0001-gtkdoc-fix-issues-that-arise-when-cross-compiling.patch \
9 file://0002-gobject-introspection-determine-g-ir-scanner-and-g-i.patch \ 9 file://0002-gobject-introspection-determine-g-ir-scanner-and-g-i.patch \
10 file://0001-Linker-rules-move-cross_args-in-front-of-output_args.patch \ 10 file://0001-Linker-rules-move-cross_args-in-front-of-output_args.patch \
11 file://0003-native_bindir.patch \
11 " 12 "
12SRC_URI[md5sum] = "26a7ca93ec9cea5facb365664261f9c6" 13SRC_URI[md5sum] = "26a7ca93ec9cea5facb365664261f9c6"
13SRC_URI[sha256sum] = "50f9b12b77272ef6ab064d26b7e06667f07fa9f931e6a20942bba2216ba4281b" 14SRC_URI[sha256sum] = "50f9b12b77272ef6ab064d26b7e06667f07fa9f931e6a20942bba2216ba4281b"