pkgsrc-WIP-changes archive

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

zathura-pdf-mupdf: Adjust/remove no longer needed patches



Module Name:	pkgsrc-wip
Committed By:	Leonardo Taccari <leot%NetBSD.org@localhost>
Pushed By:	leot
Date:		Wed Oct 3 14:04:55 2018 +0200
Changeset:	6963649f651e93e0ef66ad73cd3e4be1e28acf6c

Modified Files:
	zathura-pdf-mupdf-git/distinfo
	zathura-pdf-mupdf-git/patches/patch-document.c
Removed Files:
	zathura-pdf-mupdf-git/patches/patch-meson.build
	zathura-pdf-mupdf-git/patches/patch-zathura-pdf-mupdf_page.c
	zathura-pdf-mupdf-git/patches/patch-zathura-pdf-mupdf_render.c
	zathura-pdf-mupdf-git/patches/patch-zathura-pdf-mupdf_search.c
	zathura-pdf-mupdf-git/patches/patch-zathura-pdf-mupdf_utils.c

Log Message:
zathura-pdf-mupdf: Adjust/remove no longer needed patches

All the patches to port zathura-pdf-mupdf to MuPDF 1.14.0 were applied upstream
and are no longer needed!

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

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

diffstat:
 zathura-pdf-mupdf-git/distinfo                     |  7 +---
 zathura-pdf-mupdf-git/patches/patch-document.c     | 10 -----
 zathura-pdf-mupdf-git/patches/patch-meson.build    | 25 ------------
 .../patches/patch-zathura-pdf-mupdf_page.c         | 23 -----------
 .../patches/patch-zathura-pdf-mupdf_render.c       | 46 ----------------------
 .../patches/patch-zathura-pdf-mupdf_search.c       | 31 ---------------
 .../patches/patch-zathura-pdf-mupdf_utils.c        | 17 --------
 7 files changed, 1 insertion(+), 158 deletions(-)

diffs:
diff --git a/zathura-pdf-mupdf-git/distinfo b/zathura-pdf-mupdf-git/distinfo
index a9ebed08fa..bf49cd5ed7 100644
--- a/zathura-pdf-mupdf-git/distinfo
+++ b/zathura-pdf-mupdf-git/distinfo
@@ -1,8 +1,3 @@
 $NetBSD$
 
-SHA1 (patch-document.c) = b7d3c8c23148f7eb5f034586c2da4995a5cf2b5d
-SHA1 (patch-meson.build) = a6e57e646cb96b430564ac5cdbf18d67b62f8f0b
-SHA1 (patch-zathura-pdf-mupdf_page.c) = bfce420f9396025a23b7c8a78ff962b834d6746a
-SHA1 (patch-zathura-pdf-mupdf_render.c) = a551478679d14906482673e60bd52cfd6cf74f7a
-SHA1 (patch-zathura-pdf-mupdf_search.c) = 9d21523e2768436fe2e00bc4765d21643d996c0c
-SHA1 (patch-zathura-pdf-mupdf_utils.c) = 92655c0684c72ca42954936f72795d85f4c3a318
+SHA1 (patch-document.c) = 680106636f8fb2ac57ff2a03496ed70b3516b26b
diff --git a/zathura-pdf-mupdf-git/patches/patch-document.c b/zathura-pdf-mupdf-git/patches/patch-document.c
index 3bde10d3ff..3d146e6cea 100644
--- a/zathura-pdf-mupdf-git/patches/patch-document.c
+++ b/zathura-pdf-mupdf-git/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
 
 --- 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-git/patches/patch-meson.build b/zathura-pdf-mupdf-git/patches/patch-meson.build
deleted file mode 100644
index bea89d1e78..0000000000
--- a/zathura-pdf-mupdf-git/patches/patch-meson.build
+++ /dev/null
@@ -1,25 +0,0 @@
-$NetBSD$
-
-- Fix library name of jbig2dec (no 'lib' prefix is needed)
-- Adjust library name of mupdf-third for mupdf>=1.14.0.
-
---- meson.build.orig	2018-09-29 16:16:56.000000000 +0000
-+++ meson.build
-@@ -20,7 +20,7 @@ girara = dependency('girara-gtk3')
- glib = dependency('glib-2.0')
- cairo = dependency('cairo')
- mupdf = cc.find_library('mupdf')
--mupdfthird = cc.find_library('mupdfthird')
-+mupdfthird = cc.find_library('mupdf-third')
- 
- build_dependencies = [
-   zathura,
-@@ -33,7 +33,7 @@ build_dependencies = [
- 
- if get_option('link-external')
-   libjpeg = dependency('libjpeg')
--  libjbig2dec = cc.find_library('libjbig2dec')
-+  libjbig2dec = cc.find_library('jbig2dec')
-   libopenjp2 = dependency('libopenjp2')
- 
-   build_dependencies += [
diff --git a/zathura-pdf-mupdf-git/patches/patch-zathura-pdf-mupdf_page.c b/zathura-pdf-mupdf-git/patches/patch-zathura-pdf-mupdf_page.c
deleted file mode 100644
index 26b6d8fdab..0000000000
--- a/zathura-pdf-mupdf-git/patches/patch-zathura-pdf-mupdf_page.c
+++ /dev/null
@@ -1,23 +0,0 @@
-$NetBSD$
-
-Port to mupdf-1.14.0
-
---- 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-git/patches/patch-zathura-pdf-mupdf_render.c b/zathura-pdf-mupdf-git/patches/patch-zathura-pdf-mupdf_render.c
deleted file mode 100644
index 1590fdb1b0..0000000000
--- a/zathura-pdf-mupdf-git/patches/patch-zathura-pdf-mupdf_render.c
+++ /dev/null
@@ -1,46 +0,0 @@
-$NetBSD$
-
-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,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,16 +35,13 @@ 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);
-+  fz_pixmap* pixmap = fz_new_pixmap_with_bbox_and_data(mupdf_page->ctx, colorspace, irect, seps, 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);
- 
diff --git a/zathura-pdf-mupdf-git/patches/patch-zathura-pdf-mupdf_search.c b/zathura-pdf-mupdf-git/patches/patch-zathura-pdf-mupdf_search.c
deleted file mode 100644
index 6f53e1a6ac..0000000000
--- a/zathura-pdf-mupdf-git/patches/patch-zathura-pdf-mupdf_search.c
+++ /dev/null
@@ -1,31 +0,0 @@
-$NetBSD$
-
-Port to mupdf-1.14.0
-
---- 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-git/patches/patch-zathura-pdf-mupdf_utils.c b/zathura-pdf-mupdf-git/patches/patch-zathura-pdf-mupdf_utils.c
deleted file mode 100644
index 03f7fb24fe..0000000000
--- a/zathura-pdf-mupdf-git/patches/patch-zathura-pdf-mupdf_utils.c
+++ /dev/null
@@ -1,17 +0,0 @@
-$NetBSD$
-
-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
-@@ -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