From 7823880829c0eb6848613dd98e155e65f9e45956 Mon Sep 17 00:00:00 2001 From: Dima Panov Date: Fri, 20 Jan 2023 20:58:42 +0300 Subject: [PATCH] deskutils/calibre: move from dead textproc/cchardet to textproc/py-charset-normalizer --- deskutils/calibre/Makefile | 4 ++-- .../calibre/files/patch-src_calibre_ebooks_chardet.py | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 deskutils/calibre/files/patch-src_calibre_ebooks_chardet.py diff --git a/deskutils/calibre/Makefile b/deskutils/calibre/Makefile index cdcfb1a..a0debb8 100644 --- a/deskutils/calibre/Makefile +++ b/deskutils/calibre/Makefile @@ -49,7 +49,7 @@ RUN_DEPENDS= xdg-open:devel/xdg-utils \ ${PYTHON_PKGNAMEPREFIX}msgpack>=0.3:devel/py-msgpack@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}regex>=0:textproc/py-regex@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}markdown>=0:textproc/py-markdown@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}cchardet>=0:textproc/py-cchardet@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}charset-normalizer>=0:textproc/py-charset-normalizer@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}html5-parser>=0.4.3:www/py-html5-parser@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}feedparser>=6.0.8:textproc/py-feedparser@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}jeepney>=0.6:devel/py-jeepney@${PY_FLAVOR} \ @@ -59,7 +59,7 @@ RUN_DEPENDS= xdg-open:devel/xdg-utils \ ${PYTHON_PKGNAMEPREFIX}pycryptodome>0:security/py-pycryptodome@${PY_FLAVOR} USES= desktop-file-utils gettext-runtime gl gnome localbase:ldflags \ - pkgconfig pyqt:6 python:3.8-3.10 qt:6 shared-mime-info shebangfix \ + pkgconfig pyqt:6 python:3.8-3.11 qt:6 shared-mime-info shebangfix \ ssl tar:xz xorg USE_RC_SUBR= calibre SUB_LIST+= PYTHON_VERSION=${PYTHON_VERSION} diff --git a/deskutils/calibre/files/patch-src_calibre_ebooks_chardet.py b/deskutils/calibre/files/patch-src_calibre_ebooks_chardet.py new file mode 100644 index 0000000..d71ea85 --- /dev/null +++ b/deskutils/calibre/files/patch-src_calibre_ebooks_chardet.py @@ -0,0 +1,11 @@ +--- src/calibre/ebooks/chardet.py.orig 2023-01-17 15:04:24 UTC ++++ src/calibre/ebooks/chardet.py +@@ -109,7 +109,7 @@ def detect(bytestring): + from calibre_extensions.uchardet import detect as implementation + except ImportError: + # People running from source without updated binaries +- from cchardet import detect as cdi ++ from charset_normalizer import detect as cdi + + def implementation(x): + return cdi(x).get('encoding') or '' -- 2.39.1