[150686] trunk/dports/office/zathura-plugin-pdf-mupdf
devans at macports.org
devans at macports.org
Tue Jul 26 11:50:23 PDT 2016
Revision: 150686
https://trac.macports.org/changeset/150686
Author: devans at macports.org
Date: 2016-07-26 11:50:23 -0700 (Tue, 26 Jul 2016)
Log Message:
-----------
zathura-plugin-pdf-mupdf: maintainer update to version 0.3.0 (#51918, #50259).
Modified Paths:
--------------
trunk/dports/office/zathura-plugin-pdf-mupdf/Portfile
trunk/dports/office/zathura-plugin-pdf-mupdf/files/patch-Makefile.diff
trunk/dports/office/zathura-plugin-pdf-mupdf/files/patch-config.mk.diff
Added Paths:
-----------
trunk/dports/office/zathura-plugin-pdf-mupdf/files/patch-mupdf.diff
Modified: trunk/dports/office/zathura-plugin-pdf-mupdf/Portfile
===================================================================
--- trunk/dports/office/zathura-plugin-pdf-mupdf/Portfile 2016-07-26 18:06:17 UTC (rev 150685)
+++ trunk/dports/office/zathura-plugin-pdf-mupdf/Portfile 2016-07-26 18:50:23 UTC (rev 150686)
@@ -4,7 +4,7 @@
PortSystem 1.0
name zathura-plugin-pdf-mupdf
-version 0.2.8
+version 0.3.0
categories office
platforms darwin
license zlib
@@ -21,18 +21,22 @@
master_sites http://pwmt.org/projects/zathura-pdf-mupdf/download/
distname zathura-pdf-mupdf-${version}
-checksums rmd160 c5fb22a9b571ae2086e43d5f56a42f092002f2a9 \
- sha256 9f8b92762cdad14a2a587744c758edc0e1003be6a0c1511486065bdc91a66910
+checksums rmd160 377e7848a5ea7f43f020e131aacc24c51453bf8f \
+ sha256 478cb9d1562d08e096ebec4a6db9116d616a3536260197c2a28a2772171f72c8
-patchfiles patch-Makefile.diff \
+patch.pre_args -p1
+patchfiles patch-mupdf.diff \
+ patch-Makefile.diff \
patch-config.mk.diff
depends_build port:pkgconfig \
- path:lib/libmujs.a:mupdf
+ path:lib/libmupdfthird.a:mupdf
depends_lib port:desktop-file-utils \
port:mupdf \
port:openjpeg \
+ port:freetype \
+ port:harfbuzz \
path:lib/libgirara-gtk3.dylib:girara \
path:bin/zathura:zathura
@@ -48,8 +52,8 @@
LDFLAGS="[get_canonical_archflags ld]" \
VERBOSE=1
-eval destroot.env ${build.env}
-eval destroot.args ${build.args}
+destroot.env {*}${build.env}
+destroot.args {*}${build.args}
post-activate {
system "${prefix}/bin/update-desktop-database ${prefix}/share/applications"
Modified: trunk/dports/office/zathura-plugin-pdf-mupdf/files/patch-Makefile.diff
===================================================================
--- trunk/dports/office/zathura-plugin-pdf-mupdf/files/patch-Makefile.diff 2016-07-26 18:06:17 UTC (rev 150685)
+++ trunk/dports/office/zathura-plugin-pdf-mupdf/files/patch-Makefile.diff 2016-07-26 18:50:23 UTC (rev 150686)
@@ -1,6 +1,8 @@
---- Makefile.orig 2015-05-27 22:57:06.000000000 -0500
-+++ Makefile 2015-05-27 22:57:14.000000000 -0500
-@@ -18,7 +18,7 @@
+diff --git a/Makefile b/Makefile
+index 1fb42e2..423657a 100644
+--- a/Makefile
++++ b/Makefile
+@@ -18,7 +18,7 @@ CPPFLAGS += "-DVERSION_MAJOR=${VERSION_MAJOR}"
CPPFLAGS += "-DVERSION_MINOR=${VERSION_MINOR}"
CPPFLAGS += "-DVERSION_REV=${VERSION_REV}"
@@ -9,7 +11,7 @@
zathura-version-check:
ifneq ($(ZATHURA_VERSION_CHECK), 0)
-@@ -46,16 +46,16 @@
+@@ -46,19 +46,19 @@ options:
${OBJECTS}: config.mk zathura-version-check
${DOBJECTS}: config.mk zathura-version-check
@@ -19,17 +21,22 @@
- $(QUIET)${CC} -shared ${LDFLAGS} -o $@ $(OBJECTS) ${LIBS}
+ $(QUIET)${CC} -Wl,-dylib_install_name,${PLUGIN}.dylib -Wl,-bundle_loader,${PREFIX}/bin/zathura -bundle ${LDFLAGS} -o $@ $(OBJECTS) ${LIBS}
- ${PLUGIN}-debug.so: ${DOBJECTS}
+-${PLUGIN}-debug.so: ${DOBJECTS}
++${PLUGIN}-debug.dylib: ${DOBJECTS}
$(ECHO) LD $@
$(QUIET)${CC} -shared ${LDFLAGS} -o $@ $(DOBJECTS) ${LIBS}
clean:
- $(QUIET)rm -rf ${OBJECTS} ${DOBJECTS} $(PLUGIN).so $(PLUGIN)-debug.so \
-+ $(QUIET)rm -rf ${OBJECTS} ${DOBJECTS} $(PLUGIN).dylib $(PLUGIN)-debug.so \
++ $(QUIET)rm -rf ${OBJECTS} ${DOBJECTS} $(PLUGIN).dylib $(PLUGIN)-debug.dylib \
doc .depend ${PROJECT}-${VERSION}.tar.gz zathura-version-check
- debug: options ${PLUGIN}-debug.so
-@@ -75,18 +75,18 @@
+-debug: options ${PLUGIN}-debug.so
++debug: options ${PLUGIN}-debug.dylib
+
+ dist: clean
+ $(QUIET)mkdir -p ${PROJECT}-${VERSION}
+@@ -75,18 +75,18 @@ doc: clean
install: all
$(ECHO) installing ${PLUGIN} plugin
$(QUIET)mkdir -p ${DESTDIR}${PLUGINDIR}
@@ -44,11 +51,11 @@
- $(QUIET)rm -f ${DESTDIR}${PLUGINDIR}/${PLUGIN}.so
- $(QUIET)rmdir --ignore-fail-on-non-empty ${DESTDIR}${PLUGINDIR} 2> /dev/null
+ $(QUIET)rm -f ${DESTDIR}${PLUGINDIR}/${PLUGIN}.dylib
-+ $(QUIET)-rmdir ${DESTDIR}${PLUGINDIR} 2> /dev/null
++ $(QUIET)rmdir ${DESTDIR}${PLUGINDIR} 2> /dev/null
$(ECHO) removing desktop file
$(QUIET)rm -f ${DESTDIR}${DESKTOPPREFIX}/${PROJECT}.desktop
- $(QUIET)rmdir --ignore-fail-on-non-empty ${DESTDIR}${DESKTOPPREFIX} 2> /dev/null
-+ $(QUIET)-rmdir ${DESTDIR}${DESKTOPPREFIX} 2> /dev/null
++ $(QUIET)rmdir ${DESTDIR}${DESKTOPPREFIX} 2> /dev/null
-include $(wildcard .depend/*.dep)
Modified: trunk/dports/office/zathura-plugin-pdf-mupdf/files/patch-config.mk.diff
===================================================================
--- trunk/dports/office/zathura-plugin-pdf-mupdf/files/patch-config.mk.diff 2016-07-26 18:06:17 UTC (rev 150685)
+++ trunk/dports/office/zathura-plugin-pdf-mupdf/files/patch-config.mk.diff 2016-07-26 18:50:23 UTC (rev 150686)
@@ -1,11 +1,23 @@
---- config.mk.original 2015-05-27 23:48:00.000000000 -0500
-+++ config.mk 2015-05-27 23:48:07.000000000 -0500
-@@ -35,7 +35,7 @@
- MUPDF_LIB ?= -lmupdf -lmujs
+diff --git a/config.mk b/config.mk
+index 6407ae6..404f4f1 100644
+--- a/config.mk
++++ b/config.mk
+@@ -32,10 +32,16 @@ endif
+ OPENSSL_INC ?= $(shell pkg-config --cflags libcrypto)
+ OPENSSL_LIB ?= $(shell pkg-config --libs libcrypto)
- INCS = ${GTK_INC} ${GIRARA_INC} ${OPENSSL_INC} ${ZATHURA_INC}
++FREETYPE_INC ?= $(shell pkg-config --cflags freetype2)
++FREETYPE_LIB ?= $(shell pkg-config --libs freetype2)
++
++HARFBUZZ_INC ?= $(shell pkg-config --cflags harfbuzz)
++HARFBUZZ_LIB ?= $(shell pkg-config --libs harfbuzz)
++
+ 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
-+LIBS = ${GTK_LIB} ${GIRARA_LIB} ${MUPDF_LIB} ${OPENSSL_LIB} -ljbig2dec -lopenjp2 -ljpeg -lz
++INCS = ${GTK_INC} ${GIRARA_INC} ${OPENSSL_INC} ${ZATHURA_INC} ${FREETYPE_INC} ${HARFBUZZ_INC}
++LIBS = ${GTK_LIB} ${GIRARA_LIB} ${MUPDF_LIB} ${OPENSSL_LIB} ${FREETYPE_LIB} ${HARFBUZZ_LIB} -ljbig2dec -lopenjp2 -ljpeg -lz
- # flags
+ # compiler flags
CFLAGS += -std=c99 -fPIC -pedantic -Wall -Wno-format-zero-length $(INCS)
Added: trunk/dports/office/zathura-plugin-pdf-mupdf/files/patch-mupdf.diff
===================================================================
--- trunk/dports/office/zathura-plugin-pdf-mupdf/files/patch-mupdf.diff (rev 0)
+++ trunk/dports/office/zathura-plugin-pdf-mupdf/files/patch-mupdf.diff 2016-07-26 18:50:23 UTC (rev 150686)
@@ -0,0 +1,129 @@
+diff --git a/AUTHORS b/AUTHORS
+index f5f8430..371ebf1 100644
+--- a/AUTHORS
++++ b/AUTHORS
+@@ -5,5 +5,6 @@ Sebastian Ramacher <s.ramacher at gmx.at>
+
+ Other contributors are (in alphabetical order):
+
++Christian Hesse <mail at eworm.de>
+ Pavel Borzenkov <pavel.borzenkov at gmail.com>
+ William Skeith <wes at cs.ccny.cuny.edu>
+diff --git a/config.mk b/config.mk
+index cba8d40..6407ae6 100644
+--- a/config.mk
++++ b/config.mk
+@@ -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
+diff --git a/document.c b/document.c
+index 873866c..8d0aae4 100644
+--- a/document.c
++++ b/document.c
+@@ -109,12 +109,7 @@ pdf_document_save_as(zathura_document_t* document, mupdf_document_t*
+ }
+
+ fz_try (mupdf_document->ctx) {
+- /* fz_write_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->ctx, mupdf_document->document, (char*) path, &opts);
++ pdf_save_document(mupdf_document->ctx, (pdf_document*) mupdf_document->document, (char*) path, NULL);
+ } fz_catch (mupdf_document->ctx) {
+ return ZATHURA_ERROR_UNKNOWN;
+ }
+diff --git a/image.c b/image.c
+index 97d4143..8f6912b 100644
+--- a/image.c
++++ b/image.c
+@@ -93,7 +93,7 @@ pdf_page_image_get_cairo(zathura_page_t* page, mupdf_page_t* mupdf_page,
+ fz_pixmap* pixmap = NULL;
+ cairo_surface_t* surface = 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;
+ }
+diff --git a/page.c b/page.c
+index beb0351..219fc2a 100644
+--- a/page.c
++++ b/page.c
+@@ -43,12 +43,12 @@ pdf_page_init(zathura_page_t* page)
+ /* setup text */
+ mupdf_page->extracted_text = false;
+
+- 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;
+ }
+
+- 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* mupdf_page)
+
+ if (mupdf_page != NULL) {
+ if (mupdf_page->text != NULL) {
+- 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_drop_text_sheet(mupdf_page->ctx, mupdf_page->sheet);
++ fz_drop_stext_sheet(mupdf_page->ctx, mupdf_page->sheet);
+ }
+
+ if (mupdf_page->page != NULL) {
+diff --git a/plugin.h b/plugin.h
+index f2fb4a0..84c5e53 100644
+--- a/plugin.h
++++ b/plugin.h
+@@ -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;
+diff --git a/search.c b/search.c
+index 3a9fad4..c672b9f 100644
+--- a/search.c
++++ b/search.c
+@@ -40,7 +40,7 @@ pdf_page_search_text(zathura_page_t* page, mupdf_page_t* mupdf_page, const char*
+ }
+
+ 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);
+
+ for (int i = 0; i < num_results; i++) {
+diff --git a/utils.c b/utils.c
+index 4a003b9..a4b9320 100644
+--- a/utils.c
++++ b/utils.c
+@@ -14,7 +14,7 @@ mupdf_page_extract_text(mupdf_document_t* mupdf_document, mupdf_page_t* mupdf_pa
+ 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);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160726/4c5628e4/attachment-0001.html>
More information about the macports-changes
mailing list