diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2018-11-19 15:55:41 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-01-08 20:14:42 +0000 |
commit | 1cfa86d80ffee6d25f0197d2ab13f5e74715e420 (patch) | |
tree | 3f31d540ca4fe0eba4e9f747386f7a9f0406e417 /meta | |
parent | b4e664db713cf37010e86205ebf6d969bcb5fa80 (diff) | |
download | poky-1cfa86d80ffee6d25f0197d2ab13f5e74715e420.tar.gz |
meson: do not manipulate the environment when looking for python via pkg-config
meson does it in a way that breaks oe builds (they export a bunch of PKG_CONFIG_ variables)
(From OE-Core rev: f071c5eb0a46b8ac5424c5baeb471a8080d4a078)
(From OE-Core rev: d5f1211b0820d5039ecec932fda92cbe1ba9132e)
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-devtools/meson/meson.inc | 1 | ||||
-rw-r--r-- | meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch | 43 |
2 files changed, 44 insertions, 0 deletions
diff --git a/meta/recipes-devtools/meson/meson.inc b/meta/recipes-devtools/meson/meson.inc index b7fb3e698a..32c6bfe5d3 100644 --- a/meta/recipes-devtools/meson/meson.inc +++ b/meta/recipes-devtools/meson/meson.inc | |||
@@ -11,6 +11,7 @@ SRC_URI = "https://github.com/mesonbuild/meson/releases/download/${PV}/meson-${P | |||
11 | file://0003-native_bindir.patch \ | 11 | file://0003-native_bindir.patch \ |
12 | file://gi-flags.patch \ | 12 | file://gi-flags.patch \ |
13 | file://gtkdoc-flags.patch \ | 13 | file://gtkdoc-flags.patch \ |
14 | file://0001-python-module-do-not-manipulate-the-environment-when.patch \ | ||
14 | " | 15 | " |
15 | SRC_URI[sha256sum] = "92d8afd921751261e36151643464efd3394162f69efbe8cd53e0a66b1cf395eb" | 16 | SRC_URI[sha256sum] = "92d8afd921751261e36151643464efd3394162f69efbe8cd53e0a66b1cf395eb" |
16 | SRC_URI[md5sum] = "31bda3519d8c0eb3438267268a78085e" | 17 | SRC_URI[md5sum] = "31bda3519d8c0eb3438267268a78085e" |
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 new file mode 100644 index 0000000000..6072985404 --- /dev/null +++ b/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch | |||
@@ -0,0 +1,43 @@ | |||
1 | From 45426f06689a520fc47f81ee29b49d509f11ba58 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
3 | Date: Mon, 19 Nov 2018 14:24:26 +0100 | ||
4 | Subject: [PATCH] python module: do not manipulate the environment when calling | ||
5 | pkg-config | ||
6 | |||
7 | Upstream-Status: Inappropriate [oe-core specific] | ||
8 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
9 | --- | ||
10 | mesonbuild/modules/python.py | 14 -------------- | ||
11 | 1 file changed, 14 deletions(-) | ||
12 | |||
13 | diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py | ||
14 | index 1195d8a..df81da4 100644 | ||
15 | --- a/mesonbuild/modules/python.py | ||
16 | +++ b/mesonbuild/modules/python.py | ||
17 | @@ -67,26 +67,12 @@ class PythonDependency(ExternalDependency): | ||
18 | if DependencyMethods.PKGCONFIG in self.methods and not python_holder.is_pypy: | ||
19 | pkg_version = self.variables.get('LDVERSION') or self.version | ||
20 | pkg_libdir = self.variables.get('LIBPC') | ||
21 | - old_pkg_libdir = os.environ.get('PKG_CONFIG_LIBDIR') | ||
22 | - old_pkg_path = os.environ.get('PKG_CONFIG_PATH') | ||
23 | - | ||
24 | - os.environ.pop('PKG_CONFIG_PATH', None) | ||
25 | - | ||
26 | - if pkg_libdir: | ||
27 | - os.environ['PKG_CONFIG_LIBDIR'] = pkg_libdir | ||
28 | |||
29 | try: | ||
30 | self.pkgdep = PkgConfigDependency('python-{}'.format(pkg_version), environment, kwargs) | ||
31 | except Exception: | ||
32 | pass | ||
33 | |||
34 | - if old_pkg_path is not None: | ||
35 | - os.environ['PKG_CONFIG_PATH'] = old_pkg_path | ||
36 | - | ||
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 | |||
42 | if self.pkgdep and self.pkgdep.found(): | ||
43 | self.compile_args = self.pkgdep.get_compile_args() | ||