diff options
| author | Ulrich Spörlein <uqs@FreeBSD.org> | 2026-10-18 19:24:06 +0000 |
|---|---|---|
| committer | Guido Falsi <madpilot@FreeBSD.org> | 2026-10-18 19:29:40 +0000 |
| commit | 807e152831c4f7ddeed954b4828e619029aca7d0 (patch) | |
| tree | 4b172293070965592203649a0abd9e88cebfe96c | |
| parent | 59672916ae9a611d124eb266b2feed998f0b5a2f (diff) | |
deskutils/calibre: Add missing dependencies2026Q4
Some runtime python dependencies are missing from the port, causing
plugin failures.
PR: 299452
MFH: 2026Q4
(cherry picked from commit af1be921a15f35afdde6eec7bb416f74295cd34f)
| -rw-r--r-- | deskutils/calibre/Makefile | 52 |
1 files changed, 51 insertions, 1 deletions
diff --git a/deskutils/calibre/Makefile b/deskutils/calibre/Makefile index b45efbaaeeae..3e5658e72393 100644 --- a/deskutils/calibre/Makefile +++ b/deskutils/calibre/Makefile @@ -1,6 +1,6 @@ PORTNAME= calibre PORTVERSION= 8.16.2 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= deskutils python MASTER_SITES= https://download.calibre-ebook.com/${PORTVERSION}/ DISTFILES= ${DISTNAME}${EXTRACT_SUFX} @@ -46,9 +46,12 @@ LIB_DEPENDS= libavcodec.so:multimedia/ffmpeg \ libxkbcommon.so:x11/libxkbcommon RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}apsw>=3.50.4.0:databases/py-apsw@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}beautifulsoup4>=4.12.2:www/py-beautifulsoup4@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}chardet>=5.2.0:textproc/py-chardet@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}css-parser>=1.0.10:www/py-css-parser@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}dnspython>=2.6.1:dns/py-dnspython@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}feedparser>=6.0.10:textproc/py-feedparser@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}fonttools>=4.42.1:print/py-fonttools@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}html2text>=2024.2.26:textproc/py-html2text@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}html5-parser>=0.4.12:www/py-html5-parser@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}jeepney>=0.8.0:devel/py-jeepney@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}lxml>=6.0.1:devel/py-lxml@${PY_FLAVOR} \ @@ -57,14 +60,22 @@ RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}apsw>=3.50.4.0:databases/py-apsw@${PY_FLAVO ${PYTHON_PKGNAMEPREFIX}msgpack>=1.0.7:devel/py-msgpack@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}netifaces>=0.11.0:net/py-netifaces@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pillow>=10.3.0:graphics/py-pillow@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}psutil>=5.9.5:sysutils/py-psutil@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}py7zr>=0.20.6:archivers/py-py7zr@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pycryptodome>=3.19.1:security/py-pycryptodome@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}python-dateutil>=2.8.2:devel/py-python-dateutil@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pyzstd>=0.15.9:archivers/py-pyzstd@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}regex>=2023.8.8:textproc/py-regex@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}tzdata>=2023.3:devel/py-tzdata@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}tzlocal>=5.0.1:devel/py-tzlocal@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}xxhash>=3.3.0:devel/py-xxhash@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}zeroconf>0.115.0:net/py-zeroconf@${PY_FLAVOR} \ liberation-fonts-ttf>=2.1.3:x11-fonts/liberation-fonts-ttf \ MathJax3>0:www/mathjax3 \ + cwebp:graphics/webp \ + jpegtran:graphics/jpeg-turbo \ + optipng:graphics/optipng \ pdftohtml:graphics/poppler-utils \ xdg-open:devel/xdg-utils @@ -146,6 +157,45 @@ do-install: @${RMDIR} ${STAGEDIR}${PREFIX}/share/desktop-directories @${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/calibre/calibre/plugins/* +# calibre-debug --test-build has no way to deselect individual tests, so the +# tests covering functionality this port intentionally does not ship are +# renamed out of the way in pre-test. Each entry here is a feature the port +# cannot currently support: +# +# 7z needs py7zr>=1.0.0 for the extractall(factory=...) API, +# archivers/py-py7zr is still at 0.22.0 +# piper the bundled piper TTS extension is not built +# plugins imports calibre_extensions.piper, so it fails for the same reason +# pychm no port for pychm +# pykakasi no port for pykakasi +# qt calls JxrDecApp, a bundled JPEG-XR tool that is not built +# sqlite databases/py-sqlite3 lacks enable_load_extension() +# unrar no port for unrardll +# +TEST_IGNORE?= 7z piper plugins pychm pykakasi qt sqlite unrar + +_TEST_BUILD_PY= ${STAGEDIR}${PREFIX}/lib/calibre/calibre/test_build.py + +pre-test: + @${REINPLACE_CMD} -E -e 's,^ def (test_(${TEST_IGNORE:ts|}))\(self\):, def _skipped_\1(self):,' \ + ${_TEST_BUILD_PY} +.for _t in ${TEST_IGNORE} + @${GREP} -q "^ def _skipped_test_${_t}(self):" ${_TEST_BUILD_PY} || \ + (${ECHO_MSG} "=> TEST_IGNORE: no test_${_t} in test_build.py, drop it from TEST_IGNORE"; ${FALSE}) +.endfor + +do-test: + @(cd ${WRKDIR}; ${SETENV} \ + CALIBRE_CONFIG_DIRECTORY=${WRKDIR}/calibre-config \ + CALIBRE_EXECUTABLES_PATH=${STAGEDIR}${PREFIX}/bin \ + CALIBRE_EXTENSIONS_PATH=${STAGEDIR}${PREFIX}/lib/calibre/calibre/plugins \ + CALIBRE_PYTHON_PATH=${STAGEDIR}${PREFIX}/lib/calibre \ + CALIBRE_RESOURCES_PATH=${STAGEDIR}${PREFIX}/share/calibre \ + ${STAGEDIR}${PREFIX}/bin/calibre-debug --test-build) + +post-test: + @${MV} ${_TEST_BUILD_PY}.bak ${_TEST_BUILD_PY} + update-recent-uas: patch @(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} \ ${PYSETUP} recent_uas) |
