diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2024-10-31 14:35:01 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2024-10-31 14:35:01 +0530 |
commit | 8a6cb0a058349b3b98bd94f36edb6c12ace7c25f (patch) | |
tree | e06a09b008eec79489550e2228ad3738d2e3c576 | |
parent | 5e64bd476e07f92e9a5092130d2ae6407025d045 (diff) |
ninja.recipe: Fix python 3.13 compat, used by Fedora 411.24.9
Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/1620>
-rw-r--r-- | recipes/build-tools/ninja.recipe | 5 | ||||
-rw-r--r-- | recipes/build-tools/ninja/0001-configure.py-Move-from-pipes-to-shlex.patch | 36 |
2 files changed, 40 insertions, 1 deletions
diff --git a/recipes/build-tools/ninja.recipe b/recipes/build-tools/ninja.recipe index 51a4e28e..7d668f01 100644 --- a/recipes/build-tools/ninja.recipe +++ b/recipes/build-tools/ninja.recipe @@ -8,7 +8,10 @@ class Recipe(recipe.Recipe): stype = SourceType.TARBALL url = 'https://github.com/ninja-build/ninja/archive/v%(version)s.tar.gz' tarball_checksum = '31747ae633213f1eda3842686f83c2aa1412e0f5691d1c14dbbcc67fe7400cea' - patches = ['ninja/0001-configure.py-Look-for-cl.exe-before-assuming-MSVC.patch'] + patches = [ + 'ninja/0001-configure.py-Look-for-cl.exe-before-assuming-MSVC.patch', + 'ninja/0001-configure.py-Move-from-pipes-to-shlex.patch', + ] files_bin = ['bin/ninja'] diff --git a/recipes/build-tools/ninja/0001-configure.py-Move-from-pipes-to-shlex.patch b/recipes/build-tools/ninja/0001-configure.py-Move-from-pipes-to-shlex.patch new file mode 100644 index 00000000..2d8448f4 --- /dev/null +++ b/recipes/build-tools/ninja/0001-configure.py-Move-from-pipes-to-shlex.patch @@ -0,0 +1,36 @@ +From 4b32663bf04a54818664081bb448b4c9d10c3371 Mon Sep 17 00:00:00 2001 +From: Nirbheek Chauhan <nirbheek@centricular.com> +Date: Thu, 31 Oct 2024 14:32:18 +0530 +Subject: [PATCH] configure.py: Move from pipes to shlex + +pipes.quote uses shlex.quote internally anyway, and pipes has been +removed with Python 3.13 +--- + configure.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/configure.py b/configure.py +index f5e5e3b..56f31fb 100755 +--- a/configure.py ++++ b/configure.py +@@ -23,7 +23,7 @@ from __future__ import print_function + + from optparse import OptionParser + import os +-import pipes ++import shlex + import string + import subprocess + import sys +@@ -268,7 +268,7 @@ n.variable('configure_args', ' '.join(configure_args)) + env_keys = set(['CXX', 'AR', 'CFLAGS', 'CXXFLAGS', 'LDFLAGS']) + configure_env = dict((k, os.environ[k]) for k in os.environ if k in env_keys) + if configure_env: +- config_str = ' '.join([k + '=' + pipes.quote(configure_env[k]) ++ config_str = ' '.join([k + '=' + shlex.quote(configure_env[k]) + for k in configure_env]) + n.variable('configure_env', config_str + '$ ') + n.newline() +-- +2.46.1 + |