summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2020-01-02 00:13:14 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2020-01-04 11:02:24 +0530
commitd7ee858c05bc38519f13390359bd9742e6d3e965 (patch)
tree42eb5594d3c2b0c1bd79e05a033ecd7174b1de68
parent09f35713f619a4c8c7a25f25327f5f03f9639906 (diff)
meson.recipe: Fix compatibility with Python 3.8
Taken from https://github.com/mesonbuild/meson/pull/5872 Fixes https://gitlab.freedesktop.org/gstreamer/cerbero/issues/220
-rw-r--r--recipes/build-tools/meson.recipe2
-rw-r--r--recipes/build-tools/meson/0001-flatten-list-to-subprocess.Popen-necessary-for-Pytho.patch27
2 files changed, 29 insertions, 0 deletions
diff --git a/recipes/build-tools/meson.recipe b/recipes/build-tools/meson.recipe
index bc9d1fc4..7fb4da69 100644
--- a/recipes/build-tools/meson.recipe
+++ b/recipes/build-tools/meson.recipe
@@ -25,6 +25,8 @@ class Recipe(recipe.Recipe):
'meson/0001-compilers-Fix-bitcode-and-other-options-for-objc-cod.patch',
# https://github.com/mesonbuild/meson/pull/5475
'meson/0001-environment-better-xcode-11-clang-detection.patch',
+ # https://github.com/mesonbuild/meson/pull/5872
+ 'meson/0001-flatten-list-to-subprocess.Popen-necessary-for-Pytho.patch',
]
deps = ['ninja']
diff --git a/recipes/build-tools/meson/0001-flatten-list-to-subprocess.Popen-necessary-for-Pytho.patch b/recipes/build-tools/meson/0001-flatten-list-to-subprocess.Popen-necessary-for-Pytho.patch
new file mode 100644
index 00000000..65fb62be
--- /dev/null
+++ b/recipes/build-tools/meson/0001-flatten-list-to-subprocess.Popen-necessary-for-Pytho.patch
@@ -0,0 +1,27 @@
+From e2a64cd698efde820ccf77c7912cfc5ebf89d2cd Mon Sep 17 00:00:00 2001
+From: "Michael Hirsch, Ph.D" <scivision@users.noreply.github.com>
+Date: Sun, 1 Sep 2019 13:40:05 -0400
+Subject: [PATCH] flatten list to subprocess.Popen, necessary for Python 3.8
+
+---
+ mesonbuild/backend/ninjabackend.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
+index 1afb073..312f6ef 100644
+--- a/mesonbuild/backend/ninjabackend.py
++++ b/mesonbuild/backend/ninjabackend.py
+@@ -185,8 +185,8 @@ int dummy;
+ # and locale dependent. Any attempt at converting it to
+ # Python strings leads to failure. We _must_ do this detection
+ # in raw byte mode and write the result in raw bytes.
+- pc = subprocess.Popen([compiler.get_exelist(),
+- '/showIncludes', '/c', 'incdetect.c'],
++ pc = subprocess.Popen(compiler.get_exelist() +
++ ['/showIncludes', '/c', 'incdetect.c'],
+ cwd=self.environment.get_scratch_dir(),
+ stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+ (stdo, _) = pc.communicate()
+--
+2.24.1.windows.2
+