pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

zathura-pdf-mupdf: Readjust patch after re-reading new API changes



Module Name:	pkgsrc-wip
Committed By:	Leonardo Taccari <leot%NetBSD.org@localhost>
Pushed By:	leot
Date:		Thu Sep 27 14:58:07 2018 +0200
Changeset:	a13668f1f914ca4fcd98960a8037e3eeed333fc3

Modified Files:
	zathura-pdf-mupdf/distinfo
	zathura-pdf-mupdf/patches/patch-zathura-pdf-mupdf_page.c
	zathura-pdf-mupdf/patches/patch-zathura-pdf-mupdf_render.c
	zathura-pdf-mupdf/patches/patch-zathura-pdf-mupdf_utils.c

Log Message:
zathura-pdf-mupdf: Readjust patch after re-reading new API changes

(Still rendering issues though...)

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=a13668f1f914ca4fcd98960a8037e3eeed333fc3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 zathura-pdf-mupdf/distinfo                                 |  6 +++---
 zathura-pdf-mupdf/patches/patch-zathura-pdf-mupdf_page.c   |  7 ++++---
 zathura-pdf-mupdf/patches/patch-zathura-pdf-mupdf_render.c | 10 +++++-----
 zathura-pdf-mupdf/patches/patch-zathura-pdf-mupdf_utils.c  |  9 ++++-----
 4 files changed, 16 insertions(+), 16 deletions(-)

diffs:
diff --git a/zathura-pdf-mupdf/distinfo b/zathura-pdf-mupdf/distinfo
index 910e908f49..28a1320c66 100644
--- a/zathura-pdf-mupdf/distinfo
+++ b/zathura-pdf-mupdf/distinfo
@@ -6,7 +6,7 @@ SHA512 (zathura-pdf-mupdf-0.3.3.tar.xz) = cac3ccf4f85c689d44095966fbee84efac76d7
 Size (zathura-pdf-mupdf-0.3.3.tar.xz) = 7880 bytes
 SHA1 (patch-document.c) = b7d3c8c23148f7eb5f034586c2da4995a5cf2b5d
 SHA1 (patch-meson.build) = a23f098b32e58019787a2b269c5cb73d5c219d07
-SHA1 (patch-zathura-pdf-mupdf_page.c) = 396873c5bfd9597587ca2f8c4881ce4ad2d47777
-SHA1 (patch-zathura-pdf-mupdf_render.c) = 121f5b7c1264f67466aa9676e499b7a8636483d5
+SHA1 (patch-zathura-pdf-mupdf_page.c) = 2c4ef79edaa7b0d1e4dce44e382e578ba21698be
+SHA1 (patch-zathura-pdf-mupdf_render.c) = a551478679d14906482673e60bd52cfd6cf74f7a
 SHA1 (patch-zathura-pdf-mupdf_search.c) = 9d21523e2768436fe2e00bc4765d21643d996c0c
-SHA1 (patch-zathura-pdf-mupdf_utils.c) = d6bcc73150f691816ccf6578be71ee7319f8024b
+SHA1 (patch-zathura-pdf-mupdf_utils.c) = 92655c0684c72ca42954936f72795d85f4c3a318
diff --git a/zathura-pdf-mupdf/patches/patch-zathura-pdf-mupdf_page.c b/zathura-pdf-mupdf/patches/patch-zathura-pdf-mupdf_page.c
index d469ce4b31..d826f67f1e 100644
--- a/zathura-pdf-mupdf/patches/patch-zathura-pdf-mupdf_page.c
+++ b/zathura-pdf-mupdf/patches/patch-zathura-pdf-mupdf_page.c
@@ -9,15 +9,16 @@ Port to mupdf-1.14.0
    }
  
 -  fz_bound_page(mupdf_document->ctx, (fz_page*) mupdf_page->page, &mupdf_page->bbox);
-+  fz_bound_page(mupdf_document->ctx, (fz_page*) mupdf_page->page);
++  fz_rect mediabox;
++  mediabox = fz_bound_page(mupdf_document->ctx, (fz_page*) mupdf_page->page);
  
    /* setup text */
    mupdf_page->extracted_text = false;
  
 -  fz_rect mediabox;
-   mupdf_page->text = fz_new_stext_page(mupdf_page->ctx,
+-  mupdf_page->text = fz_new_stext_page(mupdf_page->ctx,
 -      fz_bound_page(mupdf_page->ctx, mupdf_page->page, &mediabox));
-+      fz_bound_page(mupdf_page->ctx, mupdf_page->page));
++  mupdf_page->text = fz_new_stext_page(mupdf_page->ctx, mediabox);
    if (mupdf_page->text == NULL) {
      goto error_free;
    }
diff --git a/zathura-pdf-mupdf/patches/patch-zathura-pdf-mupdf_render.c b/zathura-pdf-mupdf/patches/patch-zathura-pdf-mupdf_render.c
index 6c5933c8ac..1590fdb1b0 100644
--- a/zathura-pdf-mupdf/patches/patch-zathura-pdf-mupdf_render.c
+++ b/zathura-pdf-mupdf/patches/patch-zathura-pdf-mupdf_render.c
@@ -4,7 +4,7 @@ Port to mupdf-1.14.0
 
 --- zathura-pdf-mupdf/render.c.orig	2018-03-17 19:47:01.000000000 +0000
 +++ zathura-pdf-mupdf/render.c
-@@ -18,13 +18,15 @@ pdf_page_render_to_buffer(mupdf_document
+@@ -18,13 +18,16 @@ pdf_page_render_to_buffer(mupdf_document
      return ZATHURA_ERROR_UNKNOWN;
    }
  
@@ -16,15 +16,15 @@ Port to mupdf-1.14.0
    fz_device* device             = fz_new_list_device(mupdf_page->ctx, display_list);
  
    fz_try (mupdf_document->ctx) {
--    fz_matrix m;
+     fz_matrix m;
 -    fz_scale(&m, scalex, scaley);
 -    fz_run_page(mupdf_document->ctx, mupdf_page->page, device, &m, NULL);
-+    fz_scale(scalex, scaley);
-+    fz_run_page(mupdf_document->ctx, mupdf_page->page, device, fz_identity, NULL);
++    m = fz_scale(scalex, scaley);
++    fz_run_page(mupdf_document->ctx, mupdf_page->page, device, m, NULL);
    } fz_catch (mupdf_document->ctx) {
      return ZATHURA_ERROR_UNKNOWN;
    }
-@@ -32,16 +34,13 @@ pdf_page_render_to_buffer(mupdf_document
+@@ -32,16 +35,13 @@ pdf_page_render_to_buffer(mupdf_document
    fz_close_device(mupdf_page->ctx, device);
    fz_drop_device(mupdf_page->ctx, device);
  
diff --git a/zathura-pdf-mupdf/patches/patch-zathura-pdf-mupdf_utils.c b/zathura-pdf-mupdf/patches/patch-zathura-pdf-mupdf_utils.c
index 11e47ef99a..03f7fb24fe 100644
--- a/zathura-pdf-mupdf/patches/patch-zathura-pdf-mupdf_utils.c
+++ b/zathura-pdf-mupdf/patches/patch-zathura-pdf-mupdf_utils.c
@@ -4,15 +4,14 @@ Port to mupdf-1.14.0
 
 --- zathura-pdf-mupdf/utils.c.orig	2018-03-17 19:47:01.000000000 +0000
 +++ zathura-pdf-mupdf/utils.c
-@@ -17,9 +17,8 @@ mupdf_page_extract_text(mupdf_document_t
-     /* Disable FZ_DONT_INTERPOLATE_IMAGES to collect image blocks */
+@@ -18,8 +18,8 @@ mupdf_page_extract_text(mupdf_document_t
      fz_disable_device_hints(mupdf_page->ctx, text_device, FZ_DONT_INTERPOLATE_IMAGES);
  
--    fz_matrix ctm;
+     fz_matrix ctm;
 -    fz_scale(&ctm, 1.0, 1.0);
 -    fz_run_page(mupdf_page->ctx, mupdf_page->page, text_device, &ctm, NULL);
-+    fz_scale(1.0, 1.0);
-+    fz_run_page(mupdf_page->ctx, mupdf_page->page, text_device, fz_identity, NULL);
++    ctm = fz_scale(1.0, 1.0);
++    fz_run_page(mupdf_page->ctx, mupdf_page->page, text_device, ctm, NULL);
    } fz_always (mupdf_document->ctx) {
      fz_close_device(mupdf_page->ctx, text_device);
      fz_drop_device(mupdf_page->ctx, text_device);


Home | Main Index | Thread Index | Old Index