[packages/automake] - fix version detection for python 3.10, rel 3
baggins
baggins at pld-linux.org
Tue Apr 5 16:41:49 CEST 2022
commit 818cead20794a596604a0d90ab588c52d93ba10f
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Tue Apr 5 16:41:24 2022 +0200
- fix version detection for python 3.10, rel 3
automake.spec | 8 ++++----
python-3.10.patch | 17 +++++++++++++++++
2 files changed, 21 insertions(+), 4 deletions(-)
---
diff --git a/automake.spec b/automake.spec
index 4f41a13..e68c1fc 100644
--- a/automake.spec
+++ b/automake.spec
@@ -14,7 +14,7 @@ Summary(tr.UTF-8): Makefile yapılandırma araçları
Summary(uk.UTF-8): GNU automake - інструменти для автоматичної генерації Makefile'ів
Name: automake
Version: 1.16.5
-Release: 2
+Release: 3
Epoch: 1
License: GPL v2+
Group: Development/Building
@@ -23,8 +23,8 @@ Source0: https://ftp.gnu.org/gnu/automake/%{name}-%{version}.tar.xz
Patch0: %{name}-info.patch
Patch1: %{name}-man.patch
Patch2: %{name}-no_versioned_dir.patch
-
-Patch4: revert-debian-python-hacks.patch
+Patch3: revert-debian-python-hacks.patch
+Patch4: python-3.10.patch
URL: http://sources.redhat.com/automake/
BuildRequires: autoconf >= 2.69
%if %{without bootstrap}
@@ -106,7 +106,7 @@ Makefile'ів.
%patch0 -p1
%patch1 -p1
%patch2 -p1
-
+%patch3 -p1
%patch4 -p1
%if %{without bootstrap}
diff --git a/python-3.10.patch b/python-3.10.patch
new file mode 100644
index 0000000..f70cae6
--- /dev/null
+++ b/python-3.10.patch
@@ -0,0 +1,17 @@
+--- automake-1.16.5/m4/python.m4.orig 2022-04-05 16:36:02.262782055 +0200
++++ automake-1.16.5/m4/python.m4 2022-04-05 13:55:30.657947863 +0200
+@@ -304,11 +304,7 @@
+ AC_DEFUN([AM_PYTHON_CHECK_VERSION],
+ [prog="import sys
+ # split strings by '.' and convert to numeric. Append some zeros
+-# because we need at least 4 digits for the hex conversion.
+-# map returns an iterator in Python 3.0 and a list in 2.x
+-minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]]
+-minverhex = 0
+-# xrange is not present in Python 3.0 and range returns an iterator
+-for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]]
+-sys.exit(sys.hexversion < minverhex)"
++# because we need at least 3 digits for comparison.
++minver = tuple(map(int, '$2'.split('.'))) + (0, 0, 0)
++sys.exit(sys.version_info[[:3]] < minver[[:3]])"
+ AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/automake.git/commitdiff/818cead20794a596604a0d90ab588c52d93ba10f
More information about the pld-cvs-commit
mailing list