summaryrefslogtreecommitdiffstats
path: root/office/zathura-pdf-mupdf/patches/0004-Enable-EPUB-support.patch.disabled
diff options
context:
space:
mode:
author B. Watson2015-05-12 02:41:46 +0200
committer Willy Sudiarto Raharjo2015-05-17 18:45:50 +0200
commit6af4a5522670f351ea1b265332c1b722c2322903 (patch)
tree2dedd5a7bdb1452c04eae93fff60576eb27f957a /office/zathura-pdf-mupdf/patches/0004-Enable-EPUB-support.patch.disabled
parentef70875e1f61af6e82771c4e597e3f4b4ac85706 (diff)
downloadslackbuilds-6af4a5522670f351ea1b265332c1b722c2322903.tar.gz
office/zathura-pdf-mupdf: Updated for version 0.2.7.
Diffstat (limited to 'office/zathura-pdf-mupdf/patches/0004-Enable-EPUB-support.patch.disabled')
-rw-r--r--office/zathura-pdf-mupdf/patches/0004-Enable-EPUB-support.patch.disabled45
1 files changed, 45 insertions, 0 deletions
diff --git a/office/zathura-pdf-mupdf/patches/0004-Enable-EPUB-support.patch.disabled b/office/zathura-pdf-mupdf/patches/0004-Enable-EPUB-support.patch.disabled
new file mode 100644
index 0000000000..3c731be781
--- /dev/null
+++ b/office/zathura-pdf-mupdf/patches/0004-Enable-EPUB-support.patch.disabled
@@ -0,0 +1,45 @@
+From 00792eae08aafb5ba2f429b1cdee0a5fe9c25c61 Mon Sep 17 00:00:00 2001
+From: Moritz Lipp <mlq@pwmt.org>
+Date: Sun, 19 Apr 2015 10:49:20 +0200
+Subject: [PATCH 4/6] Enable EPUB support
+
+---
+ document.c | 8 +++-----
+ plugin.c | 3 ++-
+ 2 files changed, 5 insertions(+), 6 deletions(-)
+
+diff --git a/document.c b/document.c
+index 38e70b5..de805bb 100644
+--- a/document.c
++++ b/document.c
+@@ -34,11 +34,9 @@ pdf_document_open(zathura_document_t* document)
+ const char* password = zathura_document_get_password(document);
+
+ fz_try(mupdf_document->ctx){
+- if (strstr(path, ".xps") != 0 || strstr(path, ".XPS") != 0 || strstr(path, ".rels") != 0) {
+- mupdf_document->document = (fz_document*) xps_open_document(mupdf_document->ctx, (char*) path);
+- } else {
+- mupdf_document->document = (fz_document*) pdf_open_document(mupdf_document->ctx, (char*) path);
+- }
++ fz_register_document_handlers(mupdf_document->ctx);
++
++ mupdf_document->document = fz_open_document(mupdf_document->ctx, path);
+ }
+ fz_catch(mupdf_document->ctx){
+ error = ZATHURA_ERROR_UNKNOWN;
+diff --git a/plugin.c b/plugin.c
+index a115db4..86cb8de 100644
+--- a/plugin.c
++++ b/plugin.c
+@@ -32,6 +32,7 @@ ZATHURA_PLUGIN_REGISTER(
+ register_functions,
+ ZATHURA_PLUGIN_MIMETYPES({
+ "application/pdf",
+- "application/oxps"
++ "application/oxps",
++ "application/epub+zip"
+ })
+ )
+--
+1.8.4
+