summaryrefslogtreecommitdiff
path: root/graphics/py-mcomix/patches
diff options
context:
space:
mode:
authornonaka <nonaka>2016-12-03 04:08:53 +0000
committernonaka <nonaka>2016-12-03 04:08:53 +0000
commit143417f1b5fa8adfc14a89c38a3f3c6ae3abbd72 (patch)
tree60c74f19727a2d511e6b103069bbd20afa036ad4 /graphics/py-mcomix/patches
parentd69df42c476880eb5f83d2564aacad937eb24a72 (diff)
downloadpkgsrc-143417f1b5fa8adfc14a89c38a3f3c6ae3abbd72.tar.gz
fix read subprocess stdout line by line.
Bump PKGREVISION.
Diffstat (limited to 'graphics/py-mcomix/patches')
-rw-r--r--graphics/py-mcomix/patches/patch-mcomix_archive_archive_base.py17
-rw-r--r--graphics/py-mcomix/patches/patch-mcomix_archive_pdf_external.py26
-rw-r--r--graphics/py-mcomix/patches/patch-mcomix_archive_rar_external.py17
-rw-r--r--graphics/py-mcomix/patches/patch-mcomix_archive_sevenzip_external.py26
4 files changed, 86 insertions, 0 deletions
diff --git a/graphics/py-mcomix/patches/patch-mcomix_archive_archive_base.py b/graphics/py-mcomix/patches/patch-mcomix_archive_archive_base.py
new file mode 100644
index 00000000000..e82f3e36b2a
--- /dev/null
+++ b/graphics/py-mcomix/patches/patch-mcomix_archive_archive_base.py
@@ -0,0 +1,17 @@
+$NetBSD: patch-mcomix_archive_archive_base.py,v 1.1 2016/12/03 04:08:53 nonaka Exp $
+
+fix read subprocess stdout line by line.
+
+See http://stackoverflow.com/questions/2715847/python-read-streaming-input-from-subprocess-communicate/17698359#17698359
+
+--- mcomix/archive/archive_base.py.orig 2016-02-12 18:52:12.000000000 +0000
++++ mcomix/archive/archive_base.py 2016-12-03 03:47:22.878349500 +0000
+@@ -211,7 +211,7 @@ class ExternalExecutableArchive(NonUnico
+ self._get_list_arguments() +
+ [self.archive])
+ try:
+- for line in proc.stdout:
++ for line in iter(proc.stdout.readline, b''):
+ filename = self._parse_list_output_line(line.rstrip(os.linesep))
+ if filename is not None:
+ yield self._unicode_filename(filename)
diff --git a/graphics/py-mcomix/patches/patch-mcomix_archive_pdf_external.py b/graphics/py-mcomix/patches/patch-mcomix_archive_pdf_external.py
new file mode 100644
index 00000000000..a57716c6761
--- /dev/null
+++ b/graphics/py-mcomix/patches/patch-mcomix_archive_pdf_external.py
@@ -0,0 +1,26 @@
+$NetBSD: patch-mcomix_archive_pdf_external.py,v 1.1 2016/12/03 04:08:53 nonaka Exp $
+
+fix read subprocess stdout line by line.
+
+See http://stackoverflow.com/questions/2715847/python-read-streaming-input-from-subprocess-communicate/17698359#17698359
+
+--- mcomix/archive/pdf_external.py.orig 2016-02-12 18:52:12.000000000 +0000
++++ mcomix/archive/pdf_external.py 2016-12-03 03:47:31.069776589 +0000
+@@ -34,7 +34,7 @@ class PdfArchive(archive_base.BaseArchiv
+ def iter_contents(self):
+ proc = process.popen(_mutool_exec + ['show', '--', self.archive, 'pages'])
+ try:
+- for line in proc.stdout:
++ for line in iter(proc.stdout.readline, b''):
+ if line.startswith('page '):
+ yield line.split()[1] + '.png'
+ finally:
+@@ -52,7 +52,7 @@ class PdfArchive(archive_base.BaseArchiv
+ try:
+ max_size = 0
+ max_dpi = PDF_RENDER_DPI_DEF
+- for line in proc.stdout:
++ for line in iter(proc.stdout.readline, b''):
+ match = self._fill_image_regex.match(line)
+ if not match:
+ continue
diff --git a/graphics/py-mcomix/patches/patch-mcomix_archive_rar_external.py b/graphics/py-mcomix/patches/patch-mcomix_archive_rar_external.py
new file mode 100644
index 00000000000..71d0985bcbe
--- /dev/null
+++ b/graphics/py-mcomix/patches/patch-mcomix_archive_rar_external.py
@@ -0,0 +1,17 @@
+$NetBSD: patch-mcomix_archive_rar_external.py,v 1.1 2016/12/03 04:08:53 nonaka Exp $
+
+fix read subprocess stdout line by line.
+
+See http://stackoverflow.com/questions/2715847/python-read-streaming-input-from-subprocess-communicate/17698359#17698359
+
+--- mcomix/archive/rar_external.py.orig 2016-02-12 18:52:12.000000000 +0000
++++ mcomix/archive/rar_external.py 2016-12-03 03:47:38.157303416 +0000
+@@ -100,7 +100,7 @@ class RarArchive(archive_base.ExternalEx
+ self._path = None
+ proc = process.popen(self._get_list_arguments(), stderr=process.STDOUT)
+ try:
+- for line in proc.stdout:
++ for line in iter(proc.stdout.readline, b''):
+ filename = self._parse_list_output_line(line.rstrip(os.linesep))
+ if filename is not None:
+ yield self._unicode_filename(filename)
diff --git a/graphics/py-mcomix/patches/patch-mcomix_archive_sevenzip_external.py b/graphics/py-mcomix/patches/patch-mcomix_archive_sevenzip_external.py
new file mode 100644
index 00000000000..c7d835a2ee1
--- /dev/null
+++ b/graphics/py-mcomix/patches/patch-mcomix_archive_sevenzip_external.py
@@ -0,0 +1,26 @@
+$NetBSD: patch-mcomix_archive_sevenzip_external.py,v 1.1 2016/12/03 04:08:53 nonaka Exp $
+
+fix read subprocess stdout line by line.
+
+See http://stackoverflow.com/questions/2715847/python-read-streaming-input-from-subprocess-communicate/17698359#17698359
+
+--- mcomix/archive/sevenzip_external.py.orig 2016-02-12 18:52:12.000000000 +0000
++++ mcomix/archive/sevenzip_external.py 2016-12-03 03:47:59.108184817 +0000
+@@ -112,7 +112,7 @@ class SevenZipArchive(archive_base.Exter
+ self._path = None
+ proc = process.popen(self._get_list_arguments(), stderr=process.STDOUT)
+ try:
+- for line in proc.stdout:
++ for line in iter(proc.stdout.readline, b''):
+ filename = self._parse_list_output_line(line.rstrip(os.linesep))
+ if filename is not None:
+ yield self._unicode_filename(filename)
+@@ -231,7 +231,7 @@ class TarArchive(SevenZipArchive):
+ self._path = 'archive.tar'
+ proc = process.popen(self._get_list_arguments(), stderr=process.STDOUT)
+ try:
+- for line in proc.stdout:
++ for line in iter(proc.stdout.readline, b''):
+ self._parse_list_output_line(line.rstrip(os.linesep))
+ finally:
+ proc.stdout.close()