commit:     e53231e73c25733d5a75cc7232dc36f51552704c
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 26 20:01:46 2025 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Wed Feb 26 20:06:39 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e53231e7

app-text/calibre: drop 5.44.0-r5

Over 2 years old, stuck on <py3.13, Qt5 and worst of all Qt5WebEngine,
everyone must have migrated away from it by now.

Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 app-text/calibre/Manifest                          |   2 -
 app-text/calibre/calibre-5.44.0-r5.ebuild          | 265 ---------------------
 ...Dont-add-resources-that-exist-outside-the.patch |  55 -----
 .../calibre/files/calibre-5.35.0-jxr-test.patch    |  24 --
 ...44.0-Fix-compatibility-with-zeroconf-0.73.patch |  26 --
 app-text/calibre/files/calibre-5.44.0-icu75.patch  |  28 ---
 .../files/calibre-5.44.0-xss-backport.patch        |  33 ---
 .../e9cc00560a28f56a303cca97630ab58e519dd9c8.patch |  35 ---
 8 files changed, 468 deletions(-)

diff --git a/app-text/calibre/Manifest b/app-text/calibre/Manifest
index 23656020c696..ea074651f4c8 100644
--- a/app-text/calibre/Manifest
+++ b/app-text/calibre/Manifest
@@ -1,5 +1,3 @@
-DIST calibre-5.44.0.tar.xz 41015696 BLAKE2B 
c7053e728da20fccfa981ed4f56e24a4d5b382b7687c92ecb039b078fd4828de0529380093e4ab33f77d78aa54a59758c1620cf8f918937a9a64f13decdf77ee
 SHA512 
3d79e76d820cd1a41605dfd4c1d992599a6e4a759e57a8383d42d86982177e4539313f59e647758ab1896ce5874cb2a93c7678bf962e332c44171651aabf0230
-DIST calibre-5.44.0.tar.xz.sig 566 BLAKE2B 
413b95855d79bdb5b17ca5d760f834006797b4d3e413604f27d351a3392e16d647e772dc063306bf973e1156c34f68cb38152a66164bca849ebed5484e7f6065
 SHA512 
59957bf35a73f218241bf76cc86994d5af87cea11d3b0800e83f157bf0b2cfcaf4b6c1314562e74a1141d0c167fdb1619cb9a90e93b67f55dd55ceed77045059
 DIST calibre-7.16.0.tar.xz 44833684 BLAKE2B 
2b609a0d014d43998f693a69c10f6d8b0165bf97f8c9d388cf4e1e398e7254b300d53b26e5ec24af651e03bb625bb088331dc77aa2ed6edea13de2beb0e75339
 SHA512 
5ea11badd972422299ce143e2aa33f58f7abcfd2837acba47d2a7aa6f0997a711245273205ed043c783e5e82bbaaf7cab44e5c03c00e274a03a4ba29be53a708
 DIST calibre-7.16.0.tar.xz.sig 566 BLAKE2B 
1d09e8dd49ad53c88632dc23573fa9cd5403d45a308598ac4ed7d4f2dd5a84cc3ae6812ac652ff4a98fc5d67589ad1584411f7746b6b98468bf03a35a0585de6
 SHA512 
91f3897d95d234a8d673006273974d32cb6c5aa4953d247700d6d89d511c9b1450dc8e222eabf5d1e4d82de206e425ee440defaff38d1ca83efdbf4bcada7c7c
 DIST calibre-7.17.0.tar.xz 45053400 BLAKE2B 
93149c4fab7a25e1239c4b8c72b766e5ffc71eb27d1206225bc8436f26d2c76f9323e0f0f63d8444291f02a5a7e94d4500715398a71df4ab2a5b16e325e7be73
 SHA512 
916337dc425916110528828bac0fbdc24db9496362c1e8dad67eafdfda42b90174fb6a4352400cd34af0f11268aabed82b166b3e4875f59e317359079e10bf3b

diff --git a/app-text/calibre/calibre-5.44.0-r5.ebuild 
b/app-text/calibre/calibre-5.44.0-r5.ebuild
deleted file mode 100644
index 45c3e9cebcf1..000000000000
--- a/app-text/calibre/calibre-5.44.0-r5.ebuild
+++ /dev/null
@@ -1,265 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{10..12} )
-PYTHON_REQ_USE="sqlite,ssl"
-
-inherit edo toolchain-funcs python-single-r1 qmake-utils verify-sig xdg
-
-DESCRIPTION="Ebook management application"
-HOMEPAGE="https://calibre-ebook.com/";
-SRC_URI="
-       https://download.calibre-ebook.com/${PV}/${P}.tar.xz
-       verify-sig? ( https://calibre-ebook.com/signatures/${P}.tar.xz.sig )
-"
-VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/kovidgoyal.gpg
-
-LICENSE="
-       GPL-3+
-       GPL-3
-       GPL-2+
-       GPL-2
-       GPL-1+
-       LGPL-3+
-       LGPL-2.1+
-       LGPL-2.1
-       BSD
-       MIT
-       Old-MIT
-       Apache-2.0
-       public-domain
-       || ( Artistic GPL-1+ )
-       CC-BY-3.0
-       OFL-1.1
-       PSF-2
-"
-SLOT="0"
-KEYWORDS="amd64"
-IUSE="ios speech +system-mathjax test +udisks unrar"
-
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="${PYTHON_REQUIRED_USE}"
-
-# Qt slotted dependencies are used because the libheadless.so plugin links to
-# QT_*_PRIVATE_ABI. It only uses core/gui/dbus.
-COMMON_DEPEND="${PYTHON_DEPS}
-       >=app-text/hunspell-1.7:=
-       >=app-text/podofo-0.9.6_pre20171027:=
-       <app-text/podofo-0.10:=
-       app-text/poppler[utils]
-       dev-libs/hyphen:=
-       >=dev-libs/icu-57.1:=
-       dev-libs/openssl:=
-       dev-libs/snowball-stemmer:=
-       $(python_gen_cond_dep '
-               >=dev-python/apsw-3.25.2_p1[${PYTHON_USEDEP}]
-               dev-python/beautifulsoup4[${PYTHON_USEDEP}]
-               dev-python/faust-cchardet[${PYTHON_USEDEP}]
-               >=dev-python/css-parser-1.0.4[${PYTHON_USEDEP}]
-               dev-python/dnspython[${PYTHON_USEDEP}]
-               >=dev-python/feedparser-5.2.1[${PYTHON_USEDEP}]
-               >=dev-python/html2text-2019.8.11[${PYTHON_USEDEP}]
-               >=dev-python/html5-parser-0.4.9[${PYTHON_USEDEP}]
-               dev-python/jeepney[${PYTHON_USEDEP}]
-               >=dev-python/lxml-3.8.0[${PYTHON_USEDEP}]
-               dev-python/lxml-html-clean[${PYTHON_USEDEP}]
-               >=dev-python/markdown-3.0.1[${PYTHON_USEDEP}]
-               >=dev-python/mechanize-0.3.5[${PYTHON_USEDEP}]
-               >=dev-python/msgpack-0.6.2[${PYTHON_USEDEP}]
-               >=dev-python/netifaces-0.10.5[${PYTHON_USEDEP}]
-               
>=dev-python/pillow-3.2.0[jpeg,truetype,webp,zlib,${PYTHON_USEDEP}]
-               >=dev-python/psutil-4.3.0[${PYTHON_USEDEP}]
-               >=dev-python/pychm-0.8.6[${PYTHON_USEDEP}]
-               >=dev-python/pygments-2.3.1[${PYTHON_USEDEP}]
-               >=dev-python/python-dateutil-2.5.3[${PYTHON_USEDEP}]
-               
>=dev-python/pyqt5-5.15.5_pre2107091435[gui,widgets,network,printsupport,svg,${PYTHON_USEDEP}]
-               
>=dev-python/pyqtwebengine-5.15.5_pre2108100905[${PYTHON_USEDEP}]
-               dev-python/regex[${PYTHON_USEDEP}]
-               dev-python/zeroconf[${PYTHON_USEDEP}]
-       ')
-       dev-qt/qtimageformats:5
-       dev-qt/qtcore:5=
-       dev-qt/qtdbus:5=
-       dev-qt/qtgui:5=[jpeg,png]
-       dev-qt/qtwidgets:5
-       dev-util/desktop-file-utils
-       dev-util/gtk-update-icon-cache
-       media-fonts/liberation-fonts
-       media-libs/fontconfig:=
-       >=media-libs/freetype-2:=
-       >=media-libs/libmtp-1.1.11:=
-       >=media-gfx/optipng-0.7.6
-       virtual/libusb:1=
-       x11-misc/shared-mime-info
-       >=x11-misc/xdg-utils-1.0.2-r2
-       ios? (
-               >=app-pda/usbmuxd-1.0.8
-               >=app-pda/libimobiledevice-1.2.0
-       )
-       speech? ( $(python_gen_cond_dep 
'app-accessibility/speech-dispatcher[python,${PYTHON_USEDEP}]') )
-       system-mathjax? ( >=dev-libs/mathjax-3:= )
-       udisks? ( virtual/libudev )
-       unrar? ( dev-python/unrardll )
-"
-RDEPEND="${COMMON_DEPEND}
-       udisks? ( sys-fs/udisks:2 )"
-DEPEND="${COMMON_DEPEND}
-       test? ( $(python_gen_cond_dep 
'>=dev-python/chardet-3.0.3[${PYTHON_USEDEP}]') )
-"
-BDEPEND="$(python_gen_cond_dep '
-               >=dev-python/pyqt-builder-1.10.3[${PYTHON_USEDEP}]
-               >=dev-python/sip-5[${PYTHON_USEDEP}]
-       ')
-       >=virtual/podofo-build-0.9.6_pre20171027
-       <virtual/podofo-build-0.10
-       virtual/pkgconfig
-       system-mathjax? ( dev-lang/rapydscript-ng )
-       verify-sig? ( sec-keys/openpgp-keys-kovidgoyal )
-"
-
-PATCHES=(
-       # Skip calling a binary (JxrDecApp) from libjxr which is used for tests
-       # We don't (yet?) package libjxr and it seems to be dead upstream
-       # (last commit in 2017)
-       "${FILESDIR}/${PN}-5.35.0-jxr-test.patch"
-
-       # fix compatibility with recent versions of zeroconf
-       "${FILESDIR}"/${PN}-5.44.0-Fix-compatibility-with-zeroconf-0.73.patch
-
-       # Security backport for CVE-2023-46303
-       
"${FILESDIR}"/0001-HTML-Input-Dont-add-resources-that-exist-outside-the.patch
-       # bug #936270
-       "${FILESDIR}"/${P}-icu75.patch
-       # backport test-only fix for lxml 5
-       "${FILESDIR}"/e9cc00560a28f56a303cca97630ab58e519dd9c8.patch
-       # Security backport for CVE-2024-7008
-       "${FILESDIR}"/${P}-xss-backport.patch
-)
-
-src_prepare() {
-       default
-
-       # Warning:
-       #
-       # While it might be rather tempting to add yet another sed here,
-       # please don't. There have been several bugs in Gentoo's packaging
-       # of calibre from seds-which-become-stale. Please consider
-       # creating a patch instead, but in any case, run the test suite
-       # and ensure it passes.
-       #
-       # If in doubt about a problem, checking Fedora's packaging is 
recommended.
-
-       # Disable unnecessary privilege dropping for bug #287067.
-       sed -e "s:if os.geteuid() == 0:if False and os.geteuid() == 0:" \
-               -i setup/install.py || die "sed failed to patch install.py"
-       sed -e "/^            os.chdir(os.path.join(src_dir, 'build'))$/a\
-\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\ self.check_call(['sed', \
-'-e', 's|^CFLAGS .*|\\\\\\\\0 ${CFLAGS}|', \
-'-e', 's|^CXXFLAGS .*|\\\\\\\\0 ${CXXFLAGS}|', \
-'-e', 's|^LFLAGS .*|\\\\\\\\0 ${LDFLAGS}|', \
-'-i', os.path.join(os.path.basename(src_dir), 'Makefile')])" \
-               -e "s|open(self.j(bdir, '.qmake.conf'), 
'wb').close()|open(self.j(bdir, '.qmake.conf'), 'wb').write(b'QMAKE_LFLAGS += 
${LDFLAGS}')|" \
-               -i setup/build.py || die "sed failed to patch build.py"
-
-       # This is only ever used at build time. It contains a small embedded 
copy
-       # of the rapydscript-ng compiler usable inside of qtwebengine, if you 
don't
-       # have rapydscript-ng (a nodejs package) itself installed. Its only 
purpose
-       # is to build some resources that come bundled in dist tarballs 
already...
-       # and which we may also need to regenerate e.g. to use system-mathjax.
-       #
-       # However, running qtwebengine violates the portage sandbox (among other
-       # things, it tries to create directories in /usr! amazing) so this is a
-       # wash anyway. The only real solution here is to package rapydscript-ng.
-       #
-       # We do not need it at build time, and *no one* needs it at install 
time.
-       # Delete the cruft.
-       rm -r resources/rapydscript/ || die
-}
-
-src_compile() {
-       # TODO: get qmake called by setup.py to respect CC and CXX too
-       tc-export CC CXX
-
-       # bug 821871
-       local MY_LIBDIR="${ESYSROOT}/usr/$(get_libdir)"
-       export FT_LIB_DIR="${MY_LIBDIR}" HUNSPELL_LIB_DIR="${MY_LIBDIR}" 
PODOFO_LIB_DIR="${MY_LIBDIR}"
-       export QMAKE="$(qt5_get_bindir)/qmake"
-
-       edo ${EPYTHON} setup.py build
-       edo ${EPYTHON} setup.py gui
-
-       # A few different resources are bundled in the distfile by default, 
because
-       # not all systems necessarily have them. We un-vendor them, using the
-       # upstream integrated approach if possible. See setup/revendor.py and
-       # consider migrating other resources to this if they do not use it, in
-       # *preference* over manual rm'ing.
-       edo ${EPYTHON} setup.py liberation_fonts \
-               --path-to-liberation_fonts 
"${EPREFIX}"/usr/share/fonts/liberation-fonts \
-               --system-liberation_fonts
-       if use system-mathjax; then
-               edo ${EPYTHON} setup.py mathjax --path-to-mathjax 
"${EPREFIX}"/usr/share/mathjax --system-mathjax
-               edo ${EPYTHON} setup.py rapydscript
-       fi
-}
-
-src_test() {
-       # Skipped tests:
-       local _test_excludes=(
-               # unpackaged Python dependency: py7zr
-               7z
-               # tests if a completely unused module is bundled
-               pycryptodome
-
-               $(usev !speech speech_dispatcher)
-               $(usev !unrar test_unrar)
-
-               # undocumented reasons
-               test_mem_leaks
-               test_searching
-       )
-
-       edo ${PYTHON} setup.py test 
"${_test_excludes[@]/#/--exclude-test-name=}"
-}
-
-src_install() {
-       # Bug #352625 - Some LANGUAGE values can trigger the following 
ValueError:
-       #   File "/usr/lib/python2.6/locale.py", line 486, in getdefaultlocale
-       #    return _parse_localename(localename)
-       #  File "/usr/lib/python2.6/locale.py", line 418, in _parse_localename
-       #    raise ValueError, 'unknown locale: %s' % localename
-       #ValueError: unknown locale: 46
-       export -n LANG LANGUAGE ${!LC_*}
-       export LC_ALL=C.utf8 # bug #709682
-
-       # Bug #295672 - Avoid sandbox violation in ~/.config by forcing
-       # variables to point to our fake temporary $HOME.
-       export HOME="${T}/fake_homedir"
-       export CALIBRE_CONFIG_DIRECTORY="${HOME}/.config/calibre"
-       mkdir -p "${CALIBRE_CONFIG_DIRECTORY}" || die
-
-       addpredict /dev/dri #665310
-
-       # If this directory doesn't exist, zsh completion won't install
-       dodir /usr/share/zsh/site-functions
-
-       edo "${PYTHON}" setup.py install \
-               --staging-root="${ED}/usr" \
-               --prefix="${EPREFIX}/usr" \
-               --libdir="${EPREFIX}/usr/$(get_libdir)" \
-               --staging-libdir="${ED}/usr/$(get_libdir)" \
-               
--system-plugins-location="${EPREFIX}/usr/share/calibre/system-plugins"
-
-       cp -r man-pages/ "${ED}"/usr/share/man || die
-
-       find "${ED}"/usr/share -type d -empty -delete || die
-
-       python_fix_shebang "${ED}/usr/bin"
-
-       python_optimize "${ED}"/usr/$(get_libdir)/calibre 
"${D}/$(python_get_sitedir)"
-
-       newinitd "${FILESDIR}"/calibre-server-3.init calibre-server
-       newconfd "${FILESDIR}"/calibre-server-3.conf calibre-server
-}

diff --git 
a/app-text/calibre/files/0001-HTML-Input-Dont-add-resources-that-exist-outside-the.patch
 
b/app-text/calibre/files/0001-HTML-Input-Dont-add-resources-that-exist-outside-the.patch
deleted file mode 100644
index f33fd3345e27..000000000000
--- 
a/app-text/calibre/files/0001-HTML-Input-Dont-add-resources-that-exist-outside-the.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From 57190699030dc6746320e49695a67ce83c62d549 Mon Sep 17 00:00:00 2001
-From: Kovid Goyal <[email protected]>
-Date: Sun, 28 May 2023 14:03:15 +0530
-Subject: [PATCH] HTML Input: Dont add resources that exist outside the folder
- hierarchy rooted at the parent folder of the input HTML file by default
-
-(cherry picked from commit bbbddd2bf4ef4ddb467b0aeb0abe8765ed7f8a6b)
----
- .../ebooks/conversion/plugins/html_input.py      | 16 ++++++++++++++++
- 1 file changed, 16 insertions(+)
-
-diff --git a/src/calibre/ebooks/conversion/plugins/html_input.py 
b/src/calibre/ebooks/conversion/plugins/html_input.py
-index 6f9c2084ea..742f3e0279 100644
---- a/src/calibre/ebooks/conversion/plugins/html_input.py
-+++ b/src/calibre/ebooks/conversion/plugins/html_input.py
-@@ -64,6 +64,16 @@ class HTMLInput(InputFormatPlugin):
-                 )
-         ),
- 
-+        OptionRecommendation(name='allow_local_files_outside_root',
-+            recommended_value=False, level=OptionRecommendation.LOW,
-+            help=_('Normally, resources linked to by the HTML file or its 
children will only be allowed'
-+                   ' if they are in a sub-folder of the original HTML file. 
This option allows including'
-+                   ' local files from any location on your computer. This can 
be a security risk if you'
-+                   ' are converting untrusted HTML and expecting to 
distribute the result of the conversion.'
-+                )
-+        ),
-+
-+
-     }
- 
-     def convert(self, stream, opts, file_ext, log,
-@@ -76,6 +86,7 @@ def convert(self, stream, opts, file_ext, log,
-         if hasattr(stream, 'name'):
-             basedir = os.path.dirname(stream.name)
-             fname = os.path.basename(stream.name)
-+        self.root_dir_of_input = os.path.abspath(basedir) + os.sep
- 
-         if file_ext != 'opf':
-             if opts.dont_package:
-@@ -250,6 +261,11 @@ def link_to_local_path(self, link_, base=None):
-         frag = l.fragment
-         if not link:
-             return None, None
-+        link = os.path.abspath(os.path.realpath(link))
-+        if not link.startswith(self.root_dir_of_input):
-+            if not self.opts.allow_local_files_outside_root:
-+                self.log.warn('Not adding {} as it is outside the document 
root: {}'.format(link, self.root_dir_of_input))
-+                return None, None
-         return link, frag
- 
-     def resource_adder(self, link_, base=None):
--- 
-2.41.0
-

diff --git a/app-text/calibre/files/calibre-5.35.0-jxr-test.patch 
b/app-text/calibre/files/calibre-5.35.0-jxr-test.patch
deleted file mode 100644
index bec72c15cb8b..000000000000
--- a/app-text/calibre/files/calibre-5.35.0-jxr-test.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Avoid calling libjxr's JxrDecApp as we currently don't package it.
---- a/src/calibre/utils/img.py
-+++ b/src/calibre/utils/img.py
-@@ -118,8 +118,6 @@
-     i = QImage()
-     if not i.loadFromData(data):
-         q = what(None, data)
--        if q == 'jxr':
--            return load_jxr_data(data)
-         raise NotImage(f'Not a valid image (detected type: {q})')
-     return i
- 
-@@ -645,11 +643,6 @@
-     despeckle_image(img)
-     remove_borders_from_image(img)
-     image_to_data(img, fmt='GIF')
--    raw = subprocess.Popen([get_exe_path('JxrDecApp'), '-h'],
--                           creationflags=subprocess.DETACHED_PROCESS if 
iswindows else 0,
--                           stdout=subprocess.PIPE).stdout.read()
--    if b'JPEG XR Decoder Utility' not in raw:
--        raise SystemExit('Failed to run JxrDecApp')
- # }}}
- 
- 

diff --git 
a/app-text/calibre/files/calibre-5.44.0-Fix-compatibility-with-zeroconf-0.73.patch
 
b/app-text/calibre/files/calibre-5.44.0-Fix-compatibility-with-zeroconf-0.73.patch
deleted file mode 100644
index 79af5d94bb59..000000000000
--- 
a/app-text/calibre/files/calibre-5.44.0-Fix-compatibility-with-zeroconf-0.73.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 5d8d85c649b181747d182f676cfd76f843bd61f0 Mon Sep 17 00:00:00 2001
-From: Kovid Goyal <[email protected]>
-Date: Sun, 1 Oct 2023 15:08:59 +0530
-Subject: [PATCH] Fix compatibility with zeroconf >= 0.73
-
-Fixes #2038 (fix compatibility with newer zeroconf)
----
- src/calibre/devices/smart_device_app/driver.py | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/src/calibre/devices/smart_device_app/driver.py 
b/src/calibre/devices/smart_device_app/driver.py
-index 87608f305b..b41c3a0063 100644
---- a/src/calibre/devices/smart_device_app/driver.py
-+++ b/src/calibre/devices/smart_device_app/driver.py
-@@ -2175,6 +2175,8 @@ def monkeypatch_zeroconf():
-     # "monkeypatch" zeroconf with a function without the check
-     try:
-         from zeroconf._utils.name import service_type_name
-+        # zeroconf 0.73 uses an lru cache so we need __wrapped__
-+        service_type_name = getattr(service_type_name, '__wrapped__', 
service_type_name)
-         service_type_name.__kwdefaults__['strict'] = False
-     except ImportError:
-         import zeroconf
--- 
-2.41.0
-

diff --git a/app-text/calibre/files/calibre-5.44.0-icu75.patch 
b/app-text/calibre/files/calibre-5.44.0-icu75.patch
deleted file mode 100644
index 3f79a9b4f79f..000000000000
--- a/app-text/calibre/files/calibre-5.44.0-icu75.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-logical changes backported from:
-https://github.com/kovidgoyal/calibre/commit/a3d3d8d33e314ccabb5099e78e4056a79b7c9aa2
-https://bugs.gentoo.org/936270
-
-diff -rup a/setup/build.py b/setup/build.py
---- a/setup/build.py   2022-06-17 04:35:27.000000000 +0200
-+++ b/setup/build.py   2024-07-19 11:51:56.374389213 +0200
-@@ -65,6 +65,8 @@ class Extension:
-                     self.cflags.insert(0, '-std=c++11')
-                 elif kwargs.get('needs_c++14'):
-                     self.cflags.insert(0, '-std=c++14')
-+                elif kwargs.get('needs_c++17'):
-+                    self.cflags.insert(0, '-std=c++17')
-             else:
-                 if kwargs.get('needs_c99'):
-                     self.cflags.insert(0, '-std=c99')
-diff -rup a/setup/extensions.json b/setup/extensions.json
---- a/setup/extensions.json    2022-06-17 04:35:27.000000000 +0200
-+++ b/setup/extensions.json    2024-07-19 11:52:11.253389395 +0200
-@@ -75,7 +75,7 @@
-         "name": "sqlite_extension",
-         "headers": "calibre/utils/cpp_binding.h",
-         "sources": "calibre/db/sqlite_extension.cpp",
--              "needs_c++14": true,
-+              "needs_c++17": true,
-         "libraries": "icudata icui18n icuuc icuio stemmer",
-         "windows_libraries": "icudt icuin icuuc icuio libstemmer",
-         "lib_dirs": "!icu_lib_dirs",

diff --git a/app-text/calibre/files/calibre-5.44.0-xss-backport.patch 
b/app-text/calibre/files/calibre-5.44.0-xss-backport.patch
deleted file mode 100644
index 83bb8cca8cf5..000000000000
--- a/app-text/calibre/files/calibre-5.44.0-xss-backport.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-Changelog:
-
-Only relevant if you embed the calibre server within a larger server, it
-means attackers who can convince users to click on a specially crafted
-link, can run JavaScript code with the same origin as the larger server
-calibre is embedded in.
-
-From e75f85919a3c3a5f2d87861050d8483d66561c06 Mon Sep 17 00:00:00 2001
-From: Kovid Goyal <[email protected]>
-Date: Tue, 30 Jul 2024 13:40:21 +0530
-Subject: [PATCH] Fix #2075130 [Private
- bug](https://bugs.launchpad.net/calibre/+bug/2075130)
-
----
- src/calibre/srv/legacy.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/calibre/srv/legacy.py b/src/calibre/srv/legacy.py
-index 055228ebee..85586b07a6 100644
---- a/src/calibre/srv/legacy.py
-+++ b/src/calibre/srv/legacy.py
-@@ -255,7 +255,7 @@ def browse(ctx, rd, rest):
-     if rest.startswith('book/'):
-         # implementation of https://bugs.launchpad.net/calibre/+bug/1698411
-         # redirect old server book URLs to new URLs
--        redirect = ctx.url_for(None) + '#book_id=' + rest[5:] + 
"&amp;panel=book_details"
-+        redirect = ctx.url_for(None) + '#book_id=' + int(rest[5:]) + 
"&amp;panel=book_details"
-         from lxml import etree as ET
-         return html(ctx, rd, endpoint,
-                  E.html(E.head(
--- 
-2.44.2
-

diff --git 
a/app-text/calibre/files/e9cc00560a28f56a303cca97630ab58e519dd9c8.patch 
b/app-text/calibre/files/e9cc00560a28f56a303cca97630ab58e519dd9c8.patch
deleted file mode 100644
index deae34e201e3..000000000000
--- a/app-text/calibre/files/e9cc00560a28f56a303cca97630ab58e519dd9c8.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From e9cc00560a28f56a303cca97630ab58e519dd9c8 Mon Sep 17 00:00:00 2001
-From: Kovid Goyal <[email protected]>
-Date: Mon, 8 Jan 2024 09:12:35 +0530
-Subject: [PATCH] Fix #2048475 [Tests fail with lxml
- 5.0](https://bugs.launchpad.net/calibre/+bug/2048475)
-
----
- src/calibre/utils/xml_parse.py | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/src/calibre/utils/xml_parse.py b/src/calibre/utils/xml_parse.py
-index a31c6ed83ed7..339538b90057 100644
---- a/src/calibre/utils/xml_parse.py
-+++ b/src/calibre/utils/xml_parse.py
-@@ -36,6 +36,11 @@ def safe_xml_fromstring(string_or_bytes, recover=True):
-     return ans
- 
- 
-+def unsafe_xml_fromstring(string_or_bytes):
-+    parser = etree.XMLParser(resolve_entities=True)
-+    return fs(string_or_bytes, parser=parser)
-+
-+
- def find_tests():
-     import unittest, tempfile, os
-     from calibre.constants import iswindows
-@@ -61,7 +66,7 @@ def t(tid, val, expected, safe=True):
-                 raw = templ.format(id=tid, val=val)
-                 err = None
-                 try:
--                    root = safe_xml_fromstring(raw) if safe else 
etree.fromstring(raw)
-+                    root = safe_xml_fromstring(raw) if safe else 
unsafe_xml_fromstring(raw)
-                 except Exception as e:
-                     err = str(e)
-                     root = None

Reply via email to