summary refs log tree commit diff
path: root/gnu/packages
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2020-04-03 15:28:14 +0200
committerMarius Bakke <mbakke@fastmail.com>2020-04-03 15:28:42 +0200
commit3e4ce1cc3eb7b35405c4d2c4f837e53ec9952c99 (patch)
tree482d149f7a5e50a3c258d54a2cc4e14e1e1a5309 /gnu/packages
parentf3697439cd226f769cdc5ce962f08ad3a1a8bfd6 (diff)
downloadguix-3e4ce1cc3eb7b35405c4d2c4f837e53ec9952c99.tar.gz
gnu: calibre: Fix build with python-msgpack >= 1.0.
* gnu/packages/patches/calibre-msgpack-compat.patch: New file.
* gnu/local.mk (dist_patch_DATA): Adjust accordingly.
* gnu/packages/ebook.scm (calibre)[source](patches): Add it.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/ebook.scm1
-rw-r--r--gnu/packages/patches/calibre-msgpack-compat.patch18
2 files changed, 19 insertions, 0 deletions
diff --git a/gnu/packages/ebook.scm b/gnu/packages/ebook.scm
index 5ac0fb1533..37be173949 100644
--- a/gnu/packages/ebook.scm
+++ b/gnu/packages/ebook.scm
@@ -104,6 +104,7 @@
              (delete-file "resources/calibre-portable.sh")
              #t))
         (patches (search-patches "calibre-no-updates-dialog.patch"
+                                 "calibre-msgpack-compat.patch"
                                  "calibre-remove-test-bs4.patch" ; TODO: fix test.
                                  "calibre-remove-test-sqlite.patch" ; TODO: fix test.
                                  "calibre-remove-test-unrar.patch"))))
diff --git a/gnu/packages/patches/calibre-msgpack-compat.patch b/gnu/packages/patches/calibre-msgpack-compat.patch
new file mode 100644
index 0000000000..9920103bea
--- /dev/null
+++ b/gnu/packages/patches/calibre-msgpack-compat.patch
@@ -0,0 +1,18 @@
+Fix deserialization with msgpack 1.0.
+
+Patch copied from upstream source repository:
+https://github.com/kovidgoyal/calibre/commit/0ff41ac64994ec11b7859fc004c94d08769e3af3
+
+diff --git a/src/calibre/utils/serialize.py b/src/calibre/utils/serialize.py
+index f5d560c468..c35ae53849 100644
+--- a/src/calibre/utils/serialize.py
++++ b/src/calibre/utils/serialize.py
+@@ -110,7 +110,7 @@ def msgpack_decoder(code, data):
+ def msgpack_loads(dump, use_list=True):
+     # use_list controls whether msgpack arrays are unpacked as lists or tuples
+     import msgpack
+-    return msgpack.unpackb(dump, ext_hook=msgpack_decoder, raw=False, use_list=use_list)
++    return msgpack.unpackb(dump, ext_hook=msgpack_decoder, raw=False, use_list=use_list, strict_map_key=False)
+ 
+ 
+ def json_loads(data):