svn commit: r508849 - head/textproc/py-ocrmypdf
Kai Knoblich
kai at FreeBSD.org
Tue Aug 13 19:32:17 UTC 2019
Author: kai
Date: Tue Aug 13 19:32:16 2019
New Revision: 508849
URL: https://svnweb.freebsd.org/changeset/ports/508849
Log:
textproc/py-ocrmypdf: Update to 9.0.1
* Make the dependency for graphics/pngquant optional as pngquant is not
strictly required but should be provided where possible.
* Set the new option as non-default for a while because there's a bug that
leads to incorrect inverted PNG images in conjunction with pngquant.
* Install shell auto-completions to improve user experience.
* Remove the "slow" tests from the "do-test" target. There's very little
point to run those at downstream.
Changelog since 8.3.2:
https://github.com/jbarlow83/OCRmyPDF/blob/v9.0.1/docs/release_notes.rst
Modified:
head/textproc/py-ocrmypdf/Makefile
head/textproc/py-ocrmypdf/distinfo
Modified: head/textproc/py-ocrmypdf/Makefile
==============================================================================
--- head/textproc/py-ocrmypdf/Makefile Tue Aug 13 19:24:32 2019 (r508848)
+++ head/textproc/py-ocrmypdf/Makefile Tue Aug 13 19:32:16 2019 (r508849)
@@ -1,7 +1,7 @@
# $FreeBSD$
PORTNAME= ocrmypdf
-DISTVERSION= 8.3.2
+DISTVERSION= 9.0.1
CATEGORIES= textproc python
MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@@ -20,12 +20,11 @@ LIB_DEPENDS= liblept.so:graphics/leptonica
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}cffi>=1.9.1:devel/py-cffi@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}img2pdf>=0.3.0,<0.4:graphics/py-img2pdf@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pillow>=4.0.0:graphics/py-pillow@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}tqdm>=4:misc/py-tqdm@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}reportlab>=3.3.0:print/py-reportlab@${PY_FLAVOR} \
- ${PYTHON_PKGNAMEPREFIX}ruffus>=2.7.0:science/py-ruffus@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}chardet>=3.0.4,<4:textproc/py-chardet@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pdfminer.six>=20181108:textproc/py-pdfminer.six@${PY_FLAVOR} \
- ${PYTHON_PKGNAMEPREFIX}pikepdf>=1.5.0,<2:textproc/py-pikepdf@${PY_FLAVOR} \
- pngquant:graphics/pngquant \
+ ${PYTHON_PKGNAMEPREFIX}pikepdf>=1.6.0,<2:textproc/py-pikepdf@${PY_FLAVOR} \
tesseract:graphics/tesseract
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>=4.4.1,<5:devel/py-pytest@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pytest-helpers-namespace>=2019.1.8:devel/py-pytest-helpers-namespace@${PY_FLAVOR} \
@@ -56,6 +55,14 @@ USE_LOCALE= en_US.UTF-8
NO_ARCH= yes
+PLIST_FILES= etc/bash_completion.d/ocrmypdf.bash share/fish/vendor_completions.d/ocrmypdf.fish
+
+OPTIONS_DEFINE= PNGQUANT
+
+PNGQUANT_DESC= Optimizes the encoding of PNG-style images in PDFs
+
+PNGQUANT_RUN_DEPENDS= pngquant:graphics/pngquant
+
# This workaround copes with the files that are generated in the CFFI
# out-of-line ABI mode (through devel/py-cffi). Those files are installed but
# aren't recorded to .PLIST.pymodtmp by Python's distutils.
@@ -67,12 +74,16 @@ post-install:
${ECHO_CMD} "${PYTHONPREFIX_SITELIBDIR}/ocrmypdf/lib/__pycache__/_leptonica.cpython-${PYTHON_SUFFIX}.pyc" >> ${_PYTHONPKGLIST}
${ECHO_CMD} "${PYTHONPREFIX_SITELIBDIR}/ocrmypdf/lib/_leptonica.py" >> ${_PYTHONPKGLIST}
-# Some unittests use a custom marker (= "slow") which is also used here, so
-# that the overall test doesn't finish with a warning.
+ # Install shell completion files
+ @${MKDIR} ${STAGEDIR}${PREFIX}/etc/bash_completion.d ${STAGEDIR}${PREFIX}/share/fish/vendor_completions.d/
+ ${INSTALL_DATA} ${WRKSRC}/misc/completion/ocrmypdf.bash ${STAGEDIR}${PREFIX}/etc/bash_completion.d/
+ ${INSTALL_DATA} ${WRKSRC}/misc/completion/ocrmypdf.fish ${STAGEDIR}${PREFIX}/share/fish/vendor_completions.d/
+
+# Note: The test "test_mono_not_inverted" will fail if graphics/pngquant is installed.
+# See also: https://github.com/jbarlow83/OCRmyPDF/issues/417
do-test:
@cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} -m pytest -rs -v \
- -n ${MAKE_JOBS_NUMBER} -o 'markers=slow' -o 'addopts="--runslow"' -k ' \
- not test_dev_null and \
- not test_mono_not_inverted'
+ -n ${MAKE_JOBS_NUMBER} -k ' \
+ not test_dev_null'
.include <bsd.port.mk>
Modified: head/textproc/py-ocrmypdf/distinfo
==============================================================================
--- head/textproc/py-ocrmypdf/distinfo Tue Aug 13 19:24:32 2019 (r508848)
+++ head/textproc/py-ocrmypdf/distinfo Tue Aug 13 19:32:16 2019 (r508849)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1563310405
-SHA256 (ocrmypdf-8.3.2.tar.gz) = 926a856981ca49c332253804eb566ccdf5a4ec9d6c0a94c4316fcb7ad0b9178e
-SIZE (ocrmypdf-8.3.2.tar.gz) = 7560565
+TIMESTAMP = 1565588086
+SHA256 (ocrmypdf-9.0.1.tar.gz) = 1c125eb5b078658777a824d6831e483ce95f51287f18926c03d58f00df8c2610
+SIZE (ocrmypdf-9.0.1.tar.gz) = 7653261
More information about the svn-ports-head
mailing list