[oe-commits] [openembedded-core] 20/92: meson: do not manipulate the environment when looking for python via pkg-config

git at git.openembedded.org git at git.openembedded.org
Tue Jan 8 20:19:38 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch thud
in repository openembedded-core.

commit d5f1211b0820d5039ecec932fda92cbe1ba9132e
Author: Alexander Kanavin <alex.kanavin at gmail.com>
AuthorDate: Mon Nov 19 15:55:41 2018 +0100

    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)
    
    Signed-off-by: Alexander Kanavin <alex.kanavin at gmail.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
    Signed-off-by: Armin Kuster <akuster808 at gmail.com>
---
 meta/recipes-devtools/meson/meson.inc              |  1 +
 ...le-do-not-manipulate-the-environment-when.patch | 43 ++++++++++++++++++++++
 2 files changed, 44 insertions(+)

diff --git a/meta/recipes-devtools/meson/meson.inc b/meta/recipes-devtools/meson/meson.inc
index b7fb3e6..32c6bfe 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
            file://0003-native_bindir.patch \
            file://gi-flags.patch \
            file://gtkdoc-flags.patch \
+           file://0001-python-module-do-not-manipulate-the-environment-when.patch \
            "
 SRC_URI[sha256sum] = "92d8afd921751261e36151643464efd3394162f69efbe8cd53e0a66b1cf395eb"
 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 0000000..6072985
--- /dev/null
+++ b/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch
@@ -0,0 +1,43 @@
+From 45426f06689a520fc47f81ee29b49d509f11ba58 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin at gmail.com>
+Date: Mon, 19 Nov 2018 14:24:26 +0100
+Subject: [PATCH] python module: do not manipulate the environment when calling
+ pkg-config
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin at gmail.com>
+---
+ mesonbuild/modules/python.py | 14 --------------
+ 1 file changed, 14 deletions(-)
+
+diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py
+index 1195d8a..df81da4 100644
+--- a/mesonbuild/modules/python.py
++++ b/mesonbuild/modules/python.py
+@@ -67,26 +67,12 @@ class PythonDependency(ExternalDependency):
+         if DependencyMethods.PKGCONFIG in self.methods and not python_holder.is_pypy:
+             pkg_version = self.variables.get('LDVERSION') or self.version
+             pkg_libdir = self.variables.get('LIBPC')
+-            old_pkg_libdir = os.environ.get('PKG_CONFIG_LIBDIR')
+-            old_pkg_path = os.environ.get('PKG_CONFIG_PATH')
+-
+-            os.environ.pop('PKG_CONFIG_PATH', None)
+-
+-            if pkg_libdir:
+-                os.environ['PKG_CONFIG_LIBDIR'] = pkg_libdir
+ 
+             try:
+                 self.pkgdep = PkgConfigDependency('python-{}'.format(pkg_version), environment, kwargs)
+             except Exception:
+                 pass
+ 
+-            if old_pkg_path is not None:
+-                os.environ['PKG_CONFIG_PATH'] = old_pkg_path
+-
+-            if old_pkg_libdir is not None:
+-                os.environ['PKG_CONFIG_LIBDIR'] = old_pkg_libdir
+-            else:
+-                os.environ.pop('PKG_CONFIG_LIBDIR', None)
+ 
+         if self.pkgdep and self.pkgdep.found():
+             self.compile_args = self.pkgdep.get_compile_args()

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list