]> git.pld-linux.org Git - packages/automake.git/commitdiff
- fix version detection for python 3.10, rel 3 master auto/th/automake-1.16.5-3
authorJan Rękorajski <baggins@pld-linux.org>
Tue, 5 Apr 2022 14:41:24 +0000 (16:41 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Tue, 5 Apr 2022 14:41:24 +0000 (16:41 +0200)
automake.spec
python-3.10.patch [new file with mode: 0644]

index 4f41a135a3e456e67a38b138184acb3a2004a65a..e68c1fc38e8b03404dcaf3f1d1d56d7bd82b5f0d 100644 (file)
@@ -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
 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
 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
 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}
 URL:           http://sources.redhat.com/automake/
 BuildRequires: autoconf >= 2.69
 %if %{without bootstrap}
@@ -106,7 +106,7 @@ Makefile'ів.
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
-
+%patch3 -p1
 %patch4 -p1
 
 %if %{without bootstrap}
 %patch4 -p1
 
 %if %{without bootstrap}
diff --git a/python-3.10.patch b/python-3.10.patch
new file mode 100644 (file)
index 0000000..f70cae6
--- /dev/null
@@ -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])])
This page took 0.097445 seconds and 4 git commands to generate.