aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Knoblich <kai@FreeBSD.org>2020-06-17 08:40:45 +0000
committerKai Knoblich <kai@FreeBSD.org>2020-06-17 08:40:45 +0000
commit41311bb7cea2bb45e696d85372e4ddfd94e8382f (patch)
treee9cdeec20857cc0dc7e59742f701eed0b7e3dbc5
parentb09861b3bdc2cdc4591f00f5373bbc18022f84a9 (diff)
downloadports-41311bb7cea2bb45e696d85372e4ddfd94e8382f.tar.gz
ports-41311bb7cea2bb45e696d85372e4ddfd94e8382f.zip
MFH: r538664
textproc/py-pdfminer.six: Update to 20191110 * Use this release for a while as it's the last one that supports Python 2.7 which is still needed by textproc/scancode-toolkit. * Backport two patches to fix the runtime of CLI scripts. * Remove "dos2unix" and "shebangfix" macros as they're no longer required. Changelog since 20181108: https://github.com/pdfminer/pdfminer.six/blob/20191110/CHANGELOG.md Approved by: ports-secteam (joneum)
Notes
Notes: svn path=/branches/2020Q2/; revision=539406
-rw-r--r--textproc/py-pdfminer.six/Makefile9
-rw-r--r--textproc/py-pdfminer.six/distinfo6
-rw-r--r--textproc/py-pdfminer.six/files/patch-tools_dumppdf.py14
-rw-r--r--textproc/py-pdfminer.six/files/patch-tools_pdf2txt.py14
4 files changed, 33 insertions, 10 deletions
diff --git a/textproc/py-pdfminer.six/Makefile b/textproc/py-pdfminer.six/Makefile
index 73d5c36be9d8..ce366ce0b2b3 100644
--- a/textproc/py-pdfminer.six/Makefile
+++ b/textproc/py-pdfminer.six/Makefile
@@ -1,7 +1,7 @@
# $FreeBSD$
PORTNAME= pdfminer.six
-PORTVERSION= 20181108
+PORTVERSION= 20191110
CATEGORIES= textproc python
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@@ -16,13 +16,11 @@ RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}six>=0:devel/py-six@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pycryptodome>=0:security/py-pycryptodome@${PY_FLAVOR}
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}nose>=0:devel/py-nose@${PY_FLAVOR}
-USES= python shebangfix dos2unix
+USES= python
USE_GITHUB= yes
GH_ACCOUNT= pdfminer
USE_PYTHON= distutils concurrent autoplist
-SHEBANG_FILES= tools/dumppdf.py tools/pdf2txt.py tools/latin2ascii.py
-
CONFLICTS_INSTALL= py??-pdfminer-* py??-pdfminer3k-*
NO_ARCH= yes
@@ -32,9 +30,6 @@ NO_ARCH= yes
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}chardet>=0:textproc/py-chardet@${PY_FLAVOR}
.endif
-# Following tests always fail:
-# - test_tools_dumppdf.TestDumpPDF.test_2
-# - test_tools_pdf2txt.TestDumpPDF.test_{1,2,4,5,8}
do-test:
@(cd ${WRKSRC} && ${PYTHON_CMD} -m nose -v --nologcapture)
diff --git a/textproc/py-pdfminer.six/distinfo b/textproc/py-pdfminer.six/distinfo
index af19fa8eebe4..f6fa6ae9efaa 100644
--- a/textproc/py-pdfminer.six/distinfo
+++ b/textproc/py-pdfminer.six/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1558443307
-SHA256 (pdfminer-pdfminer.six-20181108_GH0.tar.gz) = 99b2bf8e2154e617c88bba7ea4f3fd02fb7d5b7be6b441a9001ca29d54d255f4
-SIZE (pdfminer-pdfminer.six-20181108_GH0.tar.gz) = 10420358
+TIMESTAMP = 1591951205
+SHA256 (pdfminer-pdfminer.six-20191110_GH0.tar.gz) = 323b7bc6b9ca544fbf6dbc287b52c6cf21fcb1bdcb33faa0a85658e00de8b1a8
+SIZE (pdfminer-pdfminer.six-20191110_GH0.tar.gz) = 10045330
diff --git a/textproc/py-pdfminer.six/files/patch-tools_dumppdf.py b/textproc/py-pdfminer.six/files/patch-tools_dumppdf.py
new file mode 100644
index 000000000000..be2418db37c8
--- /dev/null
+++ b/textproc/py-pdfminer.six/files/patch-tools_dumppdf.py
@@ -0,0 +1,14 @@
+Fix CLI usability, see also https://github.com/pdfminer/pdfminer.six/issues/405
+
+Obtained from:
+
+https://github.com/pdfminer/pdfminer.six/pull/421/commits/0c2f44b6de064d9a3cea99bde5b8e9c6a525a69c
+
+--- tools/dumppdf.py.orig 2020-06-12 21:01:43 UTC
++++ tools/dumppdf.py
+@@ -1,3 +1,5 @@
++#!/usr/bin/env python
++
+ """Extract pdf structure in XML format"""
+ import logging
+ import os.path
diff --git a/textproc/py-pdfminer.six/files/patch-tools_pdf2txt.py b/textproc/py-pdfminer.six/files/patch-tools_pdf2txt.py
new file mode 100644
index 000000000000..30a5d41432ea
--- /dev/null
+++ b/textproc/py-pdfminer.six/files/patch-tools_pdf2txt.py
@@ -0,0 +1,14 @@
+Fix CLI usability, see also https://github.com/pdfminer/pdfminer.six/issues/405
+
+Obtained from:
+
+https://github.com/pdfminer/pdfminer.six/pull/421/commits/0c2f44b6de064d9a3cea99bde5b8e9c6a525a69c
+
+--- tools/pdf2txt.py.orig 2019-11-10 11:59:55 UTC
++++ tools/pdf2txt.py
+@@ -1,3 +1,5 @@
++#!/usr/bin/env python
++
+ """A command line tool for extracting text and images from PDF and output it to plain text, html, xml or tags."""
+ import argparse
+ import logging