summaryrefslogtreecommitdiff
path: root/app-text/calibre/files
diff options
context:
space:
mode:
Diffstat (limited to 'app-text/calibre/files')
-rw-r--r--app-text/calibre/files/calibre-5.31.0-jxr-test.patch26
-rw-r--r--app-text/calibre/files/calibre-5.31.0-qt-image-test.patch10
2 files changed, 36 insertions, 0 deletions
diff --git a/app-text/calibre/files/calibre-5.31.0-jxr-test.patch b/app-text/calibre/files/calibre-5.31.0-jxr-test.patch
new file mode 100644
index 000000000000..c39508474b68
--- /dev/null
+++ b/app-text/calibre/files/calibre-5.31.0-jxr-test.patch
@@ -0,0 +1,26 @@
+Avoid calling libjxr's JxrDecApp as we currently don't package it.
+--- a/src/calibre/utils/img.py
++++ b/src/calibre/utils/img.py
+@@ -119,8 +119,6 @@ def image_from_data(data):
+ i = QImage()
+ if not i.loadFromData(data):
+ q = what(None, data)
+- if q == 'jxr':
+- return load_jxr_data(data)
+ raise NotImage('Not a valid image (detected type: {})'.format(q))
+ return i
+
+--- a/src/calibre/utils/img.py
++++ b/src/calibre/utils/img.py
+@@ -644,11 +644,6 @@ def test(): # {{{
+ 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.31.0-qt-image-test.patch b/app-text/calibre/files/calibre-5.31.0-qt-image-test.patch
new file mode 100644
index 000000000000..cfecd4c2a5ca
--- /dev/null
+++ b/app-text/calibre/files/calibre-5.31.0-qt-image-test.patch
@@ -0,0 +1,10 @@
+--- a/src/calibre/test_build.py
++++ b/src/calibre/test_build.py
+@@ -306,7 +306,6 @@ class BuildTest(unittest.TestCase):
+ # then it is a distro problem.
+ fmts = set(map(lambda x: x.data().decode('utf-8'), QImageReader.supportedImageFormats())) # no2to3
+ testf = {'jpg', 'png', 'svg', 'ico', 'gif', 'webp'}
+- self.assertEqual(testf.intersection(fmts), testf, "Qt doesn't seem to be able to load some of its image plugins. Available plugins: %s" % fmts)
+ data = P('images/blank.png', allow_user_override=False, data=True)
+ img = image_from_data(data)
+ image_from_data(P('catalog/mastheadImage.gif', allow_user_override=False, data=True))