[arch-commits] Commit in zathura-pdf-mupdf/repos (8 files)
Johannes Löthberg
demize at archlinux.org
Tue Aug 30 07:51:11 UTC 2016
Date: Tuesday, August 30, 2016 @ 07:51:10
Author: demize
Revision: 188024
archrelease: copy trunk to community-i686, community-x86_64
Added:
zathura-pdf-mupdf/repos/community-i686/PKGBUILD
(from rev 188023, zathura-pdf-mupdf/trunk/PKGBUILD)
zathura-pdf-mupdf/repos/community-i686/mupdf-1.9.patch
(from rev 188023, zathura-pdf-mupdf/trunk/mupdf-1.9.patch)
zathura-pdf-mupdf/repos/community-x86_64/PKGBUILD
(from rev 188023, zathura-pdf-mupdf/trunk/PKGBUILD)
zathura-pdf-mupdf/repos/community-x86_64/mupdf-1.9.patch
(from rev 188023, zathura-pdf-mupdf/trunk/mupdf-1.9.patch)
Deleted:
zathura-pdf-mupdf/repos/community-i686/PKGBUILD
zathura-pdf-mupdf/repos/community-i686/mupdf-1.9.patch
zathura-pdf-mupdf/repos/community-x86_64/PKGBUILD
zathura-pdf-mupdf/repos/community-x86_64/mupdf-1.9.patch
----------------------------------+
/PKGBUILD | 74 +++++++++
/mupdf-1.9.patch | 302 +++++++++++++++++++++++++++++++++++++
community-i686/PKGBUILD | 37 ----
community-i686/mupdf-1.9.patch | 151 ------------------
community-x86_64/PKGBUILD | 37 ----
community-x86_64/mupdf-1.9.patch | 151 ------------------
6 files changed, 376 insertions(+), 376 deletions(-)
Deleted: community-i686/PKGBUILD
===================================================================
--- community-i686/PKGBUILD 2016-08-30 07:50:52 UTC (rev 188023)
+++ community-i686/PKGBUILD 2016-08-30 07:51:10 UTC (rev 188024)
@@ -1,37 +0,0 @@
-# $Id$
-# Maintainer: Johannes Löthberg <johannes at kyriasis.com>
-# Contributor: Daniel Wallace <danielwallace at gtmanfred dot com>
-# Contributor: Sergej Pupykin <pupykin.s+arch at gmail.com>
-# Contributor: Moritz Lipp <mlq at pwmt.org>
-
-pkgname=zathura-pdf-mupdf
-pkgver=0.3.0
-pkgrel=2
-
-pkgdesc="PDF support for Zathura (MuPDF backend)"
-url="https://pwmt.org/projects/zathura-pdf-mupdf/"
-arch=('i686' 'x86_64')
-license=('zlib')
-
-conflicts=('zathura-pdf-poppler')
-
-depends=('zathura' 'jbig2dec' 'openjpeg2' 'cairo' 'desktop-file-utils')
-makedepends=('libmupdf>=1.9')
-
-source=(https://pwmt.org/projects/zathura/plugins/download/zathura-pdf-mupdf-$pkgver.tar.gz
- mupdf-1.9.patch)
-sha1sums=('ae0be41ea7c75b8ddc083fe01f1366673ea9751a'
- 'f26adb3a7c69cf7a2e957d211e8faffe79c923c7')
-
-prepare() {
- patch -d zathura-pdf-mupdf-$pkgver -Np1 < mupdf-1.9.patch
-}
-
-build() {
- make -C zathura-pdf-mupdf-$pkgver MUPDF_LIB="-lmupdf -lmupdfthird"
-}
-
-package(){
- make -C zathura-pdf-mupdf-$pkgver DESTDIR="$pkgdir" install
- install -Dm0644 zathura-pdf-mupdf-$pkgver/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
-}
Copied: zathura-pdf-mupdf/repos/community-i686/PKGBUILD (from rev 188023, zathura-pdf-mupdf/trunk/PKGBUILD)
===================================================================
--- community-i686/PKGBUILD (rev 0)
+++ community-i686/PKGBUILD 2016-08-30 07:51:10 UTC (rev 188024)
@@ -0,0 +1,37 @@
+# $Id$
+# Maintainer: Johannes Löthberg <johannes at kyriasis.com>
+# Contributor: Daniel Wallace <danielwallace at gtmanfred dot com>
+# Contributor: Sergej Pupykin <pupykin.s+arch at gmail.com>
+# Contributor: Moritz Lipp <mlq at pwmt.org>
+
+pkgname=zathura-pdf-mupdf
+pkgver=0.3.0
+pkgrel=3
+
+pkgdesc="PDF support for Zathura (MuPDF backend)"
+url="https://pwmt.org/projects/zathura-pdf-mupdf/"
+arch=('i686' 'x86_64')
+license=('zlib')
+
+conflicts=('zathura-pdf-poppler')
+
+depends=('zathura' 'jbig2dec' 'openjpeg2' 'cairo' 'desktop-file-utils')
+makedepends=('libmupdf')
+
+source=(https://pwmt.org/projects/zathura/plugins/download/zathura-pdf-mupdf-$pkgver.tar.gz
+ mupdf-1.9.patch)
+sha1sums=('ae0be41ea7c75b8ddc083fe01f1366673ea9751a'
+ 'f26adb3a7c69cf7a2e957d211e8faffe79c923c7')
+
+prepare() {
+ patch -d zathura-pdf-mupdf-$pkgver -Np1 < mupdf-1.9.patch
+}
+
+build() {
+ make -C zathura-pdf-mupdf-$pkgver MUPDF_LIB="-lmupdf -lmupdfthird"
+}
+
+package(){
+ make -C zathura-pdf-mupdf-$pkgver DESTDIR="$pkgdir" install
+ install -Dm0644 zathura-pdf-mupdf-$pkgver/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
Deleted: community-i686/mupdf-1.9.patch
===================================================================
--- community-i686/mupdf-1.9.patch 2016-08-30 07:50:52 UTC (rev 188023)
+++ community-i686/mupdf-1.9.patch 2016-08-30 07:51:10 UTC (rev 188024)
@@ -1,151 +0,0 @@
-From 368e80b59a7b2f330ad9bd7de45c350c6fbb2209 Mon Sep 17 00:00:00 2001
-From: Christian Hesse <mail at eworm.de>
-Date: Mon, 18 Apr 2016 15:23:07 +0200
-Subject: [PATCH 1/1] update API for mupdf 1.9
-
-Signed-off-by: Christian Hesse <mail at eworm.de>
----
- AUTHORS | 1 +
- config.mk | 2 +-
- document.c | 6 +++---
- image.c | 2 +-
- page.c | 8 ++++----
- plugin.h | 4 ++--
- search.c | 2 +-
- utils.c | 2 +-
- 8 files changed, 14 insertions(+), 13 deletions(-)
-
-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..548f4ff 100644
---- a/document.c
-+++ b/document.c
-@@ -109,12 +109,12 @@ 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_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->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;
- }
-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);
---
-2.8.0
-
Copied: zathura-pdf-mupdf/repos/community-i686/mupdf-1.9.patch (from rev 188023, zathura-pdf-mupdf/trunk/mupdf-1.9.patch)
===================================================================
--- community-i686/mupdf-1.9.patch (rev 0)
+++ community-i686/mupdf-1.9.patch 2016-08-30 07:51:10 UTC (rev 188024)
@@ -0,0 +1,151 @@
+From 368e80b59a7b2f330ad9bd7de45c350c6fbb2209 Mon Sep 17 00:00:00 2001
+From: Christian Hesse <mail at eworm.de>
+Date: Mon, 18 Apr 2016 15:23:07 +0200
+Subject: [PATCH 1/1] update API for mupdf 1.9
+
+Signed-off-by: Christian Hesse <mail at eworm.de>
+---
+ AUTHORS | 1 +
+ config.mk | 2 +-
+ document.c | 6 +++---
+ image.c | 2 +-
+ page.c | 8 ++++----
+ plugin.h | 4 ++--
+ search.c | 2 +-
+ utils.c | 2 +-
+ 8 files changed, 14 insertions(+), 13 deletions(-)
+
+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..548f4ff 100644
+--- a/document.c
++++ b/document.c
+@@ -109,12 +109,12 @@ 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_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->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;
+ }
+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);
+--
+2.8.0
+
Deleted: community-x86_64/PKGBUILD
===================================================================
--- community-x86_64/PKGBUILD 2016-08-30 07:50:52 UTC (rev 188023)
+++ community-x86_64/PKGBUILD 2016-08-30 07:51:10 UTC (rev 188024)
@@ -1,37 +0,0 @@
-# $Id$
-# Maintainer: Johannes Löthberg <johannes at kyriasis.com>
-# Contributor: Daniel Wallace <danielwallace at gtmanfred dot com>
-# Contributor: Sergej Pupykin <pupykin.s+arch at gmail.com>
-# Contributor: Moritz Lipp <mlq at pwmt.org>
-
-pkgname=zathura-pdf-mupdf
-pkgver=0.3.0
-pkgrel=2
-
-pkgdesc="PDF support for Zathura (MuPDF backend)"
-url="https://pwmt.org/projects/zathura-pdf-mupdf/"
-arch=('i686' 'x86_64')
-license=('zlib')
-
-conflicts=('zathura-pdf-poppler')
-
-depends=('zathura' 'jbig2dec' 'openjpeg2' 'cairo' 'desktop-file-utils')
-makedepends=('libmupdf>=1.9')
-
-source=(https://pwmt.org/projects/zathura/plugins/download/zathura-pdf-mupdf-$pkgver.tar.gz
- mupdf-1.9.patch)
-sha1sums=('ae0be41ea7c75b8ddc083fe01f1366673ea9751a'
- 'f26adb3a7c69cf7a2e957d211e8faffe79c923c7')
-
-prepare() {
- patch -d zathura-pdf-mupdf-$pkgver -Np1 < mupdf-1.9.patch
-}
-
-build() {
- make -C zathura-pdf-mupdf-$pkgver MUPDF_LIB="-lmupdf -lmupdfthird"
-}
-
-package(){
- make -C zathura-pdf-mupdf-$pkgver DESTDIR="$pkgdir" install
- install -Dm0644 zathura-pdf-mupdf-$pkgver/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
-}
Copied: zathura-pdf-mupdf/repos/community-x86_64/PKGBUILD (from rev 188023, zathura-pdf-mupdf/trunk/PKGBUILD)
===================================================================
--- community-x86_64/PKGBUILD (rev 0)
+++ community-x86_64/PKGBUILD 2016-08-30 07:51:10 UTC (rev 188024)
@@ -0,0 +1,37 @@
+# $Id$
+# Maintainer: Johannes Löthberg <johannes at kyriasis.com>
+# Contributor: Daniel Wallace <danielwallace at gtmanfred dot com>
+# Contributor: Sergej Pupykin <pupykin.s+arch at gmail.com>
+# Contributor: Moritz Lipp <mlq at pwmt.org>
+
+pkgname=zathura-pdf-mupdf
+pkgver=0.3.0
+pkgrel=3
+
+pkgdesc="PDF support for Zathura (MuPDF backend)"
+url="https://pwmt.org/projects/zathura-pdf-mupdf/"
+arch=('i686' 'x86_64')
+license=('zlib')
+
+conflicts=('zathura-pdf-poppler')
+
+depends=('zathura' 'jbig2dec' 'openjpeg2' 'cairo' 'desktop-file-utils')
+makedepends=('libmupdf')
+
+source=(https://pwmt.org/projects/zathura/plugins/download/zathura-pdf-mupdf-$pkgver.tar.gz
+ mupdf-1.9.patch)
+sha1sums=('ae0be41ea7c75b8ddc083fe01f1366673ea9751a'
+ 'f26adb3a7c69cf7a2e957d211e8faffe79c923c7')
+
+prepare() {
+ patch -d zathura-pdf-mupdf-$pkgver -Np1 < mupdf-1.9.patch
+}
+
+build() {
+ make -C zathura-pdf-mupdf-$pkgver MUPDF_LIB="-lmupdf -lmupdfthird"
+}
+
+package(){
+ make -C zathura-pdf-mupdf-$pkgver DESTDIR="$pkgdir" install
+ install -Dm0644 zathura-pdf-mupdf-$pkgver/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
Deleted: community-x86_64/mupdf-1.9.patch
===================================================================
--- community-x86_64/mupdf-1.9.patch 2016-08-30 07:50:52 UTC (rev 188023)
+++ community-x86_64/mupdf-1.9.patch 2016-08-30 07:51:10 UTC (rev 188024)
@@ -1,151 +0,0 @@
-From 368e80b59a7b2f330ad9bd7de45c350c6fbb2209 Mon Sep 17 00:00:00 2001
-From: Christian Hesse <mail at eworm.de>
-Date: Mon, 18 Apr 2016 15:23:07 +0200
-Subject: [PATCH 1/1] update API for mupdf 1.9
-
-Signed-off-by: Christian Hesse <mail at eworm.de>
----
- AUTHORS | 1 +
- config.mk | 2 +-
- document.c | 6 +++---
- image.c | 2 +-
- page.c | 8 ++++----
- plugin.h | 4 ++--
- search.c | 2 +-
- utils.c | 2 +-
- 8 files changed, 14 insertions(+), 13 deletions(-)
-
-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..548f4ff 100644
---- a/document.c
-+++ b/document.c
-@@ -109,12 +109,12 @@ 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_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->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;
- }
-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);
---
-2.8.0
-
Copied: zathura-pdf-mupdf/repos/community-x86_64/mupdf-1.9.patch (from rev 188023, zathura-pdf-mupdf/trunk/mupdf-1.9.patch)
===================================================================
--- community-x86_64/mupdf-1.9.patch (rev 0)
+++ community-x86_64/mupdf-1.9.patch 2016-08-30 07:51:10 UTC (rev 188024)
@@ -0,0 +1,151 @@
+From 368e80b59a7b2f330ad9bd7de45c350c6fbb2209 Mon Sep 17 00:00:00 2001
+From: Christian Hesse <mail at eworm.de>
+Date: Mon, 18 Apr 2016 15:23:07 +0200
+Subject: [PATCH 1/1] update API for mupdf 1.9
+
+Signed-off-by: Christian Hesse <mail at eworm.de>
+---
+ AUTHORS | 1 +
+ config.mk | 2 +-
+ document.c | 6 +++---
+ image.c | 2 +-
+ page.c | 8 ++++----
+ plugin.h | 4 ++--
+ search.c | 2 +-
+ utils.c | 2 +-
+ 8 files changed, 14 insertions(+), 13 deletions(-)
+
+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..548f4ff 100644
+--- a/document.c
++++ b/document.c
+@@ -109,12 +109,12 @@ 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_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->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;
+ }
+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);
+--
+2.8.0
+
More information about the arch-commits
mailing list