pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
zathura-pdf-mupdf: Remove, used to update print/zathura-pdf-mupdf
Module Name: pkgsrc-wip
Committed By: Leonardo Taccari <leot%NetBSD.org@localhost>
Pushed By: leot
Date: Mon Dec 18 16:08:14 2017 +0100
Changeset: 0f719edeed9117d4adffb066545eef8b58fe1276
Modified Files:
Makefile
Removed Files:
zathura-pdf-mupdf/COMMIT_MSG
zathura-pdf-mupdf/DESCR
zathura-pdf-mupdf/Makefile
zathura-pdf-mupdf/PLIST
zathura-pdf-mupdf/distinfo
zathura-pdf-mupdf/patches/patch-document.c
zathura-pdf-mupdf/patches/patch-image.c
zathura-pdf-mupdf/patches/patch-index.c
zathura-pdf-mupdf/patches/patch-page.c
zathura-pdf-mupdf/patches/patch-plugin.h
zathura-pdf-mupdf/patches/patch-render.c
zathura-pdf-mupdf/patches/patch-select.c
zathura-pdf-mupdf/patches/patch-utils.c
Log Message:
zathura-pdf-mupdf: Remove, used to update print/zathura-pdf-mupdf
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=0f719edeed9117d4adffb066545eef8b58fe1276
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
Makefile | 1 -
zathura-pdf-mupdf/COMMIT_MSG | 11 -----
zathura-pdf-mupdf/DESCR | 2 -
zathura-pdf-mupdf/Makefile | 28 -----------
zathura-pdf-mupdf/PLIST | 3 --
zathura-pdf-mupdf/distinfo | 14 ------
zathura-pdf-mupdf/patches/patch-document.c | 15 ------
zathura-pdf-mupdf/patches/patch-image.c | 35 --------------
zathura-pdf-mupdf/patches/patch-index.c | 29 ------------
zathura-pdf-mupdf/patches/patch-page.c | 75 ------------------------------
zathura-pdf-mupdf/patches/patch-plugin.h | 25 ----------
zathura-pdf-mupdf/patches/patch-render.c | 48 -------------------
zathura-pdf-mupdf/patches/patch-select.c | 25 ----------
zathura-pdf-mupdf/patches/patch-utils.c | 30 ------------
14 files changed, 341 deletions(-)
diffs:
diff --git a/Makefile b/Makefile
index 5be182b5f3..9601a63247 100644
--- a/Makefile
+++ b/Makefile
@@ -4674,7 +4674,6 @@ SUBDIR+= yp-tools
SUBDIR+= ypbind-mt
SUBDIR+= ypserv
SUBDIR+= zapping
-SUBDIR+= zathura-pdf-mupdf
SUBDIR+= zbackup
SUBDIR+= zbar
SUBDIR+= zenity
diff --git a/zathura-pdf-mupdf/COMMIT_MSG b/zathura-pdf-mupdf/COMMIT_MSG
deleted file mode 100644
index f9547e1eb4..0000000000
--- a/zathura-pdf-mupdf/COMMIT_MSG
+++ /dev/null
@@ -1,11 +0,0 @@
-zathura-pdf-mupdf: Backport patches from upstream and adapt to MuPDF 1.2.0 API
-
-- Backport all the relevant patches from upstream (NFCI, most of them were
- already backported but diverged a bit from upstream).
-- Delete patches/patch-links.c, I can no longer reproduce the NULL pointer
- dereference with mupdf-1.2.0.
-- Backport MuPDF 1.2.0 API update
-
-With these zathura-pdf-mupdf works with mupdf-1.2.0.
-
-Bump PKGREVISION.
diff --git a/zathura-pdf-mupdf/DESCR b/zathura-pdf-mupdf/DESCR
deleted file mode 100644
index 3c71cd55c5..0000000000
--- a/zathura-pdf-mupdf/DESCR
+++ /dev/null
@@ -1,2 +0,0 @@
-The zathura-pdf-mupdf plugin adds PDF support to zathura by using the
-mupdf rendering library.
diff --git a/zathura-pdf-mupdf/Makefile b/zathura-pdf-mupdf/Makefile
deleted file mode 100644
index 1c89dc261e..0000000000
--- a/zathura-pdf-mupdf/Makefile
+++ /dev/null
@@ -1,28 +0,0 @@
-# $NetBSD: Makefile,v 1.19 2017/11/23 17:20:10 wiz Exp $
-#
-
-DISTNAME= zathura-pdf-mupdf-0.3.1
-PKGREVISION= 8
-CATEGORIES= print
-MASTER_SITES= https://pwmt.org/projects/zathura/plugins/download/
-
-MAINTAINER= leot%NetBSD.org@localhost
-HOMEPAGE= https://pwmt.org/projects/zathura-pdf-mupdf/
-COMMENT= Add PDF support to zathura using mupdf rendering engine
-LICENSE= zlib
-
-CONFLICTS+= zathura-pdf-poppler-[0-9]*
-
-USE_TOOLS+= pkg-config gmake
-USE_LIBTOOL= yes
-
-CPPFLAGS+= -D_XOPEN_SOURCE=600
-
-MAKE_ENV+= MUPDF_LIB="-lmupdf -lmupdfthird"
-
-.include "../../graphics/cairo/buildlink3.mk"
-.include "../../wip/mupdf/buildlink3.mk"
-.include "../../print/zathura/buildlink3.mk"
-.include "../../sysutils/desktop-file-utils/desktopdb.mk"
-.include "../../x11/gtk3/buildlink3.mk"
-.include "../../mk/bsd.pkg.mk"
diff --git a/zathura-pdf-mupdf/PLIST b/zathura-pdf-mupdf/PLIST
deleted file mode 100644
index 4ef2958705..0000000000
--- a/zathura-pdf-mupdf/PLIST
+++ /dev/null
@@ -1,3 +0,0 @@
-@comment $NetBSD: PLIST,v 1.1 2016/02/14 14:01:49 leot Exp $
-lib/zathura/pdf.so
-share/applications/zathura-pdf-mupdf.desktop
diff --git a/zathura-pdf-mupdf/distinfo b/zathura-pdf-mupdf/distinfo
deleted file mode 100644
index 21225358d4..0000000000
--- a/zathura-pdf-mupdf/distinfo
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD: distinfo,v 1.6 2017/02/18 13:38:33 leot Exp $
-
-SHA1 (zathura-pdf-mupdf-0.3.1.tar.gz) = ef37a181de96d6fca36db3ac818f790dcf3627ae
-RMD160 (zathura-pdf-mupdf-0.3.1.tar.gz) = 7497475ba55d2e7f96d23f378cbefeddd56089e4
-SHA512 (zathura-pdf-mupdf-0.3.1.tar.gz) = 87b5b8a750a6911be37a0195b0f4bc3304350f9d29173091b3eeece40350b10cb98b009b2722a69ae1e617b4242292f3eba17fea97d5276e485069180f2bd67d
-Size (zathura-pdf-mupdf-0.3.1.tar.gz) = 9755 bytes
-SHA1 (patch-document.c) = b4695700ffc3a85667a292af059d0af58b3150f1
-SHA1 (patch-image.c) = 65fee62ddeddf5329a9eeb868b39f26c9232f759
-SHA1 (patch-index.c) = 96022a5e5c6152e56cecad8f47c4893419536c83
-SHA1 (patch-page.c) = adbe5766d39befdde4aed0a937ff96312921eb2f
-SHA1 (patch-plugin.h) = 1e93cac827843be7a5caf887c5c3381ad16388f4
-SHA1 (patch-render.c) = 000477afe5286eb6e183cc87864c06f3f73ad8f2
-SHA1 (patch-select.c) = 5b6505ad998e1980a6cfa4dc0484f0707ea9799a
-SHA1 (patch-utils.c) = 870c37dfd7c359ad1e9891a75e9afc71ac3c36c7
diff --git a/zathura-pdf-mupdf/patches/patch-document.c b/zathura-pdf-mupdf/patches/patch-document.c
deleted file mode 100644
index 5b0e79e3b1..0000000000
--- a/zathura-pdf-mupdf/patches/patch-document.c
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-document.c,v 1.4 2017/01/31 10:12:02 leot Exp $
-
-Correct the glib-2.0 include header file path.
-
---- document.c.orig 2017-01-11 21:21:14.000000000 +0000
-+++ document.c
-@@ -5,7 +5,7 @@
- #include <mupdf/fitz.h>
- #include <mupdf/pdf.h>
-
--#include <glib-2.0/glib.h>
-+#include <glib.h>
-
- #include "plugin.h"
-
diff --git a/zathura-pdf-mupdf/patches/patch-image.c b/zathura-pdf-mupdf/patches/patch-image.c
deleted file mode 100644
index 39cb6cc5d8..0000000000
--- a/zathura-pdf-mupdf/patches/patch-image.c
+++ /dev/null
@@ -1,35 +0,0 @@
-$NetBSD$
-
-Updated for MuPDF 1.12.0
-
-Backport from upstream, commit a3f703788f77b19bb986e14666fe0c47911adddc.
-
---- image.c.orig 2017-01-11 21:21:14.000000000 +0000
-+++ image.c
-@@ -43,18 +43,16 @@ pdf_page_images_get(zathura_page_t* page
- /* Extract images */
- mupdf_page_extract_text(mupdf_document, mupdf_page);
-
-- fz_page_block* block;
-- for (block = mupdf_page->text->blocks; block < mupdf_page->text->blocks + mupdf_page->text->len; block++) {
-- if (block->type == FZ_PAGE_BLOCK_IMAGE) {
-- fz_image_block *image_block = block->u.image;
--
-+ fz_stext_block* block;
-+ for (block = mupdf_page->text->first_block; block; block = block->next) {
-+ if (block->type == FZ_STEXT_BLOCK_IMAGE) {
- zathura_image_t* zathura_image = g_malloc(sizeof(zathura_image_t));
-
-- zathura_image->position.x1 = image_block->bbox.x0;
-- zathura_image->position.y1 = image_block->bbox.y0;
-- zathura_image->position.x2 = image_block->bbox.x1;
-- zathura_image->position.y2 = image_block->bbox.y1;
-- zathura_image->data = image_block->image;
-+ zathura_image->position.x1 = block->bbox.x0;
-+ zathura_image->position.y1 = block->bbox.y0;
-+ zathura_image->position.x2 = block->bbox.x1;
-+ zathura_image->position.y2 = block->bbox.y1;
-+ zathura_image->data = block->u.i.image;
-
- girara_list_append(list, zathura_image);
- }
diff --git a/zathura-pdf-mupdf/patches/patch-index.c b/zathura-pdf-mupdf/patches/patch-index.c
deleted file mode 100644
index 8e4e20d4aa..0000000000
--- a/zathura-pdf-mupdf/patches/patch-index.c
+++ /dev/null
@@ -1,29 +0,0 @@
-$NetBSD$
-
-index: handle outline entries with no URI
-
-Some PDFs (such as [1]) cause mupdf to return outline elements with a
-NULL uri element, which causes a NULL pointer dereference to happen in
-fz_is_external_link.
-
-Catch this case, but still create a dummy entry in the outline.
-
-[1] http://www.st.com/resource/en/reference_manual/dm00093941.pdf
-
-Signed-off-by: Florian Larysch <fl%n621.de@localhost>
-
-Backported from upstream, commit 74deda65003386df216c7c0343c86d95c866f5e1.
-
---- index.c.orig 2017-01-11 21:21:14.000000000 +0000
-+++ index.c
-@@ -51,7 +51,9 @@ build_index(fz_context* ctx, fz_document
- zathura_link_type_t type = ZATHURA_LINK_INVALID;
- zathura_rectangle_t rect = { .x1 = 0, .y1 = 0, .x2 = 0, .y2 = 0 };
-
-- if (fz_is_external_link(ctx, outline->uri) == 1) {
-+ if (outline->uri == NULL) {
-+ type = ZATHURA_LINK_NONE;
-+ } else if (fz_is_external_link(ctx, outline->uri) == 1) {
- if (strstr(outline->uri, "file://") == outline->uri) {
- type = ZATHURA_LINK_GOTO_REMOTE;
- target.value = outline->uri;
diff --git a/zathura-pdf-mupdf/patches/patch-page.c b/zathura-pdf-mupdf/patches/patch-page.c
deleted file mode 100644
index 2c8e53ec78..0000000000
--- a/zathura-pdf-mupdf/patches/patch-page.c
+++ /dev/null
@@ -1,75 +0,0 @@
-$NetBSD$
-
-- Fix double free in pdf_page_init()
-
- In case of failure in 'pdf_page_init', the mupdf_page is being cleared
- and freed but the zathura_page still holds a pointer to it, resulting
- in a double free when 'pdf_page_clear' is later called.
-
- The execution flow resulting in a double free is the following:
- zathura_page_new()
- pdf_page_init()
- zathura_page_set_data()
- failure of fz_load_page(),fz_bound_page() or fz_new_stext_sheet()
- pdf_page_clear()
- zathura_page_free()
- pdf_page_clear() // double free
-
- Make sure 'zathura_page_set_data' is called only if no errors occurred
- so that page->data never points to freed memory.
-
- Backported from upstream, commit 83b3f9e77bb6aedfa6b4fffc1088c25ae209fd81.
-
-- Updated for MuPDF 1.12.0
-
- Backport from upstream, commit a3f703788f77b19bb986e14666fe0c47911adddc.
-
---- page.c.orig 2017-12-18 10:17:58.832972588 +0000
-+++ page.c
-@@ -20,8 +20,6 @@ pdf_page_init(zathura_page_t* page)
- return ZATHURA_ERROR_OUT_OF_MEMORY;
- }
-
-- zathura_page_set_data(page, mupdf_page);
--
- mupdf_page->ctx = mupdf_document->ctx;
- if (mupdf_page->ctx == NULL) {
- goto error_free;
-@@ -36,10 +34,6 @@ pdf_page_init(zathura_page_t* page)
-
- fz_bound_page(mupdf_document->ctx, (fz_page*) mupdf_page->page, &mupdf_page->bbox);
-
-- /* get page dimensions */
-- zathura_page_set_width(page, mupdf_page->bbox.x1 - mupdf_page->bbox.x0);
-- zathura_page_set_height(page, mupdf_page->bbox.y1 - mupdf_page->bbox.y0);
--
- /* setup text */
- mupdf_page->extracted_text = false;
-
-@@ -50,10 +44,11 @@ pdf_page_init(zathura_page_t* page)
- goto error_free;
- }
-
-- mupdf_page->sheet = fz_new_stext_sheet(mupdf_page->ctx);
-- if (mupdf_page->sheet == NULL) {
-- goto error_free;
-- }
-+ zathura_page_set_data(page, mupdf_page);
-+
-+ /* get page dimensions */
-+ zathura_page_set_width(page, mupdf_page->bbox.x1 - mupdf_page->bbox.x0);
-+ zathura_page_set_height(page, mupdf_page->bbox.y1 - mupdf_page->bbox.y0);
-
- return ZATHURA_ERROR_OK;
-
-@@ -79,10 +74,6 @@ pdf_page_clear(zathura_page_t* page, mup
- fz_drop_stext_page(mupdf_page->ctx, mupdf_page->text);
- }
-
-- if (mupdf_page->sheet != NULL) {
-- fz_drop_stext_sheet(mupdf_page->ctx, mupdf_page->sheet);
-- }
--
- if (mupdf_page->page != NULL) {
- fz_drop_page(mupdf_document->ctx, mupdf_page->page);
- }
diff --git a/zathura-pdf-mupdf/patches/patch-plugin.h b/zathura-pdf-mupdf/patches/patch-plugin.h
deleted file mode 100644
index dc687c3cc5..0000000000
--- a/zathura-pdf-mupdf/patches/patch-plugin.h
+++ /dev/null
@@ -1,25 +0,0 @@
-$NetBSD$
-
-Updated for MuPDF 1.12.0
-
-Backport from upstream, commit a3f703788f77b19bb986e14666fe0c47911adddc.
-
---- plugin.h.orig 2017-01-11 21:21:14.000000000 +0000
-+++ plugin.h
-@@ -3,6 +3,8 @@
- #ifndef PDF_H
- #define PDF_H
-
-+#include <stdlib.h>
-+#include <string.h>
- #include <stdbool.h>
- #include <zathura/plugin-api.h>
- #include <mupdf/fitz.h>
-@@ -21,7 +23,6 @@ typedef struct mupdf_page_s
- {
- fz_page* page; /**< Reference to the mupdf page */
- fz_context* ctx; /**< Context */
-- fz_stext_sheet* sheet; /**< Text sheet */
- fz_stext_page* text; /**< Page text */
- fz_rect bbox; /**< Bbox */
- bool extracted_text; /**< If text has already been extracted */
diff --git a/zathura-pdf-mupdf/patches/patch-render.c b/zathura-pdf-mupdf/patches/patch-render.c
deleted file mode 100644
index 3eda12e4fb..0000000000
--- a/zathura-pdf-mupdf/patches/patch-render.c
+++ /dev/null
@@ -1,48 +0,0 @@
-$NetBSD$
-
-- Close device.
-
- Every fz_drop_device() need a corresponding fz_close_device().
-
- This fixes the:
-
- warning: dropping unclosed device
- warning: ... repeated <n> times ..
-
- warnings.
-
- Backport from upstream, commit 622b35440d708a187add31adab8bca747c11d2a8.
-
-- Updated for MuPDF 1.12.0
-
- Backport from upstream, commit a3f703788f77b19bb986e14666fe0c47911adddc.
-
---- render.c.orig 2017-01-11 21:21:14.000000000 +0000
-+++ render.c
-@@ -31,21 +31,25 @@ pdf_page_render_to_buffer(mupdf_document
- return ZATHURA_ERROR_UNKNOWN;
- }
-
-+ 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_pixmap* pixmap = fz_new_pixmap_with_bbox_and_data(mupdf_page->ctx, colorspace, &irect, 1, image);
-+ 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_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);
-+ 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-select.c b/zathura-pdf-mupdf/patches/patch-select.c
deleted file mode 100644
index 6ee5f28bd8..0000000000
--- a/zathura-pdf-mupdf/patches/patch-select.c
+++ /dev/null
@@ -1,25 +0,0 @@
-$NetBSD$
-
-Updated for MuPDF 1.12.0
-
-Backport from upstream, commit a3f703788f77b19bb986e14666fe0c47911adddc.
-
---- select.c.orig 2017-01-11 21:21:14.000000000 +0000
-+++ select.c
-@@ -24,9 +24,14 @@ pdf_page_get_text(zathura_page_t* page,
- mupdf_page_extract_text(mupdf_document, mupdf_page);
- }
-
-- fz_rect rect = { rectangle.x1, rectangle.y1, rectangle.x2, rectangle.y2 };
-+ fz_point a = { rectangle.x1, rectangle.y1 };
-+ fz_point b = { rectangle.x2, rectangle.y2 };
-
-- return fz_copy_selection(mupdf_page->ctx, mupdf_page->text, rect);
-+#ifdef _WIN32
-+ return fz_copy_selection(mupdf_page->ctx, mupdf_page->text, a, b, 1);
-+#else
-+ return fz_copy_selection(mupdf_page->ctx, mupdf_page->text, a, b, 0);
-+#endif
-
- error_ret:
-
diff --git a/zathura-pdf-mupdf/patches/patch-utils.c b/zathura-pdf-mupdf/patches/patch-utils.c
deleted file mode 100644
index 89689091a7..0000000000
--- a/zathura-pdf-mupdf/patches/patch-utils.c
+++ /dev/null
@@ -1,30 +0,0 @@
-$NetBSD$
-
-Updated for MuPDF 1.12.0
-
-Backport from upstream, commit a3f703788f77b19bb986e14666fe0c47911adddc.
-
---- utils.c.orig 2017-01-11 21:21:14.000000000 +0000
-+++ utils.c
-@@ -7,17 +7,17 @@
- void
- mupdf_page_extract_text(mupdf_document_t* mupdf_document, mupdf_page_t* mupdf_page) {
- if (mupdf_document == NULL || mupdf_document->ctx == NULL || mupdf_page == NULL ||
-- mupdf_page->sheet == NULL || mupdf_page->text == NULL) {
-+ mupdf_page->text == NULL) {
- return;
- }
-
- fz_device* text_device = NULL;
-
- fz_try (mupdf_page->ctx) {
-- text_device = fz_new_stext_device(mupdf_page->ctx, mupdf_page->sheet, mupdf_page->text, NULL);
-+ text_device = fz_new_stext_device(mupdf_page->ctx, mupdf_page->text, NULL);
-
-- /* Disable FZ_IGNORE_IMAGE to collect image blocks */
-- fz_disable_device_hints(mupdf_page->ctx, text_device, FZ_IGNORE_IMAGE);
-+ /* Disable FZ_DONT_INTERPOLATE_IMAGES to collect image blocks */
-+ fz_disable_device_hints(mupdf_page->ctx, text_device, FZ_DONT_INTERPOLATE_IMAGES);
-
- fz_matrix ctm;
- fz_scale(&ctm, 1.0, 1.0);
Home |
Main Index |
Thread Index |
Old Index