summaryrefslogtreecommitdiff
path: root/sys-devel/automake/files
diff options
context:
space:
mode:
Diffstat (limited to 'sys-devel/automake/files')
-rw-r--r--sys-devel/automake/files/automake-1.16.1-py3-compile-test.patch12
-rw-r--r--sys-devel/automake/files/automake-1.16.1-py3-pep3147-cmdline.patch16
-rw-r--r--sys-devel/automake/files/automake-1.16.1-py3-pep3147.patch39
3 files changed, 67 insertions, 0 deletions
diff --git a/sys-devel/automake/files/automake-1.16.1-py3-compile-test.patch b/sys-devel/automake/files/automake-1.16.1-py3-compile-test.patch
new file mode 100644
index 000000000000..bd5a6759c292
--- /dev/null
+++ b/sys-devel/automake/files/automake-1.16.1-py3-compile-test.patch
@@ -0,0 +1,12 @@
+diff -ruN automake-1.16.1.orig/t/py-compile-basedir.sh automake-1.16.1/t/py-compile-basedir.sh
+--- automake-1.16.1.orig/t/py-compile-basedir.sh 2020-01-20 05:07:12.915260159 +0100
++++ automake-1.16.1/t/py-compile-basedir.sh 2020-01-20 05:07:45.827074984 +0100
+@@ -42,7 +42,7 @@
+ py_installed "$d2/$f.pyc"
+ py_installed "$d2/sub/$f.pyc"
+ files=$(find "$d2" | grep '\.py[co]$')
+- test $(echo "$files" | wc -l) -eq 4
++ test $(echo "$files" | wc -l) -eq 4 -o $(echo "$files" | wc -l) -eq 6
+ case $d2 in
+ .|..) rm -f $files;;
+ *) rm -rf "$d2";;
diff --git a/sys-devel/automake/files/automake-1.16.1-py3-pep3147-cmdline.patch b/sys-devel/automake/files/automake-1.16.1-py3-pep3147-cmdline.patch
new file mode 100644
index 000000000000..7ece18ebc300
--- /dev/null
+++ b/sys-devel/automake/files/automake-1.16.1-py3-pep3147-cmdline.patch
@@ -0,0 +1,16 @@
+diff -ruN automake-1.16.1.orig/t/instmany-python.sh automake-1.16.1/t/instmany-python.sh
+--- automake-1.16.1.orig/t/instmany-python.sh 2018-02-26 21:38:28.000000000 +0100
++++ automake-1.16.1/t/instmany-python.sh 2020-01-20 02:44:37.192352310 +0100
+@@ -21,7 +21,11 @@
+ required='python'
+ . test-init.sh
+
+-limit=2500
++limit=3200
++# Let's increase the number here a bit, otherwise the __pycache__ dirs
++# make the test fail. I know this is a hack, but does anything conform
++# to the POSIX limit of 4096 still anyway?
++
+ subdir=long_subdir_name_with_many_characters
+ nfiles=81
+ list=$(seq_ 1 $nfiles)
diff --git a/sys-devel/automake/files/automake-1.16.1-py3-pep3147.patch b/sys-devel/automake/files/automake-1.16.1-py3-pep3147.patch
new file mode 100644
index 000000000000..545544d89feb
--- /dev/null
+++ b/sys-devel/automake/files/automake-1.16.1-py3-pep3147.patch
@@ -0,0 +1,39 @@
+From: Lukas Fleischer
+Subject: python: Properly uninstall __pycache__ in subdirectories
+Date: Sun, 20 May 2018 17:28:51 +0200
+
+When uninstalling __pycache__ files in a subdirectory "sub", the
+Makefile incorrectly removed the files from __pycache__/sub/ instead of
+sub/__pycache__/.
+
+* lib/am/python.am (uninstall-%DIR%PYTHON): Use the correct path when
+uninstalling byte-compiled files installed in '__pycache__'
+subdirectories.
+
+Source: https://lists.gnu.org/archive/html/automake-patches/2018-05/msg00000.html
+Reviewed-by: Andreas K. Hüttel <dilfridge@gentoo.org>
+---
+ lib/am/python.am | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff -ruN automake-1.16.1.orig/lib/am/python.am automake-1.16.1/lib/am/python.am
+--- automake-1.16.1.orig/lib/am/python.am 2018-02-26 21:38:27.000000000 +0100
++++ automake-1.16.1/lib/am/python.am 2020-01-19 05:35:01.212177206 +0100
+@@ -97,7 +97,7 @@
+ if %?INSTALL%
+
+ ?FIRST?am__pep3147_tweak = \
+-?FIRST? sed -e 's|\.py$$||' -e 's|[^/]*$$|&.*.pyc\n&.*.pyo|'
++?FIRST? sed -e 's|\.py$$||' -e 's|[^/]*$$|__pycache__/&.*.pyc\n__pycache__/&.*.pyo|'
+
+ .PHONY uninstall-am: uninstall-%DIR%PYTHON
+ uninstall-%DIR%PYTHON:
+@@ -116,7 +116,7 @@
+ done; \
+ ## This is somewhat tricky, because for newer pythons we have to take PEP-3147
+ ## into account. Avoid exceeding the command-line length limit.
+- dir='$(DESTDIR)$(%NDIR%dir)/__pycache__'; \
++ dir='$(DESTDIR)$(%NDIR%dir)'; \
+ echo "$$py_files" | $(am__pep3147_tweak) | $(am__base_list) | \
+ while read files; do \
+ $(am__uninstall_files_from_dir) || st=$$?; \