pkgsrc-WIP-changes archive

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

zathura-pdf-mupdf: Update wip/zathura-pdf-mupdf to 0.3.4



Module Name:	pkgsrc-wip
Committed By:	Leonardo Taccari <leot%NetBSD.org@localhost>
Pushed By:	leot
Date:		Thu Oct 4 20:44:30 2018 +0200
Changeset:	466491f40bd3a2af91bf56423d2fc9699369d5e4

Modified Files:
	zathura-pdf-mupdf/Makefile
	zathura-pdf-mupdf/distinfo
	zathura-pdf-mupdf/patches/patch-document.c
Removed Files:
	zathura-pdf-mupdf/patches/patch-meson.build
	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_search.c
	zathura-pdf-mupdf/patches/patch-zathura-pdf-mupdf_utils.c

Log Message:
zathura-pdf-mupdf: Update wip/zathura-pdf-mupdf to 0.3.4

pkgsrc changes:
 - Pass `-D link-external=true' to meson in order to link to mupdf third parties
   libraries

Changes:
0.3.4
-----
 - Compatible with mupdf 1.14
 - Various fixes and improvements

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

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

diffstat:
 zathura-pdf-mupdf/Makefile                         |  5 +-
 zathura-pdf-mupdf/distinfo                         | 15 ++----
 zathura-pdf-mupdf/patches/patch-document.c         | 12 +----
 zathura-pdf-mupdf/patches/patch-meson.build        | 28 -----------
 .../patches/patch-zathura-pdf-mupdf_page.c         | 23 ---------
 .../patches/patch-zathura-pdf-mupdf_render.c       | 55 ----------------------
 .../patches/patch-zathura-pdf-mupdf_search.c       | 31 ------------
 .../patches/patch-zathura-pdf-mupdf_utils.c        | 17 -------
 8 files changed, 10 insertions(+), 176 deletions(-)

diffs:
diff --git a/zathura-pdf-mupdf/Makefile b/zathura-pdf-mupdf/Makefile
index 3049c11a24..ea5c9493d2 100644
--- a/zathura-pdf-mupdf/Makefile
+++ b/zathura-pdf-mupdf/Makefile
@@ -1,7 +1,7 @@
 # $NetBSD: Makefile,v 1.27 2018/08/16 18:55:09 adam Exp $
 #
 
-DISTNAME=	zathura-pdf-mupdf-0.3.3
+DISTNAME=	zathura-pdf-mupdf-0.3.4
 CATEGORIES=	print
 MASTER_SITES=	https://pwmt.org/projects/zathura/plugins/download/
 EXTRACT_SUFX=	.tar.xz
@@ -13,6 +13,9 @@ LICENSE=	zlib
 
 USE_TOOLS+=	pkg-config
 
+# Link to external dependencies (jpeg, jbig2dec, openjpeg)
+MESON_ARGS+=	-D link-external=true
+
 CPPFLAGS+=	-D_XOPEN_SOURCE=600
 
 .include "../../devel/py-meson/build.mk"
diff --git a/zathura-pdf-mupdf/distinfo b/zathura-pdf-mupdf/distinfo
index c3faaa5832..e3f5e2f76b 100644
--- a/zathura-pdf-mupdf/distinfo
+++ b/zathura-pdf-mupdf/distinfo
@@ -1,12 +1,7 @@
 $NetBSD: distinfo,v 1.8 2018/01/07 13:01:32 leot Exp $
 
-SHA1 (zathura-pdf-mupdf-0.3.3.tar.xz) = a9165f6aec134de86d6ee5c1a2ed5f1aa8f7d0b3
-RMD160 (zathura-pdf-mupdf-0.3.3.tar.xz) = e66539794f0fb5cc341c485164142eceb3815f89
-SHA512 (zathura-pdf-mupdf-0.3.3.tar.xz) = cac3ccf4f85c689d44095966fbee84efac76d7c72915a06a85da272663eb3f11b053baf06a24e79e2fc89a57d05fa2f3c1df199e9e1415a3bfa65f3309227faf
-Size (zathura-pdf-mupdf-0.3.3.tar.xz) = 7880 bytes
-SHA1 (patch-document.c) = 8ac7ae7df81b6c906fb68c1a39a72ca330ea8722
-SHA1 (patch-meson.build) = aa6d91bfa1b86a6ad468394ab9e49b01c841663e
-SHA1 (patch-zathura-pdf-mupdf_page.c) = 31f30171e4a994e6e47f9fe27e6598d2ffcd15e0
-SHA1 (patch-zathura-pdf-mupdf_render.c) = 3d1aa6fc9e6925aefd5d7bbfcbf9b2f7dcd1d2a4
-SHA1 (patch-zathura-pdf-mupdf_search.c) = d42da1c60902d2e697057d78e2b2edd2203bc466
-SHA1 (patch-zathura-pdf-mupdf_utils.c) = fad0d6a1679fa4028b165be88922d26a0e54954d
+SHA1 (zathura-pdf-mupdf-0.3.4.tar.xz) = f2adf855a67455f4dccd22c61dcf22cde4c5ae2a
+RMD160 (zathura-pdf-mupdf-0.3.4.tar.xz) = 0063ae456a6753954879edf68b85bb1c1ce613f2
+SHA512 (zathura-pdf-mupdf-0.3.4.tar.xz) = 8a885f1faa471d413f09bd6a78b86d419fe433139b2f811dcae9a9ea180beaf693ee8c11c7fe98ed7d5303520f6d9b3efd0d8e7edf978aa5099ef580db79166a
+Size (zathura-pdf-mupdf-0.3.4.tar.xz) = 8092 bytes
+SHA1 (patch-document.c) = ad929680aa1de6f21b71cabc06da9ba54491687a
diff --git a/zathura-pdf-mupdf/patches/patch-document.c b/zathura-pdf-mupdf/patches/patch-document.c
index f63428f41f..87e5db6b39 100644
--- a/zathura-pdf-mupdf/patches/patch-document.c
+++ b/zathura-pdf-mupdf/patches/patch-document.c
@@ -1,7 +1,6 @@
 $NetBSD: patch-document.c,v 1.4 2017/01/31 10:12:02 leot Exp $
 
-- Correct the glib-2.0 include header file path.
-- Port to mupdf-1.14.0 (backported from upstream)
+Correct the glib-2.0 include header file path.
 
 --- zathura-pdf-mupdf/document.c.orig	2018-03-17 19:47:01.000000000 +0000
 +++ zathura-pdf-mupdf/document.c
@@ -14,12 +13,3 @@ $NetBSD: patch-document.c,v 1.4 2017/01/31 10:12:02 leot Exp $
  
  #include "plugin.h"
  
-@@ -138,7 +138,7 @@ pdf_document_get_information(zathura_doc
- 
-   fz_try (mupdf_document->ctx) {
-     pdf_obj* trailer = pdf_trailer(mupdf_document->ctx, (pdf_document*) mupdf_document->document);
--    pdf_obj* info_dict = pdf_dict_get(mupdf_document->ctx, trailer, PDF_NAME_Info);
-+    pdf_obj* info_dict = pdf_dict_get(mupdf_document->ctx, trailer, PDF_NAME(Info));
- 
-     /* get string values */
-     typedef struct info_value_s {
diff --git a/zathura-pdf-mupdf/patches/patch-meson.build b/zathura-pdf-mupdf/patches/patch-meson.build
deleted file mode 100644
index 9bcca768db..0000000000
--- a/zathura-pdf-mupdf/patches/patch-meson.build
+++ /dev/null
@@ -1,28 +0,0 @@
-$NetBSD$
-
-- Also depends on openjpeg, jpeg and jbig2dec to avoid missing PLT symbols at
-  run time. Please note that this was addressed upstream via:
-
-   <https://git.pwmt.org/pwmt/zathura-pdf-mupdf/commit/8d27748c525691268305c6760c7d4668d0560313>
-
-- Adjust library name of mupdf-third for mupdf>=1.14.0 (backported from
-  upstream)
-
---- meson.build.orig	2018-03-17 19:47:01.000000000 +0000
-+++ meson.build
-@@ -19,10 +19,13 @@ zathura = dependency('zathura', version:
- girara = dependency('girara-gtk3')
- glib = dependency('glib-2.0')
- cairo = dependency('cairo')
-+libopenjp2 = dependency('libopenjp2')
-+libjpeg = dependency('libjpeg')
-+jbig2dec = cc.find_library('jbig2dec')
- mupdf = cc.find_library('mupdf')
--mupdfthird = cc.find_library('mupdfthird')
-+mupdfthird = cc.find_library('mupdf-third')
- 
--build_dependencies = [zathura, girara, glib, cairo, mupdf, mupdfthird]
-+build_dependencies = [zathura, girara, glib, cairo, libopenjp2, libjpeg, jbig2dec, mupdf, mupdfthird]
- 
- # defines
- defines = [
diff --git a/zathura-pdf-mupdf/patches/patch-zathura-pdf-mupdf_page.c b/zathura-pdf-mupdf/patches/patch-zathura-pdf-mupdf_page.c
deleted file mode 100644
index 7e96319953..0000000000
--- a/zathura-pdf-mupdf/patches/patch-zathura-pdf-mupdf_page.c
+++ /dev/null
@@ -1,23 +0,0 @@
-$NetBSD$
-
-Port to mupdf-1.14.0 (backported from upstream)
-
---- zathura-pdf-mupdf/page.c.orig	2018-03-17 19:47:01.000000000 +0000
-+++ zathura-pdf-mupdf/page.c
-@@ -30,14 +30,12 @@ pdf_page_init(zathura_page_t* page)
-     goto error_free;
-   }
- 
--  fz_bound_page(mupdf_document->ctx, (fz_page*) mupdf_page->page, &mupdf_page->bbox);
-+  mupdf_page->bbox = 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,
--      fz_bound_page(mupdf_page->ctx, mupdf_page->page, &mediabox));
-+  mupdf_page->text = fz_new_stext_page(mupdf_page->ctx, mupdf_page->bbox);
-   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
deleted file mode 100644
index 4c364b4cdf..0000000000
--- a/zathura-pdf-mupdf/patches/patch-zathura-pdf-mupdf_render.c
+++ /dev/null
@@ -1,55 +0,0 @@
-$NetBSD$
-
-- Ignore separations in order to avoid upstream issue #1 and #2
-  (backported from upstream)
-- Port to mupdf-1.14.0 (backported from upstream)
-
---- zathura-pdf-mupdf/render.c.orig	2018-10-04 11:55:20.017813225 +0000
-+++ zathura-pdf-mupdf/render.c
-@@ -18,13 +18,16 @@ pdf_page_render_to_buffer(mupdf_document
-     return ZATHURA_ERROR_UNKNOWN;
-   }
- 
--  fz_display_list* display_list = fz_new_display_list(mupdf_page->ctx, NULL);
-+  fz_irect irect = { .x1 = page_width, .y1 = page_height };
-+  fz_rect rect = { .x1 = page_width, .y1 = page_height };
-+
-+  fz_display_list* display_list = fz_new_display_list(mupdf_page->ctx, rect);
-   fz_device* device             = fz_new_list_device(mupdf_page->ctx, display_list);
- 
-   fz_try (mupdf_document->ctx) {
-     fz_matrix m;
--    fz_scale(&m, scalex, scaley);
--    fz_run_page(mupdf_document->ctx, mupdf_page->page, device, &m, 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,22 +35,18 @@ pdf_page_render_to_buffer(mupdf_document
-   fz_close_device(mupdf_page->ctx, device);
-   fz_drop_device(mupdf_page->ctx, device);
- 
--  fz_irect irect = { .x1 = page_width, .y1 = page_height };
--  fz_rect rect = { .x1 = page_width, .y1 = page_height };
--
-   fz_colorspace* colorspace = fz_device_bgr(mupdf_document->ctx);
--  fz_separations* seps= fz_page_separations(mupdf_page->ctx, mupdf_page->page);
--  fz_pixmap* pixmap = fz_new_pixmap_with_bbox_and_data(mupdf_page->ctx, colorspace, &irect, seps, 1, image);
-+  /* TODO: What are separations used for? */
-+  fz_pixmap* pixmap = fz_new_pixmap_with_bbox_and_data(mupdf_page->ctx, colorspace, irect, NULL, 1, image);
-   fz_clear_pixmap_with_value(mupdf_page->ctx, pixmap, 0xFF);
- 
--  device = fz_new_draw_device(mupdf_page->ctx, NULL, pixmap);
--  fz_run_display_list(mupdf_page->ctx, display_list, device, &fz_identity, &rect, NULL);
-+  device = fz_new_draw_device(mupdf_page->ctx, fz_identity, pixmap);
-+  fz_run_display_list(mupdf_page->ctx, display_list, device, fz_identity, rect, NULL);
-   fz_close_device(mupdf_page->ctx, device);
-   fz_drop_device(mupdf_page->ctx, device);
- 
-   fz_drop_pixmap(mupdf_page->ctx, pixmap);
-   fz_drop_display_list(mupdf_page->ctx, display_list);
--  fz_drop_separations(mupdf_page->ctx, seps);
- 
-   return ZATHURA_ERROR_OK;
- }
diff --git a/zathura-pdf-mupdf/patches/patch-zathura-pdf-mupdf_search.c b/zathura-pdf-mupdf/patches/patch-zathura-pdf-mupdf_search.c
deleted file mode 100644
index d76c1bd463..0000000000
--- a/zathura-pdf-mupdf/patches/patch-zathura-pdf-mupdf_search.c
+++ /dev/null
@@ -1,31 +0,0 @@
-$NetBSD$
-
-Port to mupdf-1.14.0 (backported from upstream)
-
---- zathura-pdf-mupdf/search.c.orig	2018-03-17 19:47:01.000000000 +0000
-+++ zathura-pdf-mupdf/search.c
-@@ -39,17 +39,19 @@ pdf_page_search_text(zathura_page_t* pag
-     mupdf_page_extract_text(mupdf_document, mupdf_page);
-   }
- 
--  fz_rect* hit_bbox = fz_malloc_array(mupdf_page->ctx, N_SEARCH_RESULTS, sizeof(fz_rect));
-+  fz_quad* hit_bbox = fz_malloc_array(mupdf_page->ctx, N_SEARCH_RESULTS, sizeof(fz_quad));
-   int num_results = fz_search_stext_page(mupdf_page->ctx, mupdf_page->text,
-       text, hit_bbox, N_SEARCH_RESULTS);
- 
-+  fz_rect r;
-   for (int i = 0; i < num_results; i++) {
-     zathura_rectangle_t* rectangle = g_malloc0(sizeof(zathura_rectangle_t));
- 
--    rectangle->x1 = hit_bbox[i].x0;
--    rectangle->x2 = hit_bbox[i].x1;
--    rectangle->y1 = hit_bbox[i].y0;
--    rectangle->y2 = hit_bbox[i].y1;
-+    r = fz_rect_from_quad(hit_bbox[i]);
-+    rectangle->x1 = r.x0;
-+    rectangle->x2 = r.x1;
-+    rectangle->y1 = r.y0;
-+    rectangle->y2 = r.y1;
- 
-     girara_list_append(list, rectangle);
-   }
diff --git a/zathura-pdf-mupdf/patches/patch-zathura-pdf-mupdf_utils.c b/zathura-pdf-mupdf/patches/patch-zathura-pdf-mupdf_utils.c
deleted file mode 100644
index a860479bc5..0000000000
--- a/zathura-pdf-mupdf/patches/patch-zathura-pdf-mupdf_utils.c
+++ /dev/null
@@ -1,17 +0,0 @@
-$NetBSD$
-
-Port to mupdf-1.14.0 (backported from upstream)
-
---- zathura-pdf-mupdf/utils.c.orig	2018-03-17 19:47:01.000000000 +0000
-+++ zathura-pdf-mupdf/utils.c
-@@ -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_scale(&ctm, 1.0, 1.0);
--    fz_run_page(mupdf_page->ctx, mupdf_page->page, text_device, &ctm, 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