summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-text/calibre/files/calibre-7.17.0-qt-texttospeech.patch')
-rw-r--r--app-text/calibre/files/calibre-7.17.0-qt-texttospeech.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/app-text/calibre/files/calibre-7.17.0-qt-texttospeech.patch b/app-text/calibre/files/calibre-7.17.0-qt-texttospeech.patch
new file mode 100644
index 000000000000..ff50735e4788
--- /dev/null
+++ b/app-text/calibre/files/calibre-7.17.0-qt-texttospeech.patch
@@ -0,0 +1,38 @@
+From 6d87aa054724155c9413e5692fa1f242f9cc0efc Mon Sep 17 00:00:00 2001
+From: Eli Schwartz <eschwartz93@gmail.com>
+Date: Fri, 23 Aug 2024 02:20:00 -0400
+Subject: [PATCH] tests: delete qt TTS assert which is not yet used
+
+It will be used in future versions of calibre, and should likely be
+gated on USE=speech.
+---
+ src/calibre/test_build.py | 6 +-----
+ 1 file changed, 1 insertion(+), 5 deletions(-)
+
+diff --git a/src/calibre/test_build.py b/src/calibre/test_build.py
+index 4f19363680..898caad665 100644
+--- a/src/calibre/test_build.py
++++ b/src/calibre/test_build.py
+@@ -314,7 +314,7 @@ def test_apsw(self):
+ def test_qt(self):
+ if is_sanitized:
+ raise unittest.SkipTest('Skipping Qt build test as sanitizer is enabled')
+- from qt.core import QApplication, QFontDatabase, QImageReader, QLoggingCategory, QNetworkAccessManager, QSslSocket, QTextToSpeech, QTimer
++ from qt.core import QApplication, QFontDatabase, QImageReader, QLoggingCategory, QNetworkAccessManager, QSslSocket, QTimer
+ QLoggingCategory.setFilterRules('''qt.webenginecontext.debug=true''')
+ if hasattr(os, 'geteuid') and os.geteuid() == 0:
+ # likely a container build, webengine cannot run as root with sandbox
+@@ -348,10 +348,6 @@ def test_qt(self):
+ try:
+ ensure_app()
+ self.assertGreaterEqual(len(QFontDatabase.families()), 5, 'The QPA headless plugin is not able to locate enough system fonts via fontconfig')
+- available_tts_engines = tuple(x for x in QTextToSpeech.availableEngines() if x != 'mock')
+- self.assertTrue(available_tts_engines)
+-
+- self.assertGreaterEqual
+ from calibre.ebooks.oeb.transforms.rasterize import rasterize_svg
+ img = rasterize_svg(as_qimage=True)
+ self.assertFalse(img.isNull())
+--
+2.44.2
+