Changeset View
Standalone View
head/textproc/py-ocrmypdf/Makefile
Property | Old Value | New Value |
---|---|---|
svn:eol-style | null | native \ No newline at end of property |
svn:keywords | null | FreeBSD=%H \ No newline at end of property |
svn:mime-type | null | text/plain \ No newline at end of property |
# $FreeBSD$ | |||||
PORTNAME= ocrmypdf | |||||
DISTVERSION= 8.3.1 | |||||
CATEGORIES= textproc python | |||||
MASTER_SITES= CHEESESHOP | |||||
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} | |||||
MAINTAINER= kai@FreeBSD.org | |||||
COMMENT= Adds an OCR test layer to scanned PDF files | |||||
LICENSE= GPLv3+ | |||||
LICENSE_FILE= ${WRKSRC}/LICENSE | |||||
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}cffi>=1.9.1:devel/py-cffi@${PY_FLAVOR} \ | |||||
${PYTHON_PKGNAMEPREFIX}pytest-runner>=0:devel/py-pytest-runner@${PY_FLAVOR} \ | |||||
${PYTHON_PKGNAMEPREFIX}setuptools_scm>=0:devel/py-setuptools_scm@${PY_FLAVOR} \ | |||||
${PYTHON_PKGNAMEPREFIX}setuptools_scm_git_archive>=0:devel/py-setuptools_scm_git_archive@${PY_FLAVOR} | |||||
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}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.3.0,<2:textproc/py-pikepdf@${PY_FLAVOR} \ | |||||
pngquant:graphics/pngquant \ | |||||
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} \ | |||||
${PYTHON_PKGNAMEPREFIX}pytest-xdist>=1.28.0:devel/py-pytest-xdist@${PY_FLAVOR} \ | |||||
${PYTHON_PKGNAMEPREFIX}pytest-cov>=2.6.1:devel/py-pytest-cov@${PY_FLAVOR} \ | |||||
${PYTHON_PKGNAMEPREFIX}pdf2>=1.26.0:print/py-pdf2@${PY_FLAVOR} \ | |||||
${PYTHON_PKGNAMEPREFIX}python-xmp-toolkit>=0:textproc/py-python-xmp-toolkit@${PY_FLAVOR} | |||||
USES= ghostscript:run python:3.6+ shebangfix | |||||
USE_PYTHON= autoplist concurrent distutils | |||||
sunpoet: There's no need to add "concurrent" since this port supports python 3 only. | |||||
kaiAuthorUnsubmitted Done Inline ActionsOk, that's right. I automatically added "concurrent" as the port installs a script to ${PREFIX}/bin to prevent conflicts when one uses py36 and py37 in its environment. But the actual state of the Ports tree that has Python 2.7 and Python 3.6 as default versions the "concurrent" keyword seems superfluous. I'll remove it then with the next update of textproc/py-ocrmypdf to avoid bumping the port. kai: Ok, that's right. I automatically added "concurrent" as the port installs a script to… | |||||
SHEBANG_FILES= src/ocrmypdf/__main__.py \ | |||||
src/ocrmypdf/hocrtransform.py \ | |||||
src/ocrmypdf/leptonica.py \ | |||||
src/ocrmypdf/pdfinfo/__init__.py \ | |||||
tests/spoof/gs_feature_elision.py \ | |||||
tests/spoof/gs_pdfa_failure.py \ | |||||
tests/spoof/tesseract_badutf8.py \ | |||||
tests/spoof/tesseract_big_image_error.py \ | |||||
tests/spoof/tesseract_cache.py \ | |||||
tests/spoof/tesseract_noop.py \ | |||||
tests/spoof/unpaper_oldversion.py \ | |||||
tests/spoof/gs_render_failure.py \ | |||||
tests/spoof/gs_raster_failure.py \ | |||||
tests/spoof/tesseract_crash.py | |||||
MAKE_ENV= LC_ALL=en_US.UTF-8 | |||||
sunpoetUnsubmitted Not Done Inline ActionsTry USE_LOCALE=en_US.UTF-8 sunpoet: Try USE_LOCALE=en_US.UTF-8 | |||||
kaiAuthorUnsubmitted Done Inline ActionsPerfect, thank you for this hint! That also reduce the hardcoding of the locale further down in the do-test target. It's changed in rP506655. kai: Perfect, thank you for this hint! That also reduce the hardcoding of the locale further down in… | |||||
NO_ARCH= yes | |||||
# 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. | |||||
# | |||||
# See here for a related issue from another port (audio/py-sounddevice): | |||||
# https://github.com/spatialaudio/python-sounddevice/issues/116 | |||||
post-stage: | |||||
matUnsubmitted Done Inline Actionspost-stage runs very late in the install process. It should only be used if post-install is ran too early. Are you sure you need post-stage here ? mat: post-stage runs very late in the install process. It should only be used if post-install is… | |||||
kaiAuthorUnsubmitted Done Inline ActionsThank you for your suggestion and pointing that out! It works indeed fine with post-install and it's fixed in rP506483. kai: Thank you for your suggestion and pointing that out! It works indeed fine with post-install and… | |||||
${ECHO} "${PYTHONPREFIX_SITELIBDIR}/ocrmypdf/lib/__pycache__/_leptonica.cpython-${PYTHON_SUFFIX}.opt-1.pyc" >> ${_PYTHONPKGLIST} | |||||
${ECHO} "${PYTHONPREFIX_SITELIBDIR}/ocrmypdf/lib/__pycache__/_leptonica.cpython-${PYTHON_SUFFIX}.pyc" >> ${_PYTHONPKGLIST} | |||||
${ECHO} "${PYTHONPREFIX_SITELIBDIR}/ocrmypdf/lib/_leptonica.py" >> ${_PYTHONPKGLIST} | |||||
sunpoetUnsubmitted Not Done Inline ActionsUse ECHO_CMD instead of ECHO. from Mk/bsd.commands.mk: # ECHO is defined in /usr/share/mk/sys.mk, which can either be "echo", # or "true" if the make flag -s is given. Use ECHO_CMD where you mean # the echo command. sunpoet: Use ECHO_CMD instead of ECHO.
from Mk/bsd.commands.mk:
```
# ECHO is defined in… | |||||
kaiAuthorUnsubmitted Done Inline ActionsThanks for that hint, too! It's fixed in rP506655. kai: Thanks for that hint, too! It's fixed in rP506655. | |||||
# Some unittests use a custom marker (= "slow") which is also used here, so | |||||
# that the overall test doesn't finish with a warning. | |||||
do-test: | |||||
@cd ${WRKSRC} && ${SETENV} LC_ALL=en_US.UTF-8 ${PYTHON_CMD} -m pytest -rs -v \ | |||||
sunpoetUnsubmitted Done Inline ActionsReplace LC_ALL=en_US.UTF-8 with MAKE_ENV. sunpoet: Replace LC_ALL=en_US.UTF-8 with MAKE_ENV. | |||||
-n ${MAKE_JOBS_NUMBER} -o 'markers=slow' -o 'addopts="--runslow"' -k ' \ | |||||
not test_dev_null and \ | |||||
not test_mono_not_inverted' | |||||
.include <bsd.port.mk> |
There's no need to add "concurrent" since this port supports python 3 only.