summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-text/calibre/files/calibre-5.35.0-jxr-test.patch')
-rw-r--r--app-text/calibre/files/calibre-5.35.0-jxr-test.patch24
1 files changed, 24 insertions, 0 deletions
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
new file mode 100644
index 000000000000..bec72c15cb8b
--- /dev/null
+++ b/app-text/calibre/files/calibre-5.35.0-jxr-test.patch
@@ -0,0 +1,24 @@
+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')
+ # }}}
+
+