From de3ecd03870fc7cf00ab315d628b29a86f74fe11 Mon Sep 17 00:00:00 2001 From: sthen Date: Sat, 3 Sep 2022 14:00:45 +0000 Subject: [PATCH] update to calibre-5.44.0, last version before it switched to py-qt6 --- textproc/calibre/Makefile | 5 ++- textproc/calibre/distinfo | 4 +- .../patches/patch-src_calibre_constants_py | 2 +- .../patches/patch-src_calibre_gui2_update_py | 39 +++---------------- textproc/calibre/pkg/PLIST | 4 ++ 5 files changed, 16 insertions(+), 38 deletions(-) diff --git a/textproc/calibre/Makefile b/textproc/calibre/Makefile index 135c4ebe7ce..4fe8f93a816 100644 --- a/textproc/calibre/Makefile +++ b/textproc/calibre/Makefile @@ -1,6 +1,6 @@ COMMENT = ebook management application -V = 5.43.0 +V = 5.44.0 DISTNAME = calibre-$V CATEGORIES = textproc @@ -15,7 +15,8 @@ WANTLIB += GL Qt5Core Qt5DBus Qt5Gui Qt5Widgets crypto fontconfig WANTLIB += freetype glib-2.0 gthread-2.0 hunspell-1.7 hyphen icudata WANTLIB += icui18n icuio icuuc intl m podofo stemmer z -MASTER_SITES = https://github.com/kovidgoyal/calibre/releases/download/v${V}/ +MASTER_SITES = https://download.calibre-ebook.com/$V/ +PORTROACH = site:https://github.com/kovidgoyal/calibre/archive/ EXTRACT_SUFX = .tar.xz MODULES = lang/python \ diff --git a/textproc/calibre/distinfo b/textproc/calibre/distinfo index 9576f77a968..d737ab5d197 100644 --- a/textproc/calibre/distinfo +++ b/textproc/calibre/distinfo @@ -1,2 +1,2 @@ -SHA256 (calibre-5.43.0.tar.xz) = g0v65Swm+Sk8AMtNT1EmDe/hmO8HZhkZQBbFH4ffEuA= -SIZE (calibre-5.43.0.tar.xz) = 38641220 +SHA256 (calibre-5.44.0.tar.xz) = b/qj6v02okNV5ZV/D4ONttttNFbPoXy00Tn9lOuviOw= +SIZE (calibre-5.44.0.tar.xz) = 41015696 diff --git a/textproc/calibre/patches/patch-src_calibre_constants_py b/textproc/calibre/patches/patch-src_calibre_constants_py index e2d268afa16..e9d8c7878ba 100644 --- a/textproc/calibre/patches/patch-src_calibre_constants_py +++ b/textproc/calibre/patches/patch-src_calibre_constants_py @@ -16,7 +16,7 @@ Index: src/calibre/constants.py ishaiku = 'haiku1' in _plat islinux = not(iswindows or ismacos or isbsd or ishaiku) isfrozen = hasattr(sys, 'frozen') -@@ -256,7 +257,7 @@ class ExtensionsImporter: +@@ -260,7 +261,7 @@ class ExtensionsImporter: extra = ('winutil', 'wpd', 'winfonts', 'winsapi') elif ismacos: extra = ('usbobserver', 'cocoa', 'libusb', 'libmtp') diff --git a/textproc/calibre/patches/patch-src_calibre_gui2_update_py b/textproc/calibre/patches/patch-src_calibre_gui2_update_py index bc8e567d5a2..fb97c1daa53 100644 --- a/textproc/calibre/patches/patch-src_calibre_gui2_update_py +++ b/textproc/calibre/patches/patch-src_calibre_gui2_update_py @@ -3,40 +3,13 @@ Index: src/calibre/gui2/update.py --- src/calibre/gui2/update.py.orig +++ src/calibre/gui2/update.py -@@ -32,35 +32,7 @@ def get_download_url(): +@@ -32,6 +32,9 @@ def get_download_url(): def get_newest_version(): -- try: -- icon_theme_name = json.loads(I('icon-theme.json', data=True))['name'] -- except Exception: -- icon_theme_name = '' -- headers={ -- 'CALIBRE-VERSION':__version__, -- 'CALIBRE-OS': ('win' if iswindows else 'osx' if ismacos else 'oth'), -- 'CALIBRE-INSTALL-UUID': prefs['installation_uuid'], -- 'CALIBRE-ICON-THEME': icon_theme_name, -- } -- try: -- version = get_https_resource_securely(URL, headers=headers) -- except ssl.SSLError as err: -- if getattr(err, 'reason', None) != 'CERTIFICATE_VERIFY_FAILED': -- raise -- # certificate verification failed, since the version check contains no -- # critical information, ignore and proceed -- # We have to do this as if the calibre CA certificate ever -- # needs to be revoked, then we won't be able to do version checks -- version = get_https_resource_securely(URL, headers=headers, cacerts=None) -- try: -- version = version.decode('utf-8').strip() -- except UnicodeDecodeError: -- version = '' -- ans = NO_CALIBRE_UPDATE -- m = re.match(r'(\d+)\.(\d+).(\d+)$', version) -- if m is not None: -- ans = tuple(map(int, (m.group(1), m.group(2), m.group(3)))) -- return ans + return NO_CALIBRE_UPDATE - - - class Signal(QObject): ++ ++def DISABLED_get_newest_version(): + try: + icon_theme_name = json.loads(I('icon-theme.json', data=True))['name'] + except Exception: diff --git a/textproc/calibre/pkg/PLIST b/textproc/calibre/pkg/PLIST index d36a84dfb30..9f95a402c13 100644 --- a/textproc/calibre/pkg/PLIST +++ b/textproc/calibre/pkg/PLIST @@ -3843,6 +3843,7 @@ share/calibre/recipes/business_insider.png share/calibre/recipes/business_insider.recipe share/calibre/recipes/business_standard.png share/calibre/recipes/business_standard.recipe +share/calibre/recipes/business_standard_print_edition.recipe share/calibre/recipes/business_today.recipe share/calibre/recipes/businessworldin.png share/calibre/recipes/businessworldin.recipe @@ -5171,6 +5172,7 @@ share/calibre/recipes/nationalreviewonline.recipe share/calibre/recipes/nature.recipe share/calibre/recipes/nauka_w_polsce.png share/calibre/recipes/nauka_w_polsce.recipe +share/calibre/recipes/nautilus.recipe share/calibre/recipes/navalny.png share/calibre/recipes/navalny.recipe share/calibre/recipes/navy_times.recipe @@ -5524,6 +5526,7 @@ share/calibre/recipes/rbc_ru.recipe share/calibre/recipes/rds.png share/calibre/recipes/rds.recipe share/calibre/recipes/readers_digest.recipe +share/calibre/recipes/readersdigest_thehealthy.recipe share/calibre/recipes/readitlater.png share/calibre/recipes/readitlater.recipe share/calibre/recipes/real_clear.recipe @@ -5871,6 +5874,7 @@ share/calibre/recipes/theecocolapse.png share/calibre/recipes/theecocolapse.recipe share/calibre/recipes/theeconomictimes_india.png share/calibre/recipes/theeconomictimes_india.recipe +share/calibre/recipes/theeconomictimes_india_print_edition.recipe share/calibre/recipes/theluminouslandscape.png share/calibre/recipes/theluminouslandscape.recipe share/calibre/recipes/themarketticker.png