diff options
-rw-r--r-- | meta-oe/recipes-devtools/meson/meson/native_bindir.patch | 71 | ||||
-rw-r--r-- | meta-oe/recipes-devtools/meson/meson_0.40.1.bb | 1 |
2 files changed, 72 insertions, 0 deletions
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 0000000000..993e9750e3 --- /dev/null +++ b/meta-oe/recipes-devtools/meson/meson/native_bindir.patch | |||
@@ -0,0 +1,71 @@ | |||
1 | There are some discussions upstream to merge this patch, but I presonaly believe | ||
2 | that is is OE only. https://github.com/mesonbuild/meson/issues/1849#issuecomment-303730323 | ||
3 | |||
4 | Upstream-Status: Inappropriate [OE specific] | ||
5 | Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> | ||
6 | diff --git a/mesonbuild/dependencies.py b/mesonbuild/dependencies.py | ||
7 | index 04a22f985941..3e33bc4a79e7 100644 | ||
8 | --- a/mesonbuild/dependencies.py | ||
9 | +++ b/mesonbuild/dependencies.py | ||
10 | @@ -95,7 +95,7 @@ class Dependency: | ||
11 | def need_threads(self): | ||
12 | return False | ||
13 | |||
14 | - def get_pkgconfig_variable(self, variable_name): | ||
15 | + def get_pkgconfig_variable(self, variable_name, use_native=False): | ||
16 | raise MesonException('Tried to get a pkg-config variable from a non-pkgconfig dependency.') | ||
17 | |||
18 | class InternalDependency(Dependency): | ||
19 | @@ -224,8 +224,12 @@ class PkgConfigDependency(Dependency): | ||
20 | return s.format(self.__class__.__name__, self.name, self.is_found, | ||
21 | self.version_reqs) | ||
22 | |||
23 | - def _call_pkgbin(self, args): | ||
24 | - p, out = Popen_safe([self.pkgbin] + args, env=os.environ)[0:2] | ||
25 | + def _call_pkgbin(self, args, use_native=False): | ||
26 | + if use_native: | ||
27 | + pkgbin = [self.pkgbin + "-native"] | ||
28 | + else: | ||
29 | + pkgbin = [self.pkgbin] | ||
30 | + p, out = Popen_safe(pkgbin + args, env=os.environ)[0:2] | ||
31 | return p.returncode, out.strip() | ||
32 | |||
33 | def _set_cargs(self): | ||
34 | @@ -259,8 +263,8 @@ class PkgConfigDependency(Dependency): | ||
35 | self.is_libtool = True | ||
36 | self.libs.append(lib) | ||
37 | |||
38 | - def get_pkgconfig_variable(self, variable_name): | ||
39 | - ret, out = self._call_pkgbin(['--variable=' + variable_name, self.name]) | ||
40 | + def get_pkgconfig_variable(self, variable_name, use_native=False): | ||
41 | + ret, out = self._call_pkgbin(['--variable=' + variable_name, self.name], use_native=use_native) | ||
42 | variable = '' | ||
43 | if ret != 0: | ||
44 | if self.required: | ||
45 | @@ -1091,7 +1095,7 @@ class QtBaseDependency(Dependency): | ||
46 | self.bindir = self.get_pkgconfig_host_bins(core) | ||
47 | if not self.bindir: | ||
48 | # If exec_prefix is not defined, the pkg-config file is broken | ||
49 | - prefix = core.get_pkgconfig_variable('exec_prefix') | ||
50 | + prefix = core.get_pkgconfig_variable('exec_prefix', use_native=True) | ||
51 | if prefix: | ||
52 | self.bindir = os.path.join(prefix, 'bin') | ||
53 | |||
54 | @@ -1202,7 +1206,7 @@ class Qt5Dependency(QtBaseDependency): | ||
55 | QtBaseDependency.__init__(self, 'qt5', env, kwargs) | ||
56 | |||
57 | def get_pkgconfig_host_bins(self, core): | ||
58 | - return core.get_pkgconfig_variable('host_bins') | ||
59 | + return core.get_pkgconfig_variable('host_bins', use_native=True) | ||
60 | |||
61 | class Qt4Dependency(QtBaseDependency): | ||
62 | def __init__(self, env, kwargs): | ||
63 | @@ -1216,7 +1220,7 @@ class Qt4Dependency(QtBaseDependency): | ||
64 | applications = ['moc', 'uic', 'rcc', 'lupdate', 'lrelease'] | ||
65 | for application in applications: | ||
66 | try: | ||
67 | - return os.path.dirname(core.get_pkgconfig_variable('%s_location' % application)) | ||
68 | + return os.path.dirname(core.get_pkgconfig_variable('%s_location' % application, use_native=True)) | ||
69 | except MesonException: | ||
70 | pass | ||
71 | |||
diff --git a/meta-oe/recipes-devtools/meson/meson_0.40.1.bb b/meta-oe/recipes-devtools/meson/meson_0.40.1.bb index ab54b8c79d..14644ba9ba 100644 --- a/meta-oe/recipes-devtools/meson/meson_0.40.1.bb +++ b/meta-oe/recipes-devtools/meson/meson_0.40.1.bb | |||
@@ -6,6 +6,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=3b83ef96387f14655fc854ddc3c6bd57" | |||
6 | 6 | ||
7 | SRC_URI = " \ | 7 | SRC_URI = " \ |
8 | git://github.com/mesonbuild/meson.git \ | 8 | git://github.com/mesonbuild/meson.git \ |
9 | file://native_bindir.patch \ | ||
9 | " | 10 | " |
10 | 11 | ||
11 | SRCREV = "b25d3e4d3f2b4d37029a507cc089bdde643c6240" | 12 | SRCREV = "b25d3e4d3f2b4d37029a507cc089bdde643c6240" |