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)
This commit is contained in:
parent
b09861b3bd
commit
41311bb7ce
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/branches/2020Q2/; revision=539406
@ -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)
|
||||
|
||||
|
@ -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
|
||||
|
14
textproc/py-pdfminer.six/files/patch-tools_dumppdf.py
Normal file
14
textproc/py-pdfminer.six/files/patch-tools_dumppdf.py
Normal file
@ -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
|
14
textproc/py-pdfminer.six/files/patch-tools_pdf2txt.py
Normal file
14
textproc/py-pdfminer.six/files/patch-tools_pdf2txt.py
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user