[arch-commits] Commit in mupdf/repos/community-x86_64 (12 files)

Christian Hesse eworm at archlinux.org
Wed Dec 13 16:11:25 UTC 2017


    Date: Wednesday, December 13, 2017 @ 16:11:22
  Author: eworm
Revision: 274227

archrelease: copy trunk to community-x86_64

Added:
  mupdf/repos/community-x86_64/0001-mupdf-openjpeg.patch
    (from rev 274226, mupdf/trunk/0001-mupdf-openjpeg.patch)
  mupdf/repos/community-x86_64/PKGBUILD
    (from rev 274226, mupdf/trunk/PKGBUILD)
  mupdf/repos/community-x86_64/mupdf.desktop
    (from rev 274226, mupdf/trunk/mupdf.desktop)
  mupdf/repos/community-x86_64/mupdf.xpm
    (from rev 274226, mupdf/trunk/mupdf.xpm)
Deleted:
  mupdf/repos/community-x86_64/0001-mupdf-openjpeg.patch
  mupdf/repos/community-x86_64/0002-Fix-698558-Handle-non-tags-in-tag-name-comparisons.patch
  mupdf/repos/community-x86_64/0003-Fix-698539-Do-not-use-xps-font-if-it-could-not-be-loaded.patch
  mupdf/repos/community-x86_64/0004-Check-for-integer-overflow-when-validating-new-style-xref-Index.patch
  mupdf/repos/community-x86_64/0005-Fix-698540-Check-name-comment-and-meta-size-field-signs.patch
  mupdf/repos/community-x86_64/PKGBUILD
  mupdf/repos/community-x86_64/mupdf.desktop
  mupdf/repos/community-x86_64/mupdf.xpm

----------------------------------------------------------------------------+
 0001-mupdf-openjpeg.patch                                                  |   70 +-
 0002-Fix-698558-Handle-non-tags-in-tag-name-comparisons.patch              |  122 ----
 0003-Fix-698539-Do-not-use-xps-font-if-it-could-not-be-loaded.patch        |   26 
 0004-Check-for-integer-overflow-when-validating-new-style-xref-Index.patch |   25 
 0005-Fix-698540-Check-name-comment-and-meta-size-field-signs.patch         |   26 
 PKGBUILD                                                                   |  279 ++++------
 mupdf.desktop                                                              |   30 -
 7 files changed, 175 insertions(+), 403 deletions(-)

Deleted: 0001-mupdf-openjpeg.patch
===================================================================
--- 0001-mupdf-openjpeg.patch	2017-12-13 16:11:13 UTC (rev 274226)
+++ 0001-mupdf-openjpeg.patch	2017-12-13 16:11:22 UTC (rev 274227)
@@ -1,35 +0,0 @@
-diff --git a/source/fitz/load-jpx.c b/source/fitz/load-jpx.c
-index d01de58..6ca3838 100644
---- a/source/fitz/load-jpx.c
-+++ b/source/fitz/load-jpx.c
-@@ -444,14 +444,18 @@ fz_load_jpx_info(fz_context *ctx, unsigned char *data, size_t size, int *wp, int
- 
- #else /* HAVE_LURATECH */
- 
-+#ifdef __cplusplus
-+extern "C"
-+{
- #define OPJ_STATIC
- #define OPJ_HAVE_INTTYPES_H
- #if !defined(_WIN32) && !defined(_WIN64)
- #define OPJ_HAVE_STDINT_H
- #endif
-+#endif
- #define USE_JPIP
- 
--#include <openjpeg.h>
-+#include <openjpeg-__OPENJPEG__VERSION__/openjpeg.h>
- 
- struct fz_jpxd_s
- {
-@@ -919,6 +923,10 @@ fz_load_jpx_info(fz_context *ctx, unsigned char *data, size_t size, int *wp, int
- 	*yresp = state.yres;
- }
- 
-+#ifdef __cplusplus
-+}
-+#endif
-+
- #endif /* HAVE_LURATECH */
- 
- #else /* FZ_ENABLE_JPX */

Copied: mupdf/repos/community-x86_64/0001-mupdf-openjpeg.patch (from rev 274226, mupdf/trunk/0001-mupdf-openjpeg.patch)
===================================================================
--- 0001-mupdf-openjpeg.patch	                        (rev 0)
+++ 0001-mupdf-openjpeg.patch	2017-12-13 16:11:22 UTC (rev 274227)
@@ -0,0 +1,35 @@
+diff --git a/source/fitz/load-jpx.c b/source/fitz/load-jpx.c
+index 65699ba..5f36221 100644
+--- a/source/fitz/load-jpx.c
++++ b/source/fitz/load-jpx.c
+@@ -445,14 +445,18 @@ fz_load_jpx_info(fz_context *ctx, const unsigned char *data, size_t size, int *w
+ 
+ #else /* HAVE_LURATECH */
+ 
++#ifdef __cplusplus
++extern "C"
++{
+ #define OPJ_STATIC
+ #define OPJ_HAVE_INTTYPES_H
+ #if !defined(_MSC_VER) || _MSC_VER >= 1600
+ #define OPJ_HAVE_STDINT_H
+ #endif
++#endif
+ #define USE_JPIP
+ 
+-#include <openjpeg.h>
++#include <openjpeg-__OPENJPEG__VERSION__/openjpeg.h>
+ 
+ struct fz_jpxd_s
+ {
+@@ -930,6 +934,10 @@ fz_load_jpx_info(fz_context *ctx, const unsigned char *data, size_t size, int *w
+ 	*yresp = state.yres;
+ }
+ 
++#ifdef __cplusplus
++}
++#endif
++
+ #endif /* HAVE_LURATECH */
+ 
+ #else /* FZ_ENABLE_JPX */

Deleted: 0002-Fix-698558-Handle-non-tags-in-tag-name-comparisons.patch
===================================================================
--- 0002-Fix-698558-Handle-non-tags-in-tag-name-comparisons.patch	2017-12-13 16:11:13 UTC (rev 274226)
+++ 0002-Fix-698558-Handle-non-tags-in-tag-name-comparisons.patch	2017-12-13 16:11:22 UTC (rev 274227)
@@ -1,122 +0,0 @@
-From 2b16dbd8f73269cb15ca61ece75cf8d2d196ed28 Mon Sep 17 00:00:00 2001
-From: Tor Andersson <tor.andersson at artifex.com>
-Date: Tue, 19 Sep 2017 17:17:12 +0200
-Subject: Fix 698558: Handle non-tags in tag name comparisons.
-
-Use fz_xml_is_tag instead of fz_xml_tag && !strcmp idiom.
----
- source/html/css-apply.c   | 2 +-
- source/svg/svg-run.c      | 2 +-
- source/xps/xps-common.c   | 6 +++---
- source/xps/xps-glyphs.c   | 2 +-
- source/xps/xps-path.c     | 4 ++--
- source/xps/xps-resource.c | 2 +-
- 6 files changed, 9 insertions(+), 9 deletions(-)
-
-diff --git a/source/html/css-apply.c b/source/html/css-apply.c
-index de554908..6a91df0d 100644
---- a/source/html/css-apply.c
-+++ b/source/html/css-apply.c
-@@ -328,7 +328,7 @@ match_selector(fz_css_selector *sel, fz_xml *node)
- 
- 	if (sel->name)
- 	{
--		if (strcmp(sel->name, fz_xml_tag(node)))
-+		if (!fz_xml_is_tag(node, sel->name))
- 			return 0;
- 	}
- 
-diff --git a/source/svg/svg-run.c b/source/svg/svg-run.c
-index f974c675..5302c640 100644
---- a/source/svg/svg-run.c
-+++ b/source/svg/svg-run.c
-@@ -1044,7 +1044,7 @@ svg_run_use(fz_context *ctx, fz_device *dev, svg_document *doc, fz_xml *root, co
- 		fz_xml *linked = fz_tree_lookup(ctx, doc->idmap, xlink_href_att + 1);
- 		if (linked)
- 		{
--			if (!strcmp(fz_xml_tag(linked), "symbol"))
-+			if (fz_xml_is_tag(linked, "symbol"))
- 				svg_run_use_symbol(ctx, dev, doc, root, linked, &local_state);
- 			else
- 				svg_run_element(ctx, dev, doc, linked, &local_state);
-diff --git a/source/xps/xps-common.c b/source/xps/xps-common.c
-index cc7fed94..f2f9b93c 100644
---- a/source/xps/xps-common.c
-+++ b/source/xps/xps-common.c
-@@ -47,7 +47,7 @@ xps_parse_brush(fz_context *ctx, xps_document *doc, const fz_matrix *ctm, const
- 	else if (fz_xml_is_tag(node, "RadialGradientBrush"))
- 		xps_parse_radial_gradient_brush(ctx, doc, ctm, area, base_uri, dict, node);
- 	else
--		fz_warn(ctx, "unknown brush tag: %s", fz_xml_tag(node));
-+		fz_warn(ctx, "unknown brush tag");
- }
- 
- void
-@@ -85,7 +85,7 @@ xps_begin_opacity(fz_context *ctx, xps_document *doc, const fz_matrix *ctm, cons
- 	if (opacity_att)
- 		opacity = fz_atof(opacity_att);
- 
--	if (opacity_mask_tag && !strcmp(fz_xml_tag(opacity_mask_tag), "SolidColorBrush"))
-+	if (fz_xml_is_tag(opacity_mask_tag, "SolidColorBrush"))
- 	{
- 		char *scb_opacity_att = fz_xml_att(opacity_mask_tag, "Opacity");
- 		char *scb_color_att = fz_xml_att(opacity_mask_tag, "Color");
-@@ -129,7 +129,7 @@ xps_end_opacity(fz_context *ctx, xps_document *doc, char *base_uri, xps_resource
- 
- 	if (opacity_mask_tag)
- 	{
--		if (strcmp(fz_xml_tag(opacity_mask_tag), "SolidColorBrush"))
-+		if (!fz_xml_is_tag(opacity_mask_tag, "SolidColorBrush"))
- 			fz_pop_clip(ctx, dev);
- 	}
- }
-diff --git a/source/xps/xps-glyphs.c b/source/xps/xps-glyphs.c
-index 29dc5b39..5b26d780 100644
---- a/source/xps/xps-glyphs.c
-+++ b/source/xps/xps-glyphs.c
-@@ -592,7 +592,7 @@ xps_parse_glyphs(fz_context *ctx, xps_document *doc, const fz_matrix *ctm,
- 
- 	/* If it's a solid color brush fill/stroke do a simple fill */
- 
--	if (fill_tag && !strcmp(fz_xml_tag(fill_tag), "SolidColorBrush"))
-+	if (fz_xml_is_tag(fill_tag, "SolidColorBrush"))
- 	{
- 		fill_opacity_att = fz_xml_att(fill_tag, "Opacity");
- 		fill_att = fz_xml_att(fill_tag, "Color");
-diff --git a/source/xps/xps-path.c b/source/xps/xps-path.c
-index 6faeb0ca..021d2021 100644
---- a/source/xps/xps-path.c
-+++ b/source/xps/xps-path.c
-@@ -879,14 +879,14 @@ xps_parse_path(fz_context *ctx, xps_document *doc, const fz_matrix *ctm, char *b
- 	if (!data_att && !data_tag)
- 		return;
- 
--	if (fill_tag && !strcmp(fz_xml_tag(fill_tag), "SolidColorBrush"))
-+	if (fz_xml_is_tag(fill_tag, "SolidColorBrush"))
- 	{
- 		fill_opacity_att = fz_xml_att(fill_tag, "Opacity");
- 		fill_att = fz_xml_att(fill_tag, "Color");
- 		fill_tag = NULL;
- 	}
- 
--	if (stroke_tag && !strcmp(fz_xml_tag(stroke_tag), "SolidColorBrush"))
-+	if (fz_xml_is_tag(stroke_tag, "SolidColorBrush"))
- 	{
- 		stroke_opacity_att = fz_xml_att(stroke_tag, "Opacity");
- 		stroke_att = fz_xml_att(stroke_tag, "Color");
-diff --git a/source/xps/xps-resource.c b/source/xps/xps-resource.c
-index c2292e60..8e81ab83 100644
---- a/source/xps/xps-resource.c
-+++ b/source/xps/xps-resource.c
-@@ -84,7 +84,7 @@ xps_parse_remote_resource_dictionary(fz_context *ctx, xps_document *doc, char *b
- 	if (!xml)
- 		return NULL;
- 
--	if (strcmp(fz_xml_tag(xml), "ResourceDictionary"))
-+	if (!fz_xml_is_tag(xml, "ResourceDictionary"))
- 	{
- 		fz_drop_xml(ctx, xml);
- 		fz_throw(ctx, FZ_ERROR_GENERIC, "expected ResourceDictionary element");
--- 
-cgit v1.1-22-g1649
-

Deleted: 0003-Fix-698539-Do-not-use-xps-font-if-it-could-not-be-loaded.patch
===================================================================
--- 0003-Fix-698539-Do-not-use-xps-font-if-it-could-not-be-loaded.patch	2017-12-13 16:11:13 UTC (rev 274226)
+++ 0003-Fix-698539-Do-not-use-xps-font-if-it-could-not-be-loaded.patch	2017-12-13 16:11:22 UTC (rev 274227)
@@ -1,26 +0,0 @@
-From ab1a420613dec93c686acbee2c165274e922f82a Mon Sep 17 00:00:00 2001
-From: Tor Andersson <tor.andersson at artifex.com>
-Date: Tue, 19 Sep 2017 15:23:04 +0200
-Subject: Fix 698539: Don't use xps font if it could not be loaded.
-
-xps_load_links_in_glyphs did not cope with font loading failures.
----
- source/xps/xps-link.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/source/xps/xps-link.c b/source/xps/xps-link.c
-index c07e0d76..c26a8d99 100644
---- a/source/xps/xps-link.c
-+++ b/source/xps/xps-link.c
-@@ -91,6 +91,8 @@ xps_load_links_in_glyphs(fz_context *ctx, xps_document *doc, const fz_matrix *ct
- 			bidi_level = atoi(bidi_level_att);
- 
- 		font = xps_lookup_font(ctx, doc, base_uri, font_uri_att, style_att);
-+		if (!font)
-+			return;
- 		text = xps_parse_glyphs_imp(ctx, doc, &local_ctm, font, fz_atof(font_size_att),
- 				fz_atof(origin_x_att), fz_atof(origin_y_att),
- 				is_sideways, bidi_level, indices_att, unicode_att);
--- 
-cgit v1.1-22-g1649
-

Deleted: 0004-Check-for-integer-overflow-when-validating-new-style-xref-Index.patch
===================================================================
--- 0004-Check-for-integer-overflow-when-validating-new-style-xref-Index.patch	2017-12-13 16:11:13 UTC (rev 274226)
+++ 0004-Check-for-integer-overflow-when-validating-new-style-xref-Index.patch	2017-12-13 16:11:22 UTC (rev 274227)
@@ -1,25 +0,0 @@
-From 82df2631d7d0446b206ea6b434ea609b6c28b0e8 Mon Sep 17 00:00:00 2001
-From: Tor Andersson <tor.andersson at artifex.com>
-Date: Mon, 16 Oct 2017 13:14:25 +0200
-Subject: Check for integer overflow when validating new style xref Index.
-
----
- source/pdf/pdf-xref.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/source/pdf/pdf-xref.c b/source/pdf/pdf-xref.c
-index 66bd0ed8..62927936 100644
---- a/source/pdf/pdf-xref.c
-+++ b/source/pdf/pdf-xref.c
-@@ -924,7 +924,7 @@ pdf_read_new_xref_section(fz_context *ctx, pdf_document *doc, fz_stream *stm, fz
- 	pdf_xref_entry *table;
- 	int i, n;
- 
--	if (i0 < 0 || i1 < 0)
-+	if (i0 < 0 || i1 < 0 || (i0+i1) < 0)
- 		fz_throw(ctx, FZ_ERROR_GENERIC, "negative xref stream entry index");
- 	//if (i0 + i1 > pdf_xref_len(ctx, doc))
- 	//	fz_throw(ctx, FZ_ERROR_GENERIC, "xref stream has too many entries");
--- 
-cgit v1.1-22-g1649
-

Deleted: 0005-Fix-698540-Check-name-comment-and-meta-size-field-signs.patch
===================================================================
--- 0005-Fix-698540-Check-name-comment-and-meta-size-field-signs.patch	2017-12-13 16:11:13 UTC (rev 274226)
+++ 0005-Fix-698540-Check-name-comment-and-meta-size-field-signs.patch	2017-12-13 16:11:22 UTC (rev 274227)
@@ -1,26 +0,0 @@
-From 0f0fbc07d9be31f5e83ec5328d7311fdfd8328b1 Mon Sep 17 00:00:00 2001
-From: Tor Andersson <tor.andersson at artifex.com>
-Date: Tue, 19 Sep 2017 16:33:38 +0200
-Subject: Fix 698540: Check name, comment and meta size field signs.
-
----
- source/fitz/unzip.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/source/fitz/unzip.c b/source/fitz/unzip.c
-index f2d4f322..0bcce0fd 100644
---- a/source/fitz/unzip.c
-+++ b/source/fitz/unzip.c
-@@ -141,6 +141,9 @@ static void read_zip_dir_imp(fz_context *ctx, fz_zip_archive *zip, int start_off
- 		(void) fz_read_int32_le(ctx, file); /* ext file atts */
- 		offset = fz_read_int32_le(ctx, file);
- 
-+		if (namesize < 0 || metasize < 0 || commentsize < 0)
-+			fz_throw(ctx, FZ_ERROR_GENERIC, "invalid size in zip entry");
-+
- 		name = fz_malloc(ctx, namesize + 1);
- 		n = fz_read(ctx, file, (unsigned char*)name, namesize);
- 		if (n < (size_t)namesize)
--- 
-cgit v1.1-22-g1649
-

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2017-12-13 16:11:13 UTC (rev 274226)
+++ PKGBUILD	2017-12-13 16:11:22 UTC (rev 274227)
@@ -1,154 +0,0 @@
-# $Id$
-# Maintainer: Christian Hesse <mail at eworm.de>
-# Contributor: Bartłomiej Piotrowski <bpiotrowski at archlinux.org>
-# Contributor: Brad Fanella <bradfanella at archlinux.us>
-# Contributor: Stefan Husmann <stefan-husmann at t-online.de>
-# Contributor: Pierre-Paul Paquin <pierrepaulpaquin at gmail.com>
-# Contributor: xduugu
-
-pkgbase=mupdf
-pkgname=(libmupdf mupdf mupdf-gl mupdf-tools)
-pkgver=1.11
-pkgrel=5
-_openjpeg_version=2.3
-pkgdesc='Lightweight PDF and XPS viewer'
-arch=('i686' 'x86_64')
-url='http://mupdf.com'
-license=('AGPL3')
-makedepends=('curl' 'desktop-file-utils' 'freetype2' 'glfw' 'harfbuzz'
-             'jbig2dec' 'libjpeg' 'mesa-libgl' 'openjpeg2' 'libxext')
-# we need static libs for zathura-pdf-mupdf
-options=('staticlibs')
-source=("https://mupdf.com/downloads/mupdf-${pkgver/_/}-source.tar.gz"
-        '0001-mupdf-openjpeg.patch'
-        '0002-Fix-698558-Handle-non-tags-in-tag-name-comparisons.patch'
-        '0003-Fix-698539-Do-not-use-xps-font-if-it-could-not-be-loaded.patch'
-        '0004-Check-for-integer-overflow-when-validating-new-style-xref-Index.patch'
-        '0005-Fix-698540-Check-name-comment-and-meta-size-field-signs.patch'
-        'mupdf.desktop'
-        'mupdf.xpm')
-sha256sums=('209474a80c56a035ce3f4958a63373a96fad75c927c7b1acdc553fc85855f00a'
-            'e87b0911121753ab24758a8c2bd533abe347b425f0681e84c945a225c62c63be'
-            'cafea4a393cc9b15fe260e8f6238c6d8fff9e5cc849ffe5f5183f9d2798fbbd9'
-            '9abcaf5d2399ea67e877bc227eaea7aac9b0d4b6b635466940832eeedb2b37a1'
-            '9ccc6886352160e5bb7d7434bb49c4a0042f616cae0ae3e613636f709bb3b8df'
-            '69d3227aff15051b71c6d873a042a298e02b79ee2f0d71b7eb304e0c1717f459'
-            '70f632e22902ad4224b1d88696702b3ba4eb3c28eb7acf735f06d16e6884a078'
-            'a435f44425f5432c074dee745d8fbaeb879038ec1f1ec64f037c74662f09aca8')
-
-prepare() {
-  cd $pkgbase-${pkgver/_/}-source
-
-  # remove bundled packages, we want our system libraries
-  rm -rf thirdparty/{curl,freetype,glfw,harfbuzz,jbig2dec,libjpeg,openjpeg,zlib}
-
-  # fix function for openjpeg
-  patch -Np1 < "${srcdir}/0001-mupdf-openjpeg.patch"
-  sed -i "s/__OPENJPEG__VERSION__/${_openjpeg_version}/" source/fitz/load-jpx.c
-
-  # fix includes for jbig2dec
-  sed '/^JBIG2DEC_CFLAGS :=/s|$| -I./include/mupdf|' -i Makethird
-
-  # this does not build with openssl 1.1.0, so disable checks
-  sed -i 's/pkg-config --exists \(libcrypto\|openssl\)/false/' Makerules
-
-  # 2b16dbd8f73269cb15ca61ece75cf8d2d196ed28
-  # Fix 698558: Handle non-tags in tag name comparisons.
-  patch -Np1 < "${srcdir}"/'0002-Fix-698558-Handle-non-tags-in-tag-name-comparisons.patch'
-
-  # ab1a420613dec93c686acbee2c165274e922f82a
-  # Fix 698539: Don't use xps font if it could not be loaded.
-  patch -Np1 < "${srcdir}"/'0003-Fix-698539-Do-not-use-xps-font-if-it-could-not-be-loaded.patch'
-
-  # 82df2631d7d0446b206ea6b434ea609b6c28b0e8
-  # Check for integer overflow when validating new style xref Index.
-  patch -Np1 < "${srcdir}"/'0004-Check-for-integer-overflow-when-validating-new-style-xref-Index.patch'
-
-  # 0f0fbc07d9be31f5e83ec5328d7311fdfd8328b1
-  # Fix 698540: Check name, comment and meta size field signs.
-  patch -Np1 < "${srcdir}"/'0005-Fix-698540-Check-name-comment-and-meta-size-field-signs.patch'
-}
-
-build() {
-  CFLAGS+=' -fPIC'
-  CXXFLAGS+=' -fPIC'
-  export CFLAGS CXXFLAGS
-
-  HAVE_GLFW='yes'
-  SYS_GLFW_CFLAGS="$(pkg-config --cflags glfw3)"
-  SYS_GLFW_LIBS="$(pkg-config --libs glfw3) -lGL"
-  export HAVE_GLFW SYS_GLFW_CFLAGS SYS_GLFW_LIBS
-
-  cd $pkgbase-${pkgver/_/}-source
-  make build=release
-}
-
-package_libmupdf() {
-  pkgdesc='Library for Lightweight PDF and XPS viewer'
-
-  cd $pkgbase-${pkgver/_/}-source
-
-  make build=release prefix="$pkgdir"/usr install
-
-  rm -rf "$pkgdir"/usr/{bin,share/man}
-  mv "$pkgdir"/usr/share/doc/mupdf "$pkgdir"/usr/share/doc/libmupdf
-
-  find "$pkgdir"/usr/include "$pkgdir"/usr/share "$pkgdir"/usr/lib \
-    -type f -exec chmod 0644 {} +
-}
-
-package_mupdf() {
-  pkgdesc='Lightweight PDF and XPS viewer'
-  depends=('curl' 'desktop-file-utils' 'freetype2' 'harfbuzz' 'jbig2dec'
-           'libjpeg' 'openjpeg2' 'openssl' 'libxext')
-
-  cd $pkgbase-${pkgver/_/}-source
-
-  install -D -m0755 build/release/mupdf-x11-curl "$pkgdir"/usr/bin/mupdf
-
-  install -D -m0644 docs/man/mupdf.1 "$pkgdir"/usr/share/man/man1/mupdf.1
-
-  install -d "$pkgdir"/usr/share/doc/mupdf
-  install -m0644  README COPYING CHANGES "$pkgdir"/usr/share/doc/mupdf
-
-  install -D -m0644 ../mupdf.desktop "$pkgdir"/usr/share/applications/mupdf.desktop
-  install -D -m0644 ../mupdf.xpm "$pkgdir"/usr/share/pixmaps/mupdf.xpm
-}
-
-package_mupdf-gl() {
-  pkgdesc='Lightweight PDF and XPS viewer with OpenGL backend'
-  conflicts=('mupdf')
-  provides=('mupdf')
-  depends=('desktop-file-utils' 'freetype2' 'glfw' 'harfbuzz' 'jbig2dec'
-           'libjpeg' 'openjpeg2')
-
-  cd $pkgbase-${pkgver/_/}-source
-
-  install -D -m0755 build/release/mupdf-gl "$pkgdir"/usr/bin/mupdf
-
-  install -D -m0644 docs/man/mupdf.1 "$pkgdir"/usr/share/man/man1/mupdf.1
-
-  install -d "$pkgdir"/usr/share/doc/mupdf
-  install -m0644 README COPYING CHANGES "$pkgdir"/usr/share/doc/mupdf
-
-  install -D -m0644 ../mupdf.desktop "$pkgdir"/usr/share/applications/mupdf.desktop
-  install -D -m0644 ../mupdf.xpm "$pkgdir"/usr/share/pixmaps/mupdf.xpm
-}
-
-package_mupdf-tools() {
-  pkgdesc='Tools for Lightweight PDF and XPS viewer'
-  depends=('mupdf')
-  depends=('freetype2' 'jbig2dec' 'libjpeg'
-         'openjpeg2' 'harfbuzz')
-
-  cd $pkgbase-${pkgver/_/}-source
-
-  install -D -m0755 build/release/mutool "$pkgdir"/usr/bin/mutool
-  install -D -m0755 build/release/mujstest "$pkgdir"/usr/bin/mujstest
-
-  install -D -m0644 docs/man/mutool.1 "$pkgdir"/usr/share/man/man1/mutool.1
-
-  install -d "$pkgdir"/usr/share/doc/mupdf-tools
-  install -m0644 README COPYING CHANGES "$pkgdir"/usr/share/doc/mupdf-tools
-}
-

Copied: mupdf/repos/community-x86_64/PKGBUILD (from rev 274226, mupdf/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2017-12-13 16:11:22 UTC (rev 274227)
@@ -0,0 +1,125 @@
+# $Id$
+# Maintainer: Christian Hesse <mail at eworm.de>
+# Contributor: Bartłomiej Piotrowski <bpiotrowski at archlinux.org>
+# Contributor: Brad Fanella <bradfanella at archlinux.us>
+# Contributor: Stefan Husmann <stefan-husmann at t-online.de>
+# Contributor: Pierre-Paul Paquin <pierrepaulpaquin at gmail.com>
+# Contributor: xduugu
+
+pkgbase=mupdf
+pkgname=(libmupdf mupdf mupdf-gl mupdf-tools)
+pkgver=1.12.0
+pkgrel=1
+_openjpeg_version=2.3
+pkgdesc='Lightweight PDF and XPS viewer'
+arch=('x86_64')
+url='http://mupdf.com'
+license=('AGPL3')
+makedepends=('curl' 'desktop-file-utils' 'freetype2' 'freeglut' 'glu' 'harfbuzz'
+             'jbig2dec' 'libjpeg' 'mesa-libgl' 'openjpeg2' 'libxext')
+# we need static libs for zathura-pdf-mupdf
+options=('staticlibs')
+source=("https://mupdf.com/downloads/mupdf-${pkgver/_/}-source.tar.xz"
+        '0001-mupdf-openjpeg.patch'
+        'mupdf.desktop'
+        'mupdf.xpm')
+sha256sums=('577b3820c6b23d319be91e0e06080263598aa0662d9a7c50af500eb6f003322d'
+            'e4be458dabc577e687c3abfa1ae03bd62e8727cfa24f25b8eb23384263486605'
+            'ccff66979249bd4ab4ba8918660f194eb90eb0ae231b16e36a6cecdcf471883f'
+            'a435f44425f5432c074dee745d8fbaeb879038ec1f1ec64f037c74662f09aca8')
+
+prepare() {
+  cd $pkgbase-${pkgver/_/}-source
+
+  # remove bundled packages, we want our system libraries
+  rm -rf thirdparty/{curl,freeglut,freetype,harfbuzz,jbig2dec,libjpeg,openjpeg,zlib}
+
+  # fix function for openjpeg
+  patch -Np1 < "${srcdir}/0001-mupdf-openjpeg.patch"
+  sed -i "s/__OPENJPEG__VERSION__/${_openjpeg_version}/" source/fitz/load-jpx.c
+
+  # fix includes for jbig2dec
+  sed '/^JBIG2DEC_CFLAGS :=/s|$| -I./include/mupdf|' -i Makethird
+
+  # this does not build with openssl 1.1.0, so disable checks
+  sed -i 's/pkg-config --exists \(libcrypto\|openssl\)/false/' Makerules
+}
+
+build() {
+  CFLAGS+=' -fPIC'
+  CXXFLAGS+=' -fPIC'
+  export CFLAGS CXXFLAGS
+
+  cd $pkgbase-${pkgver/_/}-source
+  make build=release
+}
+
+package_libmupdf() {
+  pkgdesc='Library for Lightweight PDF and XPS viewer'
+
+  cd $pkgbase-${pkgver/_/}-source
+
+  make build=release prefix="$pkgdir"/usr install
+
+  rm -rf "$pkgdir"/usr/{bin,share/man}
+  mv "$pkgdir"/usr/share/doc/mupdf "$pkgdir"/usr/share/doc/libmupdf
+
+  find "$pkgdir"/usr/include "$pkgdir"/usr/share "$pkgdir"/usr/lib \
+    -type f -exec chmod 0644 {} +
+}
+
+package_mupdf() {
+  pkgdesc='Lightweight PDF and XPS viewer'
+  depends=('curl' 'desktop-file-utils' 'freetype2' 'harfbuzz' 'jbig2dec'
+           'libjpeg' 'openjpeg2' 'openssl' 'libxext')
+
+  cd $pkgbase-${pkgver/_/}-source
+
+  install -D -m0755 build/release/mupdf-x11-curl "$pkgdir"/usr/bin/mupdf
+
+  install -D -m0644 docs/man/mupdf.1 "$pkgdir"/usr/share/man/man1/mupdf.1
+
+  install -d "$pkgdir"/usr/share/doc/mupdf
+  install -m0644  README COPYING CHANGES "$pkgdir"/usr/share/doc/mupdf
+
+  install -D -m0644 ../mupdf.desktop "$pkgdir"/usr/share/applications/mupdf.desktop
+  install -D -m0644 ../mupdf.xpm "$pkgdir"/usr/share/pixmaps/mupdf.xpm
+}
+
+package_mupdf-gl() {
+  pkgdesc='Lightweight PDF and XPS viewer with OpenGL backend'
+  conflicts=('mupdf')
+  provides=('mupdf')
+  depends=('desktop-file-utils' 'freetype2' 'freeglut' 'glu' 'harfbuzz' 'jbig2dec'
+           'libjpeg' 'openjpeg2')
+
+  cd $pkgbase-${pkgver/_/}-source
+
+  install -D -m0755 build/release/mupdf-gl "$pkgdir"/usr/bin/mupdf
+
+  install -D -m0644 docs/man/mupdf.1 "$pkgdir"/usr/share/man/man1/mupdf.1
+
+  install -d "$pkgdir"/usr/share/doc/mupdf
+  install -m0644 README COPYING CHANGES "$pkgdir"/usr/share/doc/mupdf
+
+  install -D -m0644 ../mupdf.desktop "$pkgdir"/usr/share/applications/mupdf.desktop
+  install -D -m0644 ../mupdf.xpm "$pkgdir"/usr/share/pixmaps/mupdf.xpm
+}
+
+package_mupdf-tools() {
+  pkgdesc='Tools for Lightweight PDF and XPS viewer'
+  depends=('mupdf')
+  depends=('freetype2' 'jbig2dec' 'libjpeg'
+         'openjpeg2' 'harfbuzz')
+
+  cd $pkgbase-${pkgver/_/}-source
+
+  install -D -m0755 build/release/mutool "$pkgdir"/usr/bin/mutool
+  install -D -m0755 build/release/mujstest "$pkgdir"/usr/bin/mujstest
+
+  install -D -m0644 docs/man/mutool.1 "$pkgdir"/usr/share/man/man1/mutool.1
+
+  install -d "$pkgdir"/usr/share/doc/mupdf-tools
+  install -m0644 README COPYING CHANGES "$pkgdir"/usr/share/doc/mupdf-tools
+}
+

Deleted: mupdf.desktop
===================================================================
--- mupdf.desktop	2017-12-13 16:11:13 UTC (rev 274226)
+++ mupdf.desktop	2017-12-13 16:11:22 UTC (rev 274227)
@@ -1,15 +0,0 @@
-[Desktop Entry]
-Name=MuPDF
-GenericName=PDF file viewer
-Exec=mupdf %f
-TryExec=mupdf
-Icon=mupdf
-Terminal=false
-Type=Application
-MimeType=application/pdf;application/x-pdf;application/x-cbz;application/oxps;application/vnd.ms-xpsdocument;image/jpeg;image/pjpeg;image/png;image/tiff;image/x-tiff
-Categories=Viewer;Graphics;
-Actions=View
-NoDisplay=true
-[Desktop Action View]
-Name=View with mupdf
-Exec=mupdf %f

Copied: mupdf/repos/community-x86_64/mupdf.desktop (from rev 274226, mupdf/trunk/mupdf.desktop)
===================================================================
--- mupdf.desktop	                        (rev 0)
+++ mupdf.desktop	2017-12-13 16:11:22 UTC (rev 274227)
@@ -0,0 +1,15 @@
+[Desktop Entry]
+Name=MuPDF
+GenericName=PDF file viewer
+Exec=mupdf %f
+TryExec=mupdf
+Icon=mupdf
+Terminal=false
+Type=Application
+MimeType=application/epub+zip;application/pdf;application/x-pdf;application/x-cbz;application/oxps;application/vnd.ms-xpsdocument;image/jpeg;image/pjpeg;image/png;image/tiff;image/x-tiff
+Categories=Viewer;Graphics;
+Actions=View
+NoDisplay=true
+[Desktop Action View]
+Name=View with mupdf
+Exec=mupdf %f

Deleted: mupdf.xpm
===================================================================
(Binary files differ)

Copied: mupdf/repos/community-x86_64/mupdf.xpm (from rev 274226, mupdf/trunk/mupdf.xpm)
===================================================================
(Binary files differ)



More information about the arch-commits mailing list