use ports compiler for c11, remove devel/gettext MODULES, remove unnecessary PERMIT_*
This commit is contained in:
parent
a995117699
commit
dc1a8cd8c7
@ -1,12 +1,10 @@
|
||||
# $OpenBSD: Makefile.inc,v 1.5 2016/02/04 18:08:17 juanfra Exp $
|
||||
# $OpenBSD: Makefile.inc,v 1.6 2016/10/16 13:51:21 sthen Exp $
|
||||
|
||||
CATEGORIES ?= textproc x11
|
||||
MASTER_SITES ?= https://pwmt.org/projects/zathura/plugins/download/
|
||||
|
||||
# MIT
|
||||
PERMIT_PACKAGE_CDROM ?= Yes
|
||||
PERMIT_PACKAGE_FTP ?= Yes
|
||||
PERMIT_DISTFILES_FTP ?= Yes
|
||||
|
||||
RUN_DEPENDS ?= devel/desktop-file-utils \
|
||||
textproc/zathura/core
|
||||
@ -19,4 +17,5 @@ MAKE_FLAGS ?= VERBOSE=1 \
|
||||
NO_TEST ?= Yes
|
||||
USE_GMAKE ?= Yes
|
||||
|
||||
MODULES += devel/gettext
|
||||
MODULES += gcc4
|
||||
MODGCC4_ARCHS = *
|
||||
|
@ -1,15 +1,14 @@
|
||||
# $OpenBSD: Makefile,v 1.4 2016/02/04 18:08:17 juanfra Exp $
|
||||
# $OpenBSD: Makefile,v 1.5 2016/10/16 13:51:21 sthen Exp $
|
||||
|
||||
V = 0.1.2
|
||||
V = 0.1.5
|
||||
COMMENT = comic book plugin for zathura
|
||||
DISTNAME = zathura-cb-${V}
|
||||
REVISION = 2
|
||||
|
||||
HOMEPAGE = http://pwmt.org/projects/zathura/plugins/zathura-cb/
|
||||
|
||||
LIB_DEPENDS += archivers/libarchive
|
||||
|
||||
WANTLIB += archive cairo girara-gtk3 glib-2.0
|
||||
WANTLIB += archive cairo cairo-gobject gdk-3 gdk_pixbuf-2.0 gio-2.0
|
||||
WANTLIB += girara-gtk3 glib-2.0 gobject-2.0 intl pango-1.0 pangocairo-1.0
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (zathura-cb-0.1.2.tar.gz) = crIOLeRSzLhCj+AAe/Es7gbDQi6sjl47LA7LyYSIUOA=
|
||||
SIZE (zathura-cb-0.1.2.tar.gz) = 6636
|
||||
SHA256 (zathura-cb-0.1.5.tar.gz) = N19pEr15ZIYDutUcNjXOKOrKe/TfUhwA/5Zz2bT/av0=
|
||||
SIZE (zathura-cb-0.1.5.tar.gz) = 7193
|
||||
|
@ -1,15 +1,13 @@
|
||||
# $OpenBSD: Makefile,v 1.4 2016/02/04 18:08:17 juanfra Exp $
|
||||
# $OpenBSD: Makefile,v 1.5 2016/10/16 13:51:21 sthen Exp $
|
||||
|
||||
V = 0.2.3
|
||||
V = 0.2.5
|
||||
COMMENT = djvu plugin for zathura
|
||||
DISTNAME = zathura-djvu-${V}
|
||||
REVISION = 2
|
||||
|
||||
HOMEPAGE = http://pwmt.org/projects/zathura/plugins/zathura-djvu
|
||||
|
||||
LIB_DEPENDS += graphics/djvulibre
|
||||
|
||||
WANTLIB += cairo djvulibre girara-gtk3 glib-2.0
|
||||
WANTLIB += cairo djvulibre girara-gtk3 glib-2.0 intl
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (zathura-djvu-0.2.3.tar.gz) = wW6C1SUBK3iP0BxBid+TcI/P//t900ygnbVQBdZE7Yk=
|
||||
SIZE (zathura-djvu-0.2.3.tar.gz) = 11181
|
||||
SHA256 (zathura-djvu-0.2.5.tar.gz) = CLcRCvE+F6nSIb16D307R5s+MWMdeLxsXvtGJxopnA0=
|
||||
SIZE (zathura-djvu-0.2.5.tar.gz) = 11137
|
||||
|
@ -1,21 +1,19 @@
|
||||
# $OpenBSD: Makefile,v 1.7 2016/02/04 18:08:17 juanfra Exp $
|
||||
# $OpenBSD: Makefile,v 1.8 2016/10/16 13:51:21 sthen Exp $
|
||||
|
||||
V = 0.2.7
|
||||
REVISION = 3
|
||||
V = 0.3.0
|
||||
COMMENT = mupdf pdf plugin for zathura
|
||||
DISTNAME = zathura-pdf-mupdf-${V}
|
||||
|
||||
HOMEPAGE = https://pwmt.org/projects/zathura-pdf-mupdf/
|
||||
|
||||
LIB_DEPENDS += textproc/mupdf
|
||||
MAKE_FLAGS = VERBOSE=1 \
|
||||
MUPDF_LIB=-lmupdf \
|
||||
DESKTOPPREFIX=${PREFIX}/share/applications
|
||||
|
||||
WANTLIB += atk-1.0 cairo cairo-gobject crypto fontconfig freetype gdk-3
|
||||
WANTLIB += gdk_pixbuf-2.0 gio-2.0 girara-gtk3 glib-2.0 gobject-2.0 gtk-3
|
||||
WANTLIB += jbig2dec jpeg m mupdf openjp2 pango-1.0 pangocairo-1.0
|
||||
WANTLIB += pangoft2-1.0 z
|
||||
LIB_DEPENDS += textproc/mupdf
|
||||
|
||||
WANTLIB += atk-1.0 cairo cairo-gobject crypto gdk-3 gdk_pixbuf-2.0
|
||||
WANTLIB += gio-2.0 girara-gtk3 glib-2.0 gobject-2.0 gtk-3 intl
|
||||
WANTLIB += jbig2dec jpeg mupdf openjp2 pango-1.0 pangocairo-1.0
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (zathura-pdf-mupdf-0.2.7.tar.gz) = sTQ/NZQOvPRjuGi1V75Oq6fWGITW/zrT18fCcuacJT8=
|
||||
SIZE (zathura-pdf-mupdf-0.2.7.tar.gz) = 9357
|
||||
SHA256 (zathura-pdf-mupdf-0.3.0.tar.gz) = R4y50VYtCOCW6+xKbbkRbWFqNTYmAZfCooonchcfcsg=
|
||||
SIZE (zathura-pdf-mupdf-0.3.0.tar.gz) = 9914
|
||||
|
18
textproc/zathura/plugins/mupdf/patches/patch-config_mk
Normal file
18
textproc/zathura/plugins/mupdf/patches/patch-config_mk
Normal file
@ -0,0 +1,18 @@
|
||||
$OpenBSD: patch-config_mk,v 1.1 2016/10/16 13:51:21 sthen Exp $
|
||||
|
||||
From e3e49d206fbe5761c53a85b9499c940a0d718c8a Mon Sep 17 00:00:00 2001
|
||||
From: Christian Hesse <mail@eworm.de>
|
||||
Date: Thu, 28 Apr 2016 09:59:31 +0200
|
||||
Subject: [PATCH] mupdf 1.9 compatibility
|
||||
|
||||
--- config.mk.orig Sun Feb 14 22:49:46 2016
|
||||
+++ config.mk Sun Oct 16 13:48:04 2016
|
||||
@@ -32,7 +32,7 @@ endif
|
||||
OPENSSL_INC ?= $(shell pkg-config --cflags libcrypto)
|
||||
OPENSSL_LIB ?= $(shell pkg-config --libs libcrypto)
|
||||
|
||||
-MUPDF_LIB ?= -lmupdf -lmujs
|
||||
+MUPDF_LIB ?= -lmupdf -lmupdfthird
|
||||
|
||||
INCS = ${GTK_INC} ${GIRARA_INC} ${OPENSSL_INC} ${ZATHURA_INC}
|
||||
LIBS = ${GTK_LIB} ${GIRARA_LIB} ${MUPDF_LIB} ${OPENSSL_LIB} -ljbig2dec -lopenjp2 -ljpeg
|
@ -1,80 +1,25 @@
|
||||
$OpenBSD: patch-document_c,v 1.1 2015/04/25 23:05:41 sthen Exp $
|
||||
$OpenBSD: patch-document_c,v 1.2 2016/10/16 13:51:21 sthen Exp $
|
||||
|
||||
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] Enable EPUB support
|
||||
From e3e49d206fbe5761c53a85b9499c940a0d718c8a Mon Sep 17 00:00:00 2001
|
||||
From: Christian Hesse <mail@eworm.de>
|
||||
Date: Thu, 28 Apr 2016 09:59:31 +0200
|
||||
Subject: [PATCH] mupdf 1.9 compatibility
|
||||
|
||||
From f96dd48825c049bbccb2e25a814c49d03fedf86c Mon Sep 17 00:00:00 2001
|
||||
From: Moritz Lipp <mlq@pwmt.org>
|
||||
Date: Sun, 19 Apr 2015 10:39:02 +0200
|
||||
Subject: [PATCH] Update for 1.7 API changes
|
||||
|
||||
--- document.c.orig Sat Apr 25 23:50:55 2015
|
||||
+++ document.c Sat Apr 25 23:50:29 2015
|
||||
@@ -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;
|
||||
@@ -51,14 +49,14 @@ pdf_document_open(zathura_document_t* document)
|
||||
--- document.c.orig Sun Feb 14 22:49:46 2016
|
||||
+++ document.c Sun Oct 16 13:48:04 2016
|
||||
@@ -109,12 +109,12 @@ pdf_document_save_as(zathura_document_t* document, mup
|
||||
}
|
||||
|
||||
/* authenticate if password is required and given */
|
||||
- if (fz_needs_password(mupdf_document->document) != 0) {
|
||||
- if (password == NULL || fz_authenticate_password(mupdf_document->document, (char*) password) == 0) {
|
||||
+ if (fz_needs_password(mupdf_document->ctx, mupdf_document->document) != 0) {
|
||||
+ if (password == NULL || fz_authenticate_password(mupdf_document->ctx, mupdf_document->document, (char*) password) == 0) {
|
||||
error = ZATHURA_ERROR_INVALID_PASSWORD;
|
||||
goto error_free;
|
||||
}
|
||||
}
|
||||
|
||||
- zathura_document_set_number_of_pages(document, fz_count_pages(mupdf_document->document));
|
||||
+ zathura_document_set_number_of_pages(document, fz_count_pages(mupdf_document->ctx, mupdf_document->document));
|
||||
zathura_document_set_data(document, mupdf_document);
|
||||
|
||||
return error;
|
||||
@@ -67,10 +65,10 @@ error_free:
|
||||
|
||||
if (mupdf_document != NULL) {
|
||||
if (mupdf_document->document != NULL) {
|
||||
- fz_close_document(mupdf_document->document);
|
||||
+ fz_drop_document(mupdf_document->ctx, mupdf_document->document);
|
||||
}
|
||||
if (mupdf_document->ctx != NULL) {
|
||||
- fz_free_context(mupdf_document->ctx);
|
||||
+ fz_drop_context(mupdf_document->ctx);
|
||||
}
|
||||
|
||||
free(mupdf_document);
|
||||
@@ -90,8 +88,8 @@ pdf_document_free(zathura_document_t* document, mupdf_
|
||||
return ZATHURA_ERROR_INVALID_ARGUMENTS;
|
||||
}
|
||||
|
||||
- fz_close_document(mupdf_document->document);
|
||||
- fz_free_context(mupdf_document->ctx);
|
||||
+ fz_drop_document(mupdf_document->ctx, mupdf_document->document);
|
||||
+ fz_drop_context(mupdf_document->ctx);
|
||||
free(mupdf_document);
|
||||
zathura_document_set_data(document, NULL);
|
||||
|
||||
@@ -112,7 +110,7 @@ pdf_document_save_as(zathura_document_t* document, mup
|
||||
fz_try (mupdf_document->ctx) {
|
||||
- /* fz_write_document claims to accepts NULL as third argument but doesn't.
|
||||
+ /* pdf_save_document claims to accepts NULL as third argument but doesn't.
|
||||
* pdf_write_document does not check if the third arguments is NULL for some
|
||||
* options. */
|
||||
|
||||
fz_write_options opts = { 0 }; /* just use the default options */
|
||||
- fz_write_document(mupdf_document->document, (char*) path, &opts);
|
||||
+ fz_write_document(mupdf_document->ctx, mupdf_document->document, (char*) path, &opts);
|
||||
- fz_write_options opts = { 0 }; /* just use the default options */
|
||||
- fz_write_document(mupdf_document->ctx, mupdf_document->document, (char*) path, &opts);
|
||||
+ pdf_write_options opts = { 0 }; /* just use the default options */
|
||||
+ pdf_save_document(mupdf_document->ctx, (pdf_document*) mupdf_document->document, (char*) path, &opts);
|
||||
} fz_catch (mupdf_document->ctx) {
|
||||
return ZATHURA_ERROR_UNKNOWN;
|
||||
}
|
||||
|
@ -1,150 +1,18 @@
|
||||
$OpenBSD: patch-image_c,v 1.1 2015/04/25 23:05:41 sthen Exp $
|
||||
$OpenBSD: patch-image_c,v 1.2 2016/10/16 13:51:21 sthen Exp $
|
||||
|
||||
From f96dd48825c049bbccb2e25a814c49d03fedf86c Mon Sep 17 00:00:00 2001
|
||||
From: Moritz Lipp <mlq@pwmt.org>
|
||||
Date: Sun, 19 Apr 2015 10:39:02 +0200
|
||||
Subject: [PATCH] Update for 1.7 API changes
|
||||
From e3e49d206fbe5761c53a85b9499c940a0d718c8a Mon Sep 17 00:00:00 2001
|
||||
From: Christian Hesse <mail@eworm.de>
|
||||
Date: Thu, 28 Apr 2016 09:59:31 +0200
|
||||
Subject: [PATCH] mupdf 1.9 compatibility
|
||||
|
||||
--- image.c.orig Thu Oct 16 23:21:41 2014
|
||||
+++ image.c Sat Apr 25 23:47:26 2015
|
||||
@@ -9,8 +9,8 @@
|
||||
#include "plugin.h"
|
||||
--- image.c.orig Sun Feb 14 22:49:46 2016
|
||||
+++ image.c Sun Oct 16 13:48:04 2016
|
||||
@@ -93,7 +93,7 @@ pdf_page_image_get_cairo(zathura_page_t* page, mupdf_p
|
||||
fz_pixmap* pixmap = NULL;
|
||||
cairo_surface_t* surface = NULL;
|
||||
|
||||
static void pdf_zathura_image_free(zathura_image_t* image);
|
||||
-static void get_images(pdf_obj* dict, girara_list_t* list);
|
||||
-static void get_resources(pdf_obj* resource, girara_list_t* list);
|
||||
+static void get_images(zathura_page_t* page, pdf_obj* dict, girara_list_t* list);
|
||||
+static void get_resources(zathura_page_t* page, pdf_obj* resource, girara_list_t* list);
|
||||
|
||||
girara_list_t*
|
||||
pdf_page_images_get(zathura_page_t* page, mupdf_page_t* mupdf_page, zathura_error_t* error)
|
||||
@@ -30,12 +30,12 @@ pdf_page_images_get(zathura_page_t* page, mupdf_page_t
|
||||
|
||||
mupdf_document_t* mupdf_document = zathura_document_get_data(document);
|
||||
|
||||
- pdf_obj* page_object = pdf_load_object((pdf_document*) mupdf_document->document, zathura_page_get_index(page), 0);
|
||||
+ pdf_obj* page_object = pdf_load_object(mupdf_document->ctx, (pdf_document*) mupdf_document->document, zathura_page_get_index(page), 0);
|
||||
if (page_object == NULL) {
|
||||
- pixmap = fz_new_pixmap_from_image(mupdf_page->ctx, mupdf_image, 0, 0);
|
||||
+ pixmap = fz_get_pixmap_from_image(mupdf_page->ctx, mupdf_image, 0, 0);
|
||||
if (pixmap == NULL) {
|
||||
goto error_free;
|
||||
}
|
||||
|
||||
- pdf_obj* resource = pdf_dict_gets(page_object, "Resources");
|
||||
+ pdf_obj* resource = pdf_dict_gets(mupdf_document->ctx, page_object, "Resources");
|
||||
if (resource == NULL) {
|
||||
goto error_free;
|
||||
}
|
||||
@@ -50,7 +50,7 @@ pdf_page_images_get(zathura_page_t* page, mupdf_page_t
|
||||
|
||||
girara_list_set_free_function(list, (girara_free_function_t) pdf_zathura_image_free);
|
||||
|
||||
- get_resources(resource, list);
|
||||
+ get_resources(page, resource, list);
|
||||
|
||||
return list;
|
||||
|
||||
@@ -81,20 +81,32 @@ pdf_zathura_image_free(zathura_image_t* image)
|
||||
}
|
||||
|
||||
static void
|
||||
-get_images(pdf_obj* dict, girara_list_t* list)
|
||||
+get_images(zathura_page_t* page, pdf_obj* dict, girara_list_t* list)
|
||||
{
|
||||
if (dict == NULL || list == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
- for (int i = 0; i < pdf_dict_len(dict); i++) {
|
||||
- pdf_obj* image_dict = pdf_dict_get_val(dict, i);
|
||||
- if (pdf_is_dict(image_dict) == 0) {
|
||||
+ if (page == NULL) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ zathura_document_t* document = zathura_page_get_document(page);
|
||||
+
|
||||
+ if (document == NULL) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ mupdf_document_t* mupdf_document = zathura_document_get_data(document);
|
||||
+
|
||||
+ for (int i = 0; i < pdf_dict_len(mupdf_document->ctx, dict); i++) {
|
||||
+ pdf_obj* image_dict = pdf_dict_get_val(mupdf_document->ctx, dict, i);
|
||||
+ if (pdf_is_dict(mupdf_document->ctx, image_dict) == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
- pdf_obj* type = pdf_dict_gets(image_dict, "Subtype");
|
||||
- if (strcmp(pdf_to_name(type), "Image") != 0) {
|
||||
+ pdf_obj* type = pdf_dict_gets(mupdf_document->ctx, image_dict, "Subtype");
|
||||
+ if (strcmp(pdf_to_name(mupdf_document->ctx, type), "Image") != 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -110,8 +122,8 @@ get_images(pdf_obj* dict, girara_list_t* list)
|
||||
continue;
|
||||
}
|
||||
|
||||
- pdf_obj* width = pdf_dict_gets(image_dict, "Width");
|
||||
- pdf_obj* height = pdf_dict_gets(image_dict, "Height");
|
||||
+ pdf_obj* width = pdf_dict_gets(mupdf_document->ctx, image_dict, "Width");
|
||||
+ pdf_obj* height = pdf_dict_gets(mupdf_document->ctx, image_dict, "Height");
|
||||
|
||||
zathura_image_t* zathura_image = g_malloc(sizeof(zathura_image_t));
|
||||
|
||||
@@ -120,33 +132,45 @@ get_images(pdf_obj* dict, girara_list_t* list)
|
||||
// FIXME: Get correct image coordinates
|
||||
zathura_image->data = image_dict;
|
||||
zathura_image->position.x1 = 0;
|
||||
- zathura_image->position.x2 = pdf_to_int(width);
|
||||
+ zathura_image->position.x2 = pdf_to_int(mupdf_document->ctx, width);
|
||||
zathura_image->position.y1 = 0;
|
||||
- zathura_image->position.y2 = pdf_to_int(height);
|
||||
+ zathura_image->position.y2 = pdf_to_int(mupdf_document->ctx, height);
|
||||
|
||||
girara_list_append(list, zathura_image);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
-get_resources(pdf_obj* resource, girara_list_t* list)
|
||||
+get_resources(zathura_page_t* page, pdf_obj* resource, girara_list_t* list)
|
||||
{
|
||||
if (resource == NULL || list == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
- pdf_obj* x_object = pdf_dict_gets(resource, "XObject");
|
||||
+ if (page == NULL) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ zathura_document_t* document = zathura_page_get_document(page);
|
||||
+
|
||||
+ if (document == NULL) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ mupdf_document_t* mupdf_document = zathura_document_get_data(document);
|
||||
+
|
||||
+ pdf_obj* x_object = pdf_dict_gets(mupdf_document->ctx, resource, "XObject");
|
||||
if (x_object == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
- get_images(x_object, list);
|
||||
+ get_images(page, x_object, list);
|
||||
|
||||
- for (int i = 0; i < pdf_dict_len(x_object); i++) {
|
||||
- pdf_obj* obj = pdf_dict_get_val(x_object, i);
|
||||
- pdf_obj* subsrc = pdf_dict_gets(obj, "Resources");
|
||||
- if (subsrc != NULL && pdf_objcmp(resource, subsrc)) {
|
||||
- get_resources(subsrc, list);
|
||||
+ for (int i = 0; i < pdf_dict_len(mupdf_document->ctx, x_object); i++) {
|
||||
+ pdf_obj* obj = pdf_dict_get_val(mupdf_document->ctx, x_object, i);
|
||||
+ pdf_obj* subsrc = pdf_dict_gets(mupdf_document->ctx, obj, "Resources");
|
||||
+ if (subsrc != NULL && pdf_objcmp(mupdf_document->ctx, resource, subsrc)) {
|
||||
+ get_resources(page, subsrc, list);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,67 +0,0 @@
|
||||
$OpenBSD: patch-index_c,v 1.1 2015/04/25 23:05:41 sthen Exp $
|
||||
|
||||
From 23b5d6f2822bb27ec97de0701aefeed2a539f06a Mon Sep 17 00:00:00 2001
|
||||
From: Moritz Lipp <mlq@pwmt.org>
|
||||
Date: Sat, 7 Feb 2015 15:56:59 +0100
|
||||
Subject: [PATCH] Handle additional and missing link types in outline
|
||||
|
||||
From f96dd48825c049bbccb2e25a814c49d03fedf86c Mon Sep 17 00:00:00 2001
|
||||
From: Moritz Lipp <mlq@pwmt.org>
|
||||
Date: Sun, 19 Apr 2015 10:39:02 +0200
|
||||
Subject: [PATCH] Update for 1.7 API changes
|
||||
|
||||
--- index.c.orig Sat Apr 25 23:50:55 2015
|
||||
+++ index.c Sat Apr 25 23:50:29 2015
|
||||
@@ -19,7 +19,7 @@ pdf_document_index_generate(zathura_document_t* docume
|
||||
}
|
||||
|
||||
/* get outline */
|
||||
- fz_outline* outline = fz_load_outline(mupdf_document->document);
|
||||
+ fz_outline* outline = fz_load_outline(mupdf_document->ctx, mupdf_document->document);
|
||||
if (outline == NULL) {
|
||||
if (error != NULL) {
|
||||
*error = ZATHURA_ERROR_UNKNOWN;
|
||||
@@ -32,7 +32,7 @@ pdf_document_index_generate(zathura_document_t* docume
|
||||
build_index(outline, root);
|
||||
|
||||
/* free outline */
|
||||
- fz_free_outline(mupdf_document->ctx, outline);
|
||||
+ fz_drop_outline(mupdf_document->ctx, outline);
|
||||
|
||||
return root;
|
||||
}
|
||||
@@ -73,17 +73,31 @@ build_index(fz_outline* outline, girara_tree_node_t* r
|
||||
if (gflags & fz_link_flag_t_valid) {
|
||||
target.top = outline->dest.ld.gotor.lt.y;
|
||||
}
|
||||
- if (gflags & fz_link_flag_r_is_zoom) {
|
||||
- target.scale = outline->dest.ld.gotor.rb.x;
|
||||
- }
|
||||
+ /* if (gflags & fz_link_flag_r_is_zoom) { */
|
||||
+ /* target.scale = outline->dest.ld.gotor.rb.x; */
|
||||
+ /* } */
|
||||
}
|
||||
break;
|
||||
+ case FZ_LINK_LAUNCH:
|
||||
+ type = ZATHURA_LINK_LAUNCH;
|
||||
+ target.value = outline->dest.ld.launch.file_spec;
|
||||
+ break;
|
||||
+ case FZ_LINK_NAMED:
|
||||
+ type = ZATHURA_LINK_NAMED;
|
||||
+ target.value = outline->dest.ld.named.named;
|
||||
+ break;
|
||||
+ case FZ_LINK_GOTOR:
|
||||
+ type = ZATHURA_LINK_GOTO_REMOTE;
|
||||
+ target.value = outline->dest.ld.gotor.file_spec;
|
||||
+ break;
|
||||
default:
|
||||
+ outline = outline->next; // TODO: Don't skip unknown type
|
||||
continue;
|
||||
}
|
||||
|
||||
index_element->link = zathura_link_new(type, rect, target);
|
||||
if (index_element->link == NULL) {
|
||||
+ outline = outline->next;
|
||||
continue;
|
||||
}
|
||||
|
@ -1,18 +0,0 @@
|
||||
$OpenBSD: patch-links_c,v 1.1 2015/04/25 23:05:41 sthen Exp $
|
||||
|
||||
From f96dd48825c049bbccb2e25a814c49d03fedf86c Mon Sep 17 00:00:00 2001
|
||||
From: Moritz Lipp <mlq@pwmt.org>
|
||||
Date: Sun, 19 Apr 2015 10:39:02 +0200
|
||||
Subject: [PATCH] Update for 1.7 API changes
|
||||
|
||||
--- links.c.orig Thu Oct 16 23:21:41 2014
|
||||
+++ links.c Sat Apr 25 23:47:26 2015
|
||||
@@ -31,7 +31,7 @@ pdf_page_links_get(zathura_page_t* page, mupdf_page_t*
|
||||
goto error_free;
|
||||
}
|
||||
|
||||
- fz_link* link = fz_load_links(mupdf_document->document, mupdf_page->page);
|
||||
+ fz_link* link = fz_load_links(mupdf_document->ctx, mupdf_page->page);
|
||||
for (; link != NULL; link = link->next) {
|
||||
/* extract position */
|
||||
zathura_rectangle_t position;
|
@ -1,43 +1,38 @@
|
||||
$OpenBSD: patch-page_c,v 1.1 2015/04/25 23:05:41 sthen Exp $
|
||||
$OpenBSD: patch-page_c,v 1.2 2016/10/16 13:51:21 sthen Exp $
|
||||
|
||||
From f96dd48825c049bbccb2e25a814c49d03fedf86c Mon Sep 17 00:00:00 2001
|
||||
From: Moritz Lipp <mlq@pwmt.org>
|
||||
Date: Sun, 19 Apr 2015 10:39:02 +0200
|
||||
Subject: [PATCH] Update for 1.7 API changes
|
||||
From e3e49d206fbe5761c53a85b9499c940a0d718c8a Mon Sep 17 00:00:00 2001
|
||||
From: Christian Hesse <mail@eworm.de>
|
||||
Date: Thu, 28 Apr 2016 09:59:31 +0200
|
||||
Subject: [PATCH] mupdf 1.9 compatibility
|
||||
|
||||
--- page.c.orig Thu Oct 16 23:21:41 2014
|
||||
+++ page.c Sat Apr 25 23:47:26 2015
|
||||
@@ -29,12 +29,12 @@ pdf_page_init(zathura_page_t* page)
|
||||
--- page.c.orig Sun Feb 14 22:49:46 2016
|
||||
+++ page.c Sun Oct 16 13:48:04 2016
|
||||
@@ -43,12 +43,12 @@ pdf_page_init(zathura_page_t* page)
|
||||
/* setup text */
|
||||
mupdf_page->extracted_text = false;
|
||||
|
||||
/* load page */
|
||||
fz_try (mupdf_page->ctx) {
|
||||
- mupdf_page->page = fz_load_page(mupdf_document->document, index);
|
||||
+ mupdf_page->page = fz_load_page(mupdf_document->ctx, mupdf_document->document, index);
|
||||
} fz_catch (mupdf_page->ctx) {
|
||||
- mupdf_page->text = fz_new_text_page(mupdf_page->ctx);
|
||||
+ mupdf_page->text = fz_new_stext_page(mupdf_page->ctx);
|
||||
if (mupdf_page->text == NULL) {
|
||||
goto error_free;
|
||||
}
|
||||
|
||||
- fz_bound_page(mupdf_document->document, (fz_page*) mupdf_page->page, &mupdf_page->bbox);
|
||||
+ 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);
|
||||
@@ -74,15 +74,15 @@ pdf_page_clear(zathura_page_t* page, mupdf_page_t* mup
|
||||
- mupdf_page->sheet = fz_new_text_sheet(mupdf_page->ctx);
|
||||
+ mupdf_page->sheet = fz_new_stext_sheet(mupdf_page->ctx);
|
||||
if (mupdf_page->sheet == NULL) {
|
||||
goto error_free;
|
||||
}
|
||||
@@ -74,11 +74,11 @@ pdf_page_clear(zathura_page_t* page, mupdf_page_t* mup
|
||||
|
||||
if (mupdf_page != NULL) {
|
||||
if (mupdf_page->text != NULL) {
|
||||
- fz_free_text_page(mupdf_page->ctx, mupdf_page->text);
|
||||
+ fz_drop_text_page(mupdf_page->ctx, mupdf_page->text);
|
||||
- fz_drop_text_page(mupdf_page->ctx, mupdf_page->text);
|
||||
+ fz_drop_stext_page(mupdf_page->ctx, mupdf_page->text);
|
||||
}
|
||||
|
||||
if (mupdf_page->sheet != NULL) {
|
||||
- fz_free_text_sheet(mupdf_page->ctx, mupdf_page->sheet);
|
||||
+ fz_drop_text_sheet(mupdf_page->ctx, mupdf_page->sheet);
|
||||
- fz_drop_text_sheet(mupdf_page->ctx, mupdf_page->sheet);
|
||||
+ fz_drop_stext_sheet(mupdf_page->ctx, mupdf_page->sheet);
|
||||
}
|
||||
|
||||
if (mupdf_page->page != NULL) {
|
||||
- fz_free_page(mupdf_document->document, mupdf_page->page);
|
||||
+ fz_drop_page(mupdf_document->ctx, mupdf_page->page);
|
||||
}
|
||||
|
||||
free(mupdf_page);
|
||||
|
@ -1,18 +0,0 @@
|
||||
$OpenBSD: patch-plugin_c,v 1.1 2015/04/25 23:05:41 sthen Exp $
|
||||
|
||||
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] Enable EPUB support
|
||||
|
||||
--- plugin.c.orig Thu Oct 16 23:21:41 2014
|
||||
+++ plugin.c Sat Apr 25 23:56:39 2015
|
||||
@@ -32,6 +32,7 @@ ZATHURA_PLUGIN_REGISTER(
|
||||
register_functions,
|
||||
ZATHURA_PLUGIN_MIMETYPES({
|
||||
"application/pdf",
|
||||
- "application/oxps"
|
||||
+ "application/oxps",
|
||||
+ "application/epub+zip"
|
||||
})
|
||||
)
|
20
textproc/zathura/plugins/mupdf/patches/patch-plugin_h
Normal file
20
textproc/zathura/plugins/mupdf/patches/patch-plugin_h
Normal file
@ -0,0 +1,20 @@
|
||||
$OpenBSD: patch-plugin_h,v 1.1 2016/10/16 13:51:21 sthen Exp $
|
||||
|
||||
From e3e49d206fbe5761c53a85b9499c940a0d718c8a Mon Sep 17 00:00:00 2001
|
||||
From: Christian Hesse <mail@eworm.de>
|
||||
Date: Thu, 28 Apr 2016 09:59:31 +0200
|
||||
Subject: [PATCH] mupdf 1.9 compatibility
|
||||
|
||||
--- plugin.h.orig Sun Feb 14 22:49:46 2016
|
||||
+++ plugin.h Sun Oct 16 13:48:04 2016
|
||||
@@ -21,8 +21,8 @@ typedef struct mupdf_page_s
|
||||
{
|
||||
fz_page* page; /**< Reference to the mupdf page */
|
||||
fz_context* ctx; /**< Context */
|
||||
- fz_text_sheet* sheet; /**< Text sheet */
|
||||
- fz_text_page* text; /**< Page text */
|
||||
+ 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 */
|
||||
} mupdf_page_t;
|
@ -1,35 +0,0 @@
|
||||
$OpenBSD: patch-render_c,v 1.1 2015/04/25 23:05:41 sthen Exp $
|
||||
|
||||
From f96dd48825c049bbccb2e25a814c49d03fedf86c Mon Sep 17 00:00:00 2001
|
||||
From: Moritz Lipp <mlq@pwmt.org>
|
||||
Date: Sun, 19 Apr 2015 10:39:02 +0200
|
||||
Subject: [PATCH] Update for 1.7 API changes
|
||||
|
||||
--- render.c.orig Thu Oct 16 23:21:41 2014
|
||||
+++ render.c Sat Apr 25 23:47:26 2015
|
||||
@@ -26,12 +26,12 @@ pdf_page_render_to_buffer(mupdf_document_t* mupdf_docu
|
||||
fz_try (mupdf_document->ctx) {
|
||||
fz_matrix m;
|
||||
fz_scale(&m, scalex, scaley);
|
||||
- fz_run_page(mupdf_document->document, mupdf_page->page, device, &m, NULL);
|
||||
+ fz_run_page(mupdf_document->ctx, mupdf_page->page, device, &m, NULL);
|
||||
} fz_catch (mupdf_document->ctx) {
|
||||
return ZATHURA_ERROR_UNKNOWN;
|
||||
}
|
||||
|
||||
- fz_free_device(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 };
|
||||
@@ -41,8 +41,8 @@ pdf_page_render_to_buffer(mupdf_document_t* mupdf_docu
|
||||
fz_clear_pixmap_with_value(mupdf_page->ctx, pixmap, 0xFF);
|
||||
|
||||
device = fz_new_draw_device(mupdf_page->ctx, pixmap);
|
||||
- fz_run_display_list(display_list, device, &fz_identity, &rect, NULL);
|
||||
- fz_free_device(device);
|
||||
+ fz_run_display_list(mupdf_page->ctx, display_list, device, &fz_identity, &rect, NULL);
|
||||
+ fz_drop_device(mupdf_page->ctx, device);
|
||||
|
||||
unsigned char* s = fz_pixmap_samples(mupdf_page->ctx, pixmap);
|
||||
unsigned int n = fz_pixmap_components(mupdf_page->ctx, pixmap);
|
@ -1,18 +1,18 @@
|
||||
$OpenBSD: patch-search_c,v 1.1 2015/04/25 23:05:41 sthen Exp $
|
||||
$OpenBSD: patch-search_c,v 1.2 2016/10/16 13:51:21 sthen Exp $
|
||||
|
||||
From e2dbf4be4709c54d3e3859eba4ceb9cdab8e6b43 Mon Sep 17 00:00:00 2001
|
||||
From: Moritz Lipp <mlq@pwmt.org>
|
||||
Date: Thu, 20 Nov 2014 13:58:42 +0100
|
||||
Subject: [PATCH] Use correct free function for search results
|
||||
From e3e49d206fbe5761c53a85b9499c940a0d718c8a Mon Sep 17 00:00:00 2001
|
||||
From: Christian Hesse <mail@eworm.de>
|
||||
Date: Thu, 28 Apr 2016 09:59:31 +0200
|
||||
Subject: [PATCH] mupdf 1.9 compatibility
|
||||
|
||||
--- search.c.orig Thu Oct 16 23:21:41 2014
|
||||
+++ search.c Sat Apr 25 23:42:00 2015
|
||||
@@ -26,7 +26,7 @@ pdf_page_search_text(zathura_page_t* page, mupdf_page_
|
||||
--- search.c.orig Sun Feb 14 22:49:46 2016
|
||||
+++ search.c Sun Oct 16 13:48:04 2016
|
||||
@@ -40,7 +40,7 @@ pdf_page_search_text(zathura_page_t* page, mupdf_page_
|
||||
}
|
||||
|
||||
mupdf_document_t* mupdf_document = zathura_document_get_data(document);;
|
||||
fz_rect* hit_bbox = fz_malloc_array(mupdf_page->ctx, N_SEARCH_RESULTS, sizeof(fz_rect));
|
||||
- int num_results = fz_search_text_page(mupdf_page->ctx, mupdf_page->text,
|
||||
+ int num_results = fz_search_stext_page(mupdf_page->ctx, mupdf_page->text,
|
||||
(char*) text, hit_bbox, N_SEARCH_RESULTS);
|
||||
|
||||
- girara_list_t* list = girara_list_new2((girara_free_function_t) zathura_link_free);
|
||||
+ girara_list_t* list = girara_list_new2(g_free);
|
||||
if (list == NULL) {
|
||||
if (error != NULL) {
|
||||
*error = ZATHURA_ERROR_OUT_OF_MEMORY;
|
||||
for (int i = 0; i < num_results; i++) {
|
||||
|
@ -1,21 +1,18 @@
|
||||
$OpenBSD: patch-utils_c,v 1.1 2015/04/25 23:05:41 sthen Exp $
|
||||
$OpenBSD: patch-utils_c,v 1.2 2016/10/16 13:51:21 sthen Exp $
|
||||
|
||||
From f96dd48825c049bbccb2e25a814c49d03fedf86c Mon Sep 17 00:00:00 2001
|
||||
From: Moritz Lipp <mlq@pwmt.org>
|
||||
Date: Sun, 19 Apr 2015 10:39:02 +0200
|
||||
Subject: [PATCH] Update for 1.7 API changes
|
||||
From e3e49d206fbe5761c53a85b9499c940a0d718c8a Mon Sep 17 00:00:00 2001
|
||||
From: Christian Hesse <mail@eworm.de>
|
||||
Date: Thu, 28 Apr 2016 09:59:31 +0200
|
||||
Subject: [PATCH] mupdf 1.9 compatibility
|
||||
|
||||
--- utils.c.orig Thu Oct 16 23:21:41 2014
|
||||
+++ utils.c Sun Apr 26 00:02:06 2015
|
||||
@@ -17,9 +17,9 @@ mupdf_page_extract_text(mupdf_document_t* mupdf_docume
|
||||
text_device = fz_new_text_device(mupdf_page->ctx, mupdf_page->sheet, mupdf_page->text);
|
||||
fz_matrix ctm;
|
||||
fz_scale(&ctm, 1.0, 1.0);
|
||||
- fz_run_page(mupdf_document->document, mupdf_page->page, text_device, &ctm, NULL);
|
||||
+ fz_run_page(mupdf_page->ctx, mupdf_page->page, text_device, &ctm, NULL);
|
||||
} fz_always (mupdf_document->ctx) {
|
||||
- fz_free_device(text_device);
|
||||
+ fz_drop_device(mupdf_page->ctx, text_device);
|
||||
} fz_catch(mupdf_document->ctx) {
|
||||
}
|
||||
--- utils.c.orig Sun Feb 14 22:49:46 2016
|
||||
+++ utils.c Sun Oct 16 13:48:04 2016
|
||||
@@ -14,7 +14,7 @@ mupdf_page_extract_text(mupdf_document_t* mupdf_docume
|
||||
fz_device* text_device = NULL;
|
||||
|
||||
fz_try (mupdf_page->ctx) {
|
||||
- text_device = fz_new_text_device(mupdf_page->ctx, mupdf_page->sheet, mupdf_page->text);
|
||||
+ text_device = fz_new_stext_device(mupdf_page->ctx, mupdf_page->sheet, mupdf_page->text);
|
||||
|
||||
/* Disable FZ_IGNORE_IMAGE to collect image blocks */
|
||||
fz_disable_device_hints(mupdf_page->ctx, text_device, FZ_IGNORE_IMAGE);
|
||||
|
@ -1,16 +1,14 @@
|
||||
# $OpenBSD: Makefile,v 1.5 2016/02/04 18:08:17 juanfra Exp $
|
||||
# $OpenBSD: Makefile,v 1.6 2016/10/16 13:51:21 sthen Exp $
|
||||
|
||||
V = 0.2.5
|
||||
V = 0.2.6
|
||||
COMMENT = poppler pdf plugin for zathura
|
||||
DISTNAME = zathura-pdf-poppler-${V}
|
||||
REVISION = 2
|
||||
|
||||
HOMEPAGE = http://pwmt.org/projects/zathura/plugins/zathura-pdf-poppler/
|
||||
|
||||
WANTLIB += cairo gio-2.0 girara-gtk3 glib-2.0 gobject-2.0
|
||||
WANTLIB += poppler-glib
|
||||
|
||||
LIB_DEPENDS += print/poppler
|
||||
|
||||
.include <bsd.port.mk>
|
||||
WANTLIB += cairo gio-2.0 girara-gtk3 glib-2.0 gobject-2.0 intl
|
||||
WANTLIB += poppler-glib
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (zathura-pdf-poppler-0.2.5.tar.gz) = YLMnWW1lvNOe3VvwW4zKj5tlj1HmJmEeqZJHpJuGDKw=
|
||||
SIZE (zathura-pdf-poppler-0.2.5.tar.gz) = 9650
|
||||
SHA256 (zathura-pdf-poppler-0.2.6.tar.gz) = 0esMek9kfBQRkqLXv2ZBO5xfGEJGOUerh6ih7c+OWNU=
|
||||
SIZE (zathura-pdf-poppler-0.2.6.tar.gz) = 10024
|
||||
|
@ -1,15 +1,13 @@
|
||||
# $OpenBSD: Makefile,v 1.5 2016/02/04 18:08:17 juanfra Exp $
|
||||
# $OpenBSD: Makefile,v 1.6 2016/10/16 13:51:21 sthen Exp $
|
||||
|
||||
V = 0.2.2
|
||||
V = 0.2.3
|
||||
COMMENT = spectre postscript plugin for zathura
|
||||
DISTNAME = zathura-ps-${V}
|
||||
REVISION = 3
|
||||
|
||||
HOMEPAGE = http://pwmt.org/projects/zathura/plugins/zathura-ps/
|
||||
|
||||
LIB_DEPENDS += print/libspectre
|
||||
|
||||
WANTLIB += cairo girara-gtk3 glib-2.0 spectre
|
||||
WANTLIB += cairo girara-gtk3 glib-2.0 intl spectre
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (zathura-ps-0.2.2.tar.gz) = 5lRiYdsDsLa2SZqOEJ3J/zuOuLFUzkX1xihMHnbR16g=
|
||||
SIZE (zathura-ps-0.2.2.tar.gz) = 5793
|
||||
SHA256 (zathura-ps-0.2.3.tar.gz) = qe73SxKuyHrCxDCfEtD5yDsij+ZKeI7kayw6fJF3mqM=
|
||||
SIZE (zathura-ps-0.2.3.tar.gz) = 5973
|
||||
|
Loading…
Reference in New Issue
Block a user