diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2019-11-10 13:21:36 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2019-11-10 13:21:36 +0000 |
commit | 77398e424e45d9e98c1cef3c43bdadb9d56e81ef (patch) | |
tree | 5aeffd3fc7b92fc615bd2c222fa8831aeda1925b /sys-devel/automake/files | |
parent | bd4aeefe33e63f613512604e47bfca7b2187697d (diff) |
gentoo resync : 10.11.2019
Diffstat (limited to 'sys-devel/automake/files')
-rw-r--r-- | sys-devel/automake/files/automake-1.16-fix-AM_PATH_PYTHON.patch | 36 | ||||
-rw-r--r-- | sys-devel/automake/files/automake-1.16.1-py3-compile.patch | 61 |
2 files changed, 61 insertions, 36 deletions
diff --git a/sys-devel/automake/files/automake-1.16-fix-AM_PATH_PYTHON.patch b/sys-devel/automake/files/automake-1.16-fix-AM_PATH_PYTHON.patch deleted file mode 100644 index 146496d6dfd3..000000000000 --- a/sys-devel/automake/files/automake-1.16-fix-AM_PATH_PYTHON.patch +++ /dev/null @@ -1,36 +0,0 @@ -bug#30616: automake-1.16: aclocal is unable to process AM_PATH_PYTHON with variable as value - -http://lists.gnu.org/archive/html/bug-automake/2018-02/msg00012.html - ---- a/m4/python.m4 -+++ b/m4/python.m4 -@@ -36,24 +36,12 @@ AC_DEFUN([AM_PATH_PYTHON], - [ - dnl Find a Python interpreter. Python versions prior to 2.0 are not - dnl supported. (2.0 was released on October 16, 2000). -- m4_define_default([am_py_min_ver], m4_ifval([$1], [$1], [2.0])) -- dnl The arbitrary default maximum version. -- m4_define_default([am_py_max_ver], [4.0]) -- -+ dnl FIXME: Remove the need to hard-code Python versions here. - m4_define_default([_AM_PYTHON_INTERPRETER_LIST], -- [[python] \ -- dnl If we want some Python 2 versions (min version <= 2.7), -- dnl also search for "python2". -- m4_if(m4_version_compare(am_py_min_ver, [2.8]), [-1], [python2], []) \ -- [python3] \ -- dnl Construct a comma-separated list of interpreter names (python2.6, -- dnl python2.7, etc). We only care about the first 3 characters of the -- dnl version strings (major-dot-minor; not -- dnl major-dot-minor-dot-bugfix[-dot-whatever]) -- m4_foreach([py_ver], -- m4_esyscmd_s(seq -s[[", "]] -f["[[%.1f]]"] m4_substr(am_py_max_ver, [0], [3]) -0.1 m4_substr(am_py_min_ver, [0], [3])), -- dnl Remove python2.8 and python2.9 since they will never exist -- [m4_bmatch(py_ver, [2.[89]], [], [python]py_ver)])]) -+[python python2 python3 python3.9 python3.8 python3.7 python3.6 dnl -+ python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 dnl -+ python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 dnl -+ python2.1 python2.0]) - - AC_ARG_VAR([PYTHON], [the Python interpreter]) - diff --git a/sys-devel/automake/files/automake-1.16.1-py3-compile.patch b/sys-devel/automake/files/automake-1.16.1-py3-compile.patch new file mode 100644 index 000000000000..bbb08454763e --- /dev/null +++ b/sys-devel/automake/files/automake-1.16.1-py3-compile.patch @@ -0,0 +1,61 @@ +From d3edb7e0f3a5553b1ed919e566ec8c41022251a2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> +Date: Sun, 3 Nov 2019 11:51:19 +0100 +Subject: [PATCH] py-compile: Support -OO for py3.5+, and -O&-OO for pypy3 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Michał Górny <mgorny@gentoo.org> +--- + lib/py-compile | 27 +++++++++++++++++++++++++-- + 1 file changed, 25 insertions(+), 2 deletions(-) + +diff --git a/lib/py-compile b/lib/py-compile +index 1a3f4d644..44be97fc4 100755 +--- a/lib/py-compile ++++ b/lib/py-compile +@@ -140,7 +140,7 @@ $PYTHON -O -c " + import sys, os, py_compile, imp + + # pypy does not use .pyo optimization +-if hasattr(sys, 'pypy_translation_info'): ++if hasattr(sys, 'pypy_translation_info') and sys.hexversion < 0x03050000: + sys.exit(0) + + files = '''$files''' +@@ -154,7 +154,30 @@ for file in files.split(): + sys.stdout.write(file) + sys.stdout.flush() + if hasattr(imp, 'get_tag'): +- py_compile.compile(filepath, imp.cache_from_source(filepath, False), path) ++ py_compile.compile(filepath, imp.cache_from_source(filepath), path) ++ else: ++ py_compile.compile(filepath, filepath + 'o', path) ++sys.stdout.write('\n')" 2>/dev/null || : ++ ++$PYTHON -OO -c " ++import sys, os, py_compile, imp ++ ++# python<3.5 does not have split files for -O and -OO ++if sys.hexversion < 0x03050000: ++ sys.exit(0) ++ ++files = '''$files''' ++sys.stdout.write('Byte-compiling python modules (-OO versions) ...\n') ++for file in files.split(): ++ $pathtrans ++ $filetrans ++ if not os.path.exists(filepath) or not (len(filepath) >= 3 ++ and filepath[-3:] == '.py'): ++ continue ++ sys.stdout.write(file) ++ sys.stdout.flush() ++ if hasattr(imp, 'get_tag'): ++ py_compile.compile(filepath, imp.cache_from_source(filepath), path) + else: + py_compile.compile(filepath, filepath + 'o', path) + sys.stdout.write('\n')" 2>/dev/null || : +-- +2.23.0 + |