diff --git a/cairo-pdf-add-missing-flush.patch b/cairo-pdf-add-missing-flush.patch new file mode 100644 index 0000000..f83f4c7 --- /dev/null +++ b/cairo-pdf-add-missing-flush.patch @@ -0,0 +1,29 @@ +From 4c8813f0eaacc32c27126ad2296951a626300b89 Mon Sep 17 00:00:00 2001 +From: Adrian Johnson +Date: Thu, 25 Oct 2018 18:46:17 +1030 +Subject: [PATCH] pdf: add missing flush + +Issue #342 +--- + src/cairo-pdf-surface.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c +index 7eb61aa..939b2d2 100644 +--- a/src/cairo-pdf-surface.c ++++ b/src/cairo-pdf-surface.c +@@ -7711,6 +7711,11 @@ _cairo_pdf_surface_mask (void *abstract_surface, + * and most common, case to handle. */ + if (_cairo_pattern_is_constant_alpha (mask, &extents.bounded, &alpha) && + _can_paint_pattern (source)) { ++ ++ status = _cairo_pdf_operators_flush (&surface->pdf_operators); ++ if (unlikely (status)) ++ goto cleanup; ++ + _cairo_output_stream_printf (surface->output, "q\n"); + status = _cairo_pdf_surface_paint_pattern (surface, + op, +-- +2.25.0 + diff --git a/cairo.changes b/cairo.changes index 257262f..d6689cf 100644 --- a/cairo.changes +++ b/cairo.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Sun Feb 23 20:24:08 UTC 2020 - Martin Wilck + +- Add an upstream bug fix + + cairo-pdf-add-missing-flush.patch: Fixes PDF generation + see https://gitlab.freedesktop.org/cairo/cairo/issues/342 + ------------------------------------------------------------------- Wed Sep 4 09:59:21 UTC 2019 - Bjørn Lie diff --git a/cairo.spec b/cairo.spec index 1eb0d6a..3b1d87b 100644 --- a/cairo.spec +++ b/cairo.spec @@ -1,7 +1,7 @@ # # spec file for package cairo # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -35,6 +35,8 @@ Patch1: cairo-get_bitmap_surface-bsc1036789-CVE-2017-7475.diff Patch2: cairo-Use-FT_Done_MM_Var-instead-of-free-when-available.patch # PATCH-FIX-UPSTREAM cairo-composite_color_glyphs.patch -- Fix a thinko in composite_color_glyphs Patch3: cairo-composite_color_glyphs.patch +# PATCH-FIX-UPSTREAM cairo-pdf-add-missing-flush.patch - fix pdf generation (upstream issue #342) +Patch4: cairo-pdf-add-missing-flush.patch BuildRequires: gtk-doc BuildRequires: pkgconfig