diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2019-04-18 17:59:17 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-04-23 23:30:20 +0100 |
commit | 1b74389d938c1dcf8f896d12e2ee01649df85193 (patch) | |
tree | a58b38b0b8fbbe305634271abcc1ed253bb1c11d | |
parent | 47f4ad9ff0dfd5ed25f92577eea767f809ca451e (diff) | |
download | poky-1b74389d938c1dcf8f896d12e2ee01649df85193.tar.gz |
meson: do not try to substitute the prefix in python supplied paths
The prefix should be correct in the first place, and substitution breaks
with our custom patched Python.
(From OE-Core rev: ad1d0187aed457e4b5bd1c0d11b39141786bc9fd)
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
4 files changed, 50 insertions, 5 deletions
diff --git a/meta/recipes-devtools/meson/meson.inc b/meta/recipes-devtools/meson/meson.inc index 6d743fbe14..21d34da6ad 100644 --- a/meta/recipes-devtools/meson/meson.inc +++ b/meta/recipes-devtools/meson/meson.inc | |||
@@ -16,6 +16,7 @@ SRC_URI = "https://github.com/mesonbuild/meson/releases/download/${PV}/meson-${P | |||
16 | file://0001-environment.py-detect-windows-also-if-the-system-str.patch \ | 16 | file://0001-environment.py-detect-windows-also-if-the-system-str.patch \ |
17 | file://0001-mesonbuild-environment.py-do-not-determine-whether-a.patch \ | 17 | file://0001-mesonbuild-environment.py-do-not-determine-whether-a.patch \ |
18 | file://0001-mesonbuild-environment.py-check-environment-for-vari.patch \ | 18 | file://0001-mesonbuild-environment.py-check-environment-for-vari.patch \ |
19 | file://0001-modules-python.py-do-not-substitute-python-s-install.patch \ | ||
19 | " | 20 | " |
20 | SRC_URI[sha256sum] = "2a1bc42dda58206fb922cda5e1ca95cc03ad126321d26acc47d3493ec4e7021f" | 21 | SRC_URI[sha256sum] = "2a1bc42dda58206fb922cda5e1ca95cc03ad126321d26acc47d3493ec4e7021f" |
21 | SRC_URI[md5sum] = "433483107fda4616eaf33de7e7083a84" | 22 | SRC_URI[md5sum] = "433483107fda4616eaf33de7e7083a84" |
diff --git a/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch b/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch index 2580b1e366..9e90b72f31 100644 --- a/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch +++ b/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From f76d2bf09f7ffd871d068c4ac4c4be083f5fb07f Mon Sep 17 00:00:00 2001 | 1 | From 1ec44c955f45f3787aaf92edd70dec5bcf03f665 Mon Sep 17 00:00:00 2001 |
2 | From: Ross Burton <ross.burton@intel.com> | 2 | From: Ross Burton <ross.burton@intel.com> |
3 | Date: Tue, 3 Jul 2018 13:59:09 +0100 | 3 | Date: Tue, 3 Jul 2018 13:59:09 +0100 |
4 | Subject: [PATCH] Make CPU family warnings fatal | 4 | Subject: [PATCH] Make CPU family warnings fatal |
@@ -12,7 +12,7 @@ Signed-off-by: Ross Burton <ross.burton@intel.com> | |||
12 | 2 files changed, 2 insertions(+), 4 deletions(-) | 12 | 2 files changed, 2 insertions(+), 4 deletions(-) |
13 | 13 | ||
14 | diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py | 14 | diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py |
15 | index f2510c1..b9841fe 100644 | 15 | index 5309ef4..3f0a399 100644 |
16 | --- a/mesonbuild/envconfig.py | 16 | --- a/mesonbuild/envconfig.py |
17 | +++ b/mesonbuild/envconfig.py | 17 | +++ b/mesonbuild/envconfig.py |
18 | @@ -178,7 +178,7 @@ class MachineInfo: | 18 | @@ -178,7 +178,7 @@ class MachineInfo: |
@@ -25,7 +25,7 @@ index f2510c1..b9841fe 100644 | |||
25 | endian = literal['endian'] | 25 | endian = literal['endian'] |
26 | if endian not in ('little', 'big'): | 26 | if endian not in ('little', 'big'): |
27 | diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py | 27 | diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py |
28 | index 4c1c5ac..a5a7461 100644 | 28 | index 3031a82..ecd18d0 100644 |
29 | --- a/mesonbuild/environment.py | 29 | --- a/mesonbuild/environment.py |
30 | +++ b/mesonbuild/environment.py | 30 | +++ b/mesonbuild/environment.py |
31 | @@ -242,9 +242,7 @@ def detect_cpu_family(compilers): | 31 | @@ -242,9 +242,7 @@ def detect_cpu_family(compilers): |
diff --git a/meta/recipes-devtools/meson/meson/0001-modules-python.py-do-not-substitute-python-s-install.patch b/meta/recipes-devtools/meson/meson/0001-modules-python.py-do-not-substitute-python-s-install.patch new file mode 100644 index 0000000000..a25c392270 --- /dev/null +++ b/meta/recipes-devtools/meson/meson/0001-modules-python.py-do-not-substitute-python-s-install.patch | |||
@@ -0,0 +1,44 @@ | |||
1 | From 1d178fb2928d325e339b15972890ceced863d3ec Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
3 | Date: Thu, 18 Apr 2019 17:36:11 +0200 | ||
4 | Subject: [PATCH] modules/python.py: do not substitute python's install prefix | ||
5 | with meson's | ||
6 | |||
7 | Not sure why this is being done, but it | ||
8 | a) relies on Python's internal variable substitution which may break in the future | ||
9 | b) shouldn't be necessary as Python's prefix ought to be correct in the first place | ||
10 | |||
11 | Upstream-Status: Pending | ||
12 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
13 | --- | ||
14 | mesonbuild/modules/python.py | 7 +++---- | ||
15 | 1 file changed, 3 insertions(+), 4 deletions(-) | ||
16 | |||
17 | diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py | ||
18 | index 6e2c63b..f5a37ac 100644 | ||
19 | --- a/mesonbuild/modules/python.py | ||
20 | +++ b/mesonbuild/modules/python.py | ||
21 | @@ -254,7 +254,7 @@ import sysconfig | ||
22 | import json | ||
23 | import sys | ||
24 | |||
25 | -install_paths = sysconfig.get_paths(scheme='posix_prefix', vars={'base': '', 'platbase': '', 'installed_base': ''}) | ||
26 | +install_paths = sysconfig.get_paths(scheme='posix_prefix') | ||
27 | |||
28 | def links_against_libpython(): | ||
29 | from distutils.core import Distribution, Extension | ||
30 | @@ -279,12 +279,11 @@ class PythonInstallation(ExternalProgramHolder): | ||
31 | ExternalProgramHolder.__init__(self, python) | ||
32 | self.interpreter = interpreter | ||
33 | self.subproject = self.interpreter.subproject | ||
34 | - prefix = self.interpreter.environment.coredata.get_builtin_option('prefix') | ||
35 | self.variables = info['variables'] | ||
36 | self.paths = info['paths'] | ||
37 | install_paths = info['install_paths'] | ||
38 | - self.platlib_install_path = os.path.join(prefix, install_paths['platlib'][1:]) | ||
39 | - self.purelib_install_path = os.path.join(prefix, install_paths['purelib'][1:]) | ||
40 | + self.platlib_install_path = install_paths['platlib'] | ||
41 | + self.purelib_install_path = install_paths['purelib'] | ||
42 | self.version = info['version'] | ||
43 | self.platform = info['platform'] | ||
44 | self.is_pypy = info['is_pypy'] | ||
diff --git a/meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch b/meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch index f0ea61bac5..323e21d8f6 100644 --- a/meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch +++ b/meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 755902910ad124095c671b3c7f057e6513d9c0c6 Mon Sep 17 00:00:00 2001 | 1 | From a4bce582c1f13f48b329526aa81710405c4c691e Mon Sep 17 00:00:00 2001 |
2 | From: Peter Kjellerstedt <pkj@axis.com> | 2 | From: Peter Kjellerstedt <pkj@axis.com> |
3 | Date: Thu, 26 Jul 2018 16:32:49 +0200 | 3 | Date: Thu, 26 Jul 2018 16:32:49 +0200 |
4 | Subject: [PATCH] Support building allarch recipes again | 4 | Subject: [PATCH] Support building allarch recipes again |
@@ -13,7 +13,7 @@ Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> | |||
13 | 1 file changed, 1 insertion(+) | 13 | 1 file changed, 1 insertion(+) |
14 | 14 | ||
15 | diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py | 15 | diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py |
16 | index b9841fe..9c0487e 100644 | 16 | index 3f0a399..4509e09 100644 |
17 | --- a/mesonbuild/envconfig.py | 17 | --- a/mesonbuild/envconfig.py |
18 | +++ b/mesonbuild/envconfig.py | 18 | +++ b/mesonbuild/envconfig.py |
19 | @@ -34,6 +34,7 @@ from . import mlog | 19 | @@ -34,6 +34,7 @@ from . import mlog |