mupdf: update to 1.15.0.
- Remove CVE patches (integrated upstream) - Remove extra-apps make target (no longer exists) - Remove mujstest from mupdf-tools (no longer exists)
This commit is contained in:
parent
23c5f07c1a
commit
e9d0b0e40c
4 changed files with 6 additions and 197 deletions
|
@ -1,77 +0,0 @@
|
|||
From 351c99d8ce23bbf7099dbd52771a095f67e45a2c Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <351c99d8ce23bbf7099dbd52771a095f67e45a2c.1542272011.git.mjg@fedoraproject.org>
|
||||
From: Sebastian Rasmussen <sebras@gmail.com>
|
||||
Date: Mon, 1 Oct 2018 15:13:13 +0800
|
||||
Subject: [PATCH] Avoid being smart about keeping only a single reference to
|
||||
the buffer.
|
||||
|
||||
When pdf_dev_pop() is called it will drop the reference to the buffer.
|
||||
pdf_dev_push_new_buf() will either create a new buffer reference or take a reference to the existing buffer.
|
||||
When pdf_dev_pop() is called unbalance this creates a problem as the
|
||||
top level buffer will be unreferenced too many times.
|
||||
|
||||
fails-32.pdf
|
||||
---
|
||||
source/pdf/pdf-device.c | 15 +++++++++------
|
||||
1 file changed, 9 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/source/pdf/pdf-device.c b/source/pdf/pdf-device.c
|
||||
index 31a7a10f..0103e9a7 100644
|
||||
--- a/source/pdf/pdf-device.c
|
||||
+++ b/source/pdf/pdf-device.c
|
||||
@@ -66,7 +66,6 @@ struct pdf_device_s
|
||||
|
||||
pdf_document *doc;
|
||||
pdf_obj *resources;
|
||||
- fz_buffer *buffer;
|
||||
|
||||
int in_text;
|
||||
|
||||
@@ -1061,7 +1060,10 @@ pdf_dev_drop_device(fz_context *ctx, fz_device *dev)
|
||||
int i;
|
||||
|
||||
for (i = pdev->num_gstates-1; i >= 0; i--)
|
||||
+ {
|
||||
+ fz_drop_buffer(ctx, pdev->gstates[i].buf);
|
||||
fz_drop_stroke_state(ctx, pdev->gstates[i].stroke_state);
|
||||
+ }
|
||||
|
||||
for (i = pdev->num_cid_fonts-1; i >= 0; i--)
|
||||
fz_drop_font(ctx, pdev->cid_fonts[i]);
|
||||
@@ -1069,7 +1071,6 @@ pdf_dev_drop_device(fz_context *ctx, fz_device *dev)
|
||||
for (i = pdev->num_groups - 1; i >= 0; i--)
|
||||
pdf_drop_obj(ctx, pdev->groups[i].ref);
|
||||
|
||||
- fz_drop_buffer(ctx, pdev->buffer);
|
||||
pdf_drop_obj(ctx, pdev->resources);
|
||||
fz_free(ctx, pdev->cid_fonts);
|
||||
fz_free(ctx, pdev->image_indices);
|
||||
@@ -1111,10 +1112,13 @@ fz_device *pdf_new_pdf_device(fz_context *ctx, pdf_document *doc, fz_matrix topc
|
||||
dev->super.begin_tile = pdf_dev_begin_tile;
|
||||
dev->super.end_tile = pdf_dev_end_tile;
|
||||
|
||||
+ fz_var(buf);
|
||||
+
|
||||
fz_try(ctx)
|
||||
{
|
||||
- dev->buffer = fz_keep_buffer(ctx, buf);
|
||||
- if (!buf)
|
||||
+ if (buf)
|
||||
+ buf = fz_keep_buffer(ctx, buf);
|
||||
+ else
|
||||
buf = fz_new_buffer(ctx, 256);
|
||||
dev->doc = doc;
|
||||
dev->resources = pdf_keep_obj(ctx, resources);
|
||||
@@ -1136,8 +1140,7 @@ fz_device *pdf_new_pdf_device(fz_context *ctx, pdf_document *doc, fz_matrix topc
|
||||
}
|
||||
fz_catch(ctx)
|
||||
{
|
||||
- if (dev->gstates && dev->buffer == NULL)
|
||||
- fz_drop_buffer(ctx, dev->gstates[0].buf);
|
||||
+ fz_drop_buffer(ctx, buf);
|
||||
fz_free(ctx, dev);
|
||||
fz_rethrow(ctx);
|
||||
}
|
||||
--
|
||||
2.19.1.1238.g4b45f61cc0
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
From 38f883fe129a5e89306252a4676eaaf4bc968824 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <38f883fe129a5e89306252a4676eaaf4bc968824.1542272532.git.mjg@fedoraproject.org>
|
||||
From: Tor Andersson <tor.andersson@artifex.com>
|
||||
Date: Mon, 22 Oct 2018 17:16:35 +0200
|
||||
Subject: [PATCH] Fix text used as clip mask in pdfwrite device.
|
||||
|
||||
Push the clip state, and pass the correct text rendering mode state.
|
||||
---
|
||||
source/pdf/pdf-device.c | 12 ++++++++++--
|
||||
1 file changed, 10 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/source/pdf/pdf-device.c b/source/pdf/pdf-device.c
|
||||
index 4dd729b8..427e3b38 100644
|
||||
--- a/source/pdf/pdf-device.c
|
||||
+++ b/source/pdf/pdf-device.c
|
||||
@@ -734,9 +734,13 @@ pdf_dev_clip_text(fz_context *ctx, fz_device *dev, const fz_text *text, fz_matri
|
||||
{
|
||||
pdf_device *pdev = (pdf_device*)dev;
|
||||
fz_text_span *span;
|
||||
+
|
||||
+ pdf_dev_end_text(ctx, pdev);
|
||||
+ pdf_dev_push(ctx, pdev);
|
||||
+
|
||||
for (span = text->head; span; span = span->next)
|
||||
{
|
||||
- pdf_dev_begin_text(ctx, pdev, span->trm, 0);
|
||||
+ pdf_dev_begin_text(ctx, pdev, span->trm, 7);
|
||||
pdf_dev_ctm(ctx, pdev, ctm);
|
||||
pdf_dev_font(ctx, pdev, span->font);
|
||||
pdf_dev_text_span(ctx, pdev, span);
|
||||
@@ -748,9 +752,13 @@ pdf_dev_clip_stroke_text(fz_context *ctx, fz_device *dev, const fz_text *text, c
|
||||
{
|
||||
pdf_device *pdev = (pdf_device*)dev;
|
||||
fz_text_span *span;
|
||||
+
|
||||
+ pdf_dev_end_text(ctx, pdev);
|
||||
+ pdf_dev_push(ctx, pdev);
|
||||
+
|
||||
for (span = text->head; span; span = span->next)
|
||||
{
|
||||
- pdf_dev_begin_text(ctx, pdev, span->trm, 0);
|
||||
+ pdf_dev_begin_text(ctx, pdev, span->trm, 7);
|
||||
pdf_dev_font(ctx, pdev, span->font);
|
||||
pdf_dev_ctm(ctx, pdev, ctm);
|
||||
pdf_dev_text_span(ctx, pdev, span);
|
||||
--
|
||||
2.19.1.1238.g4b45f61cc0
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
From 164ddc22ee0d5b63a81d5148f44c37dd132a9356 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <164ddc22ee0d5b63a81d5148f44c37dd132a9356.1542272812.git.mjg@fedoraproject.org>
|
||||
From: Tor Andersson <tor.andersson@artifex.com>
|
||||
Date: Mon, 5 Nov 2018 17:49:09 +0100
|
||||
Subject: [PATCH] Fix 700043: Don't assume a font is t3 just because
|
||||
fz_outline_glyph fails.
|
||||
|
||||
---
|
||||
source/fitz/svg-device.c | 31 ++++++++++++++++---------------
|
||||
1 file changed, 16 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/source/fitz/svg-device.c b/source/fitz/svg-device.c
|
||||
index 2876a89b..aaf53b99 100644
|
||||
--- a/source/fitz/svg-device.c
|
||||
+++ b/source/fitz/svg-device.c
|
||||
@@ -472,27 +472,28 @@ svg_dev_text_span_as_paths_defs(fz_context *ctx, fz_device *dev, fz_text_span *s
|
||||
/* Need to send this one */
|
||||
fz_rect rect;
|
||||
fz_path *path;
|
||||
- path = fz_outline_glyph(ctx, span->font, gid, fz_identity);
|
||||
- if (path)
|
||||
+ out = start_def(ctx, sdev);
|
||||
+ fz_write_printf(ctx, out, "<symbol id=\"font_%x_%x\">\n", fnt->id, gid);
|
||||
+ if (fz_font_ft_face(ctx, span->font))
|
||||
{
|
||||
- rect = fz_bound_path(ctx, path, NULL, fz_identity);
|
||||
- shift.e = -rect.x0;
|
||||
- shift.f = -rect.y0;
|
||||
- fz_transform_path(ctx, path, shift);
|
||||
- out = start_def(ctx, sdev);
|
||||
- fz_write_printf(ctx, out, "<symbol id=\"font_%x_%x\">\n", fnt->id, gid);
|
||||
- fz_write_printf(ctx, out, "<path");
|
||||
- svg_dev_path(ctx, sdev, path);
|
||||
- fz_write_printf(ctx, out, "/>\n");
|
||||
- fz_drop_path(ctx, path);
|
||||
+ path = fz_outline_glyph(ctx, span->font, gid, fz_identity);
|
||||
+ if (path)
|
||||
+ {
|
||||
+ rect = fz_bound_path(ctx, path, NULL, fz_identity);
|
||||
+ shift.e = -rect.x0;
|
||||
+ shift.f = -rect.y0;
|
||||
+ fz_transform_path(ctx, path, shift);
|
||||
+ fz_write_printf(ctx, out, "<path");
|
||||
+ svg_dev_path(ctx, sdev, path);
|
||||
+ fz_write_printf(ctx, out, "/>\n");
|
||||
+ fz_drop_path(ctx, path);
|
||||
+ }
|
||||
}
|
||||
- else
|
||||
+ else if (fz_font_t3_procs(ctx, span->font))
|
||||
{
|
||||
rect = fz_bound_glyph(ctx, span->font, gid, fz_identity);
|
||||
shift.e = -rect.x0;
|
||||
shift.f = -rect.y0;
|
||||
- out = start_def(ctx, sdev);
|
||||
- fz_write_printf(ctx, out, "<symbol id=\"font_%x_%x\">\n", fnt->id, gid);
|
||||
fz_run_t3_glyph(ctx, span->font, gid, shift, dev);
|
||||
}
|
||||
fz_write_printf(ctx, out, "</symbol>\n");
|
||||
--
|
||||
2.19.1.1238.g4b45f61cc0
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'mupdf'
|
||||
pkgname=mupdf
|
||||
version=1.14.0
|
||||
revision=2
|
||||
version=1.15.0
|
||||
revision=1
|
||||
wrksrc="${pkgname}-${version}-source"
|
||||
hostmakedepends="pkg-config zlib-devel libcurl-devel freetype-devel
|
||||
libjpeg-turbo-devel jbig2dec-devel libXext-devel libXcursor-devel
|
||||
|
@ -14,16 +14,13 @@ maintainer="Rasmus Thomsen <rasmus.thomsen@protonmail.com>"
|
|||
license="AGPL-3.0-only"
|
||||
homepage="https://mupdf.com"
|
||||
distfiles="https://mupdf.com/downloads/archive/${pkgname}-${version}-source.tar.gz"
|
||||
checksum=c443483a678c3fc258fa4adc124146225d0bb443c522619faadebf6b363d7724
|
||||
checksum=9fe6773ee0dc192d1878b7886b51150cbeb1a8ad81d3cd806d8e1ab343ffd471
|
||||
patch_args="-Np1"
|
||||
|
||||
pre_build() {
|
||||
# libmupdf-{threads,pkcs7}.a are required by fbpdf
|
||||
sed 's/INSTALL_LIBS :=/& $(THREAD_LIB) $(PKCS7_LIB)/' -i Makefile
|
||||
|
||||
# Also install EXTRA_APPS for mupdf-tools package
|
||||
sed '/Generated depe/i INSTALL_APPS += $(EXTRA_APPS)' -i Makefile
|
||||
|
||||
if [ "$CROSS_BUILD" ]; then
|
||||
make CC=cc LD=ld AR=ar CFLAGS="-fPIC" LDFLAGS='' build=release generate
|
||||
fi
|
||||
|
@ -33,16 +30,16 @@ do_build() {
|
|||
CFLAGS+=" -fPIC"
|
||||
CXXFLAGS+=" -fPIC"
|
||||
if [ "$CROSS_BUILD" ]; then
|
||||
make USE_SYSTEM_LIBS=yes CURL_LIBS='-lcurl -lpthread' build=release CROSSCOMPILE=yes all extra-apps
|
||||
make USE_SYSTEM_LIBS=yes CURL_LIBS='-lcurl -lpthread' build=release CROSSCOMPILE=yes all
|
||||
make CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" build=release CROSSCOMPILE=yes -C thirdparty/mujs
|
||||
else
|
||||
make USE_SYSTEM_LIBS=yes CURL_LIBS='-lcurl -lpthread' build=release all extra-apps
|
||||
make USE_SYSTEM_LIBS=yes CURL_LIBS='-lcurl -lpthread' build=release all
|
||||
make V=1 CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" build=release -C thirdparty/mujs
|
||||
fi
|
||||
}
|
||||
|
||||
do_install() {
|
||||
make USE_SYSTEM_LIBS=yes build=release prefix=${DESTDIR}/usr install third extra-apps
|
||||
make USE_SYSTEM_LIBS=yes build=release prefix=${DESTDIR}/usr install
|
||||
|
||||
ln -rs ${DESTDIR}/usr/bin/mupdf-x11-curl ${DESTDIR}/usr/bin/mupdf
|
||||
|
||||
|
@ -66,7 +63,6 @@ mupdf-devel_package() {
|
|||
mupdf-tools_package() {
|
||||
short_desc+=" - tools"
|
||||
pkg_install() {
|
||||
vmove usr/bin/mujstest
|
||||
vmove usr/bin/muraster
|
||||
vmove usr/bin/mutool
|
||||
vmove usr/share/man/man1/mutool.1
|
||||
|
|
Loading…
Reference in a new issue