Accepting request 449342 from GNOME:Factory

1

OBS-URL: https://build.opensuse.org/request/show/449342
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cairo?expand=0&rev=72
This commit is contained in:
Dominique Leuenberger 2017-01-10 09:41:12 +00:00 committed by Git OBS Bridge
commit a7a135159d
7 changed files with 76 additions and 163 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:268cc265a7f807403582f440643064bf52896556766890c8df7bad02d230f6c9
size 37329264

3
cairo-1.15.4.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:deddf31e196e826e7790bbbf7d0f4b3fd15df243aa48511b349f1791b96be291
size 42222384

View File

@ -1,46 +0,0 @@
diff --git a/src/cairo-scaled-font.c b/src/cairo-scaled-font.c
index ac80c97..a22b36e 100644
--- a/src/cairo-scaled-font.c
+++ b/src/cairo-scaled-font.c
@@ -818,23 +818,35 @@ _cairo_scaled_font_thaw_cache (cairo_scaled_font_t *scaled_font)
void
_cairo_scaled_font_reset_cache (cairo_scaled_font_t *scaled_font)
{
+ cairo_scaled_glyph_page_t *page;
+
CAIRO_MUTEX_LOCK (scaled_font->mutex);
assert (! scaled_font->cache_frozen);
assert (! scaled_font->global_cache_frozen);
CAIRO_MUTEX_LOCK (_cairo_scaled_glyph_page_cache_mutex);
- while (! cairo_list_is_empty (&scaled_font->glyph_pages)) {
- cairo_scaled_glyph_page_t *page =
- cairo_list_first_entry (&scaled_font->glyph_pages,
- cairo_scaled_glyph_page_t,
- link);
+ cairo_list_foreach_entry (page,
+ cairo_scaled_glyph_page_t,
+ &scaled_font->glyph_pages,
+ link) {
cairo_scaled_glyph_page_cache.size -= page->cache_entry.size;
_cairo_hash_table_remove (cairo_scaled_glyph_page_cache.hash_table,
(cairo_hash_entry_t *) &page->cache_entry);
+ }
+ CAIRO_MUTEX_UNLOCK (_cairo_scaled_glyph_page_cache_mutex);
+
+ /* Destroy scaled_font's pages while holding its lock only, and not the
+ * global page cache lock. The destructor can cause us to recurse and
+ * end up back here for a different scaled_font. */
+
+ while (! cairo_list_is_empty (&scaled_font->glyph_pages)) {
+ page = cairo_list_first_entry (&scaled_font->glyph_pages,
+ cairo_scaled_glyph_page_t,
+ link);
_cairo_scaled_glyph_page_destroy (scaled_font, page);
}
- CAIRO_MUTEX_UNLOCK (_cairo_scaled_glyph_page_cache_mutex);
+
CAIRO_MUTEX_UNLOCK (scaled_font->mutex);
}

View File

@ -1,39 +0,0 @@
Index: cairo-1.12.8/util/cairo-fdr/Makefile.am
===================================================================
--- cairo-1.12.8.orig/util/cairo-fdr/Makefile.am
+++ cairo-1.12.8/util/cairo-fdr/Makefile.am
@@ -9,7 +9,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/src \
cairo_fdr_la_SOURCES = fdr.c
cairo_fdr_la_CPPFLAGS = $(AM_CPPFLAGS)
cairo_fdr_la_CFLAGS = $(CAIRO_CFLAGS)
-cairo_fdr_la_LDFLAGS = -module -no-undefined
+cairo_fdr_la_LDFLAGS = -module -no-undefined -avoid-version
if CAIRO_HAS_DL
cairo_fdr_la_LIBADD = -ldl
endif
Index: cairo-1.12.8/util/cairo-trace/Makefile.am
===================================================================
--- cairo-1.12.8.orig/util/cairo-trace/Makefile.am
+++ cairo-1.12.8/util/cairo-trace/Makefile.am
@@ -11,7 +11,7 @@ libcairo_trace_la_SOURCES = trace.c
libcairo_trace_la_CPPFLAGS = -DCAIRO_TRACE_OUTDIR="\"$(cairooutdir)\"" \
$(AM_CPPFLAGS)
libcairo_trace_la_CFLAGS = $(CAIRO_CFLAGS) $(real_pthread_CFLAGS)
-libcairo_trace_la_LDFLAGS = -no-undefined
+libcairo_trace_la_LDFLAGS = -no-undefined -module -avoid-version
libcairo_trace_la_LIBADD = $(real_pthread_LIBS) -lz
if CAIRO_HAS_DL
Index: cairo-1.12.8/util/cairo-sphinx/Makefile.am
===================================================================
--- cairo-1.12.8.orig/util/cairo-sphinx/Makefile.am
+++ cairo-1.12.8/util/cairo-sphinx/Makefile.am
@@ -11,7 +11,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/src \
cairo_sphinx_la_SOURCES = fdr.c
cairo_sphinx_la_CPPFLAGS = $(AM_CPPFLAGS)
cairo_sphinx_la_CFLAGS = $(CAIRO_CFLAGS)
-cairo_sphinx_la_LDFLAGS = -module -no-undefined
+cairo_sphinx_la_LDFLAGS = -module -no-undefined -avoid-version
if CAIRO_HAS_DL
cairo_sphinx_la_LIBADD = -ldl
endif

View File

@ -1,60 +0,0 @@
From c088ba1faab9579efdaed7a524124901a17801b0 Mon Sep 17 00:00:00 2001
From: Uli Schlachter <psychon@znc.in>
Date: Sat, 18 Jun 2016 15:08:52 +0200
Subject: [PATCH] xlib: Fix double free in _get_image_surface()
If XShmGetImage() fails, the code tries to continue with its normal,
non-shared-memory path. However, the image variable, which was previously set to
NULL, now points to an already-destroyed surface, causing a double-free when the
function cleans up after itself (actually, its an assertion failure because the
reference count of the surface is zero, but technically this is still a double
free).
Fix this by setting image=NULL after destroying the surface that this refers to,
to make sure this surface will not be destroyed again.
While we are here (multiple changes in a single commit are bad...), also fix the
cleanup done in bail. In practice, &image->base should be safe when image==NULL,
because this just adds some offset to the pointer (the offset here is actually
zero, so this doesn't do anything at all). However, the C standard does not
require this to be safe, so let's handle this case specially.
Note that anything that is fixed by this change is still buggy, because the only
reason why XShmGetImage() could fail would be BadDrawable, meaning that the
target we draw to does not exist or was already destroyed. This patch will
likely just cause X11 errors elsewhere and drawing to (possible) invalid
drawables is not supported by cairo anyway. This means that if SHM fails, the
following fallback code has a high chance of failing, too.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=91967
Signed-off-by: Uli Schlachter <psychon@znc.in>
---
src/cairo-xlib-surface.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/cairo-xlib-surface.c b/src/cairo-xlib-surface.c
index 3f407c3..555c1fe 100644
--- a/src/cairo-xlib-surface.c
+++ b/src/cairo-xlib-surface.c
@@ -807,6 +807,7 @@ _get_image_surface (cairo_xlib_surface_t *surface,
}
cairo_surface_destroy (&image->base);
+ image = NULL;
}
}
@@ -1011,7 +1012,8 @@ _get_image_surface (cairo_xlib_surface_t *surface,
cairo_device_release (&display->base);
if (unlikely (status)) {
- cairo_surface_destroy (&image->base);
+ if (image)
+ cairo_surface_destroy (&image->base);
return _cairo_surface_create_in_error (status);
}
--
2.8.1

View File

@ -1,3 +1,74 @@
-------------------------------------------------------------------
Sun Dec 11 09:43:08 UTC 2016 - zaitor@opensuse.org
- Update to version 1.15.4:
+ The PDF backend has gained support for a range of widely used
features, including thumbnails, page labels, metadata, document
outlines, structured text, hyperlinks, and tags. Tags permit
adding logical info such as headings, tables, figures, etc.
that facilitates indexing, accessibility, text reflow,
searching, and extraction of the tagged items to other
software.
+ API Changes:
- Added a cairo API to set up Win32 surfaces for HDC with alpha
channels.
- New API for added PDF functionality (see above), and new
error status item for problems relating to PDF tagging.
- New error status items for handling of GDI, libfreetype, and
libpng errors, respectively.
+ Fix playback of recording surfaces into PDF surfaces, where
objects with negative coordinates were not getting drawn. To
address this, the coordinate systems for PDF and PS have been
changed to match cairo's coordinate system. This allows
recording surfaces to be emitted in cairo coordinates, and
results in the same origin being used for all operations when
using the recording surface XObject. Test cases for PDF and PS
have also been updated accordingly (fdo#89232).
+ Fix "invalidfont" error on some printers when printing PDFs
with embedded fonts that have glyphs (such as spaces) with
num_contours == 0 (fdo#79897).
+ Fix missing glyphs such as thin dashes, which get scaled to 0
in userspace and thus have their drawing operations culled
(fdo#94615).
+ Fix other oddities caused by variously idiosyncratic fonts.
+ Fix deadlock when destruction of a scaled font indirectly
triggers destruction of a second scaled font, causing the
global cache to be locked twice (fdo#93891).
+ Fix X errors reported to applications when shmdt() is called
before the Attach request is processed, due to missing xcb and
xlib calls.
+ Fix random failure in record-paint-alpha-clip-mast test case,
caused by an incorrect assumption that a deferred clear can be
skipped (fdo#84330).
+ Fix crash when dealing with an XShmGetImage() failure, caused
by a double free in _get_image_surface() (fdo#91967).
+ Fix invalid execution of ASCII85 data by the PS interpreter
that the image operator didn't use, by flushing the extraneous
data after drawing the image (fdo#84811).
+ Fix decoding of Adobe Photoshop's inverted CMYK JPEG files in
PDF export.
+ Fix unbounded surface assertion in win32-print code.
+ Fix a data race in freed_pool discovered by Firefox's cairo
usage. The patch adads atomic int load and store functions,
with relaxed memory ordering (fdo#90318).
+ Cleanup debugging text sent to stdout instead of log
(fdo#95227).
+ Fix build issue when using non-GNU strings utility (fdo#88639).
+ Fix build of cairo modules as regular modules, not as versioned
shared libaries (fdo#29319).
+ Fix build on win32 using gcc 5.4.
+ Fix build of script backend to require zlib.
+ Update test suite reference images using Debian Jessie 64-bit
and poppler current as of June, 2016.
+ Various improvements to documentation and tests, compiler
warning fixes, and an assortment of code refactoring and
cleanup.
- Drop cairo-modules-no-version.patch,
cairo-bsc958844-deadlock-on-scaled-font-cache-reset.patch and
cairo-xlib-double-free.patch: Fixed upstream.
- Drop libtool BuildRequires and stop passing autoreconf, we no
longer have any patches touching the buildsystem.
-------------------------------------------------------------------
Mon Sep 5 07:36:33 UTC 2016 - badshah400@gmail.com

View File

@ -19,7 +19,7 @@
%define build_xcb_backend 1
%define build_gl_backend 1
Name: cairo
Version: 1.15.2
Version: 1.15.4
Release: 0
Summary: Vector Graphics Library with Cross-Device Output Support
License: LGPL-2.1+ or MPL-1.1
@ -27,17 +27,9 @@ Group: System/Libraries
Url: http://cairographics.org/
Source: http://cairographics.org/snapshots/%{name}-%{version}.tar.xz
Source99: baselibs.conf
# PATCH-FIX-UPSTREAM cairo-modules-no-version.patch fdo#29319 dimstar@opensuse.org -- Build modules with -module -avoid-version.
Patch0: cairo-modules-no-version.patch
# PATCH-FIX-UPSTREAM cairo-xlib-endianness.patch fdo#63461 bnc#882951 fcrozat@suse.com -- Fix crash when client and server have different endianness
Patch2: cairo-xlib-endianness.patch
# PATCH-FIX-UPSTREAM cairo-bsc958844-deadlock-on-scaled-font-cache-reset.patch fdo#93891 bsc#958844 hpj@suse.com -- Fix mutex deadlock on certain documents.
Patch3: cairo-bsc958844-deadlock-on-scaled-font-cache-reset.patch
# PATCH-FIX-UPSTREAM cairo-xlib-double-free.patch fdo#91967 boo#997189 badshah400@gmail.com -- xlib: Fix double free in _get_image_surface(); patch taken from upstream git.
Patch4: cairo-xlib-double-free.patch
Patch0: cairo-xlib-endianness.patch
BuildRequires: gtk-doc
# Needed by patch0
BuildRequires: libtool
BuildRequires: pkg-config
BuildRequires: pkgconfig(fontconfig)
BuildRequires: pkgconfig(freetype2)
@ -143,13 +135,8 @@ cairo.
%prep
%setup -q
%patch0 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%build
# Needed by patch0 and patch1
NOCONFIGURE=1 ./autogen.sh
%configure \
--with-pic \
--enable-fc \