diff --git a/.cairo.metadata b/.cairo.metadata index 7c92a91..d87d9d8 100644 --- a/.cairo.metadata +++ b/.cairo.metadata @@ -1 +1 @@ -c6f7b99986f93c9df78653c3e6a3b5043f65145e SOURCES/cairo-1.14.8.tar.xz +4e64c6a48789edb4c60bc3fa95bd3992cc388b88 SOURCES/cairo-1.15.12.tar.xz diff --git a/.gitignore b/.gitignore index 7358dc8..8fc78e6 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/cairo-1.14.8.tar.xz +SOURCES/cairo-1.15.12.tar.xz diff --git a/SOURCES/0001-Fix-assertion-failure-in-the-freetype-backend.patch b/SOURCES/0001-Fix-assertion-failure-in-the-freetype-backend.patch new file mode 100644 index 0000000..f891dfb --- /dev/null +++ b/SOURCES/0001-Fix-assertion-failure-in-the-freetype-backend.patch @@ -0,0 +1,51 @@ +From 7554822dd0b52d33ec7898e81b59e97164b00142 Mon Sep 17 00:00:00 2001 +From: Uli Schlachter +Date: Sat, 21 Apr 2018 09:37:06 +0200 +Subject: [PATCH] Fix assertion failure in the freetype backend + +Fonts are kept in a hash table, so when creating a new font, the code +first checks the hash table for an already-existing entry and only then +is a new instance really created. There is an assert that checks that +the key used for the hash table lookup is the same as the instance that +is created later has, because otherwise the hash table was checked +incorrectly. + +This assert failed in some conditions. + +Fix this by fixing some places that initialised ft hash keys in a wrong +way. + +Patch by Behdad Esfahbod and submitted via bugzilla. + +Source: https://bugs.freedesktop.org/show_bug.cgi?id=105746#c4 +Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=105746 +Signed-off-by: Uli Schlachter +--- + src/cairo-ft-font.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c +index 79aef78f5b0d..9b10708988d7 100644 +--- a/src/cairo-ft-font.c ++++ b/src/cairo-ft-font.c +@@ -445,7 +445,7 @@ _cairo_ft_unscaled_font_init (cairo_ft_unscaled_font_t *unscaled, + + if (from_face) { + unscaled->from_face = TRUE; +- _cairo_ft_unscaled_font_init_key (unscaled, TRUE, NULL, face->face_index, face); ++ _cairo_ft_unscaled_font_init_key (unscaled, TRUE, NULL, id, face); + + + unscaled->have_color = FT_HAS_COLOR (face) != 0; +@@ -640,7 +640,7 @@ static cairo_status_t + _cairo_ft_unscaled_font_create_from_face (FT_Face face, + cairo_ft_unscaled_font_t **out) + { +- return _cairo_ft_unscaled_font_create_internal (TRUE, NULL, 0, face, out); ++ return _cairo_ft_unscaled_font_create_internal (TRUE, NULL, face->face_index, face, out); + } + + static cairo_bool_t +-- +2.17.0 + diff --git a/SPECS/cairo.spec b/SPECS/cairo.spec index a47225c..3c05e01 100644 --- a/SPECS/cairo.spec +++ b/SPECS/cairo.spec @@ -2,14 +2,24 @@ %define freetype_version 2.1.9 %define fontconfig_version 2.2.95 +%if 0%{?fedora} > 26 || 0%{?rhel} > 7 +%global cairogl --disable-gl +%else +%global cairogl --enable-gl +%global with_gl 1 +%endif + Name: cairo -Version: 1.14.8 -Release: 2%{?dist} +Version: 1.15.12 +Release: 3%{?dist} Summary: A 2D graphics library License: LGPLv2 or MPLv1.1 URL: http://cairographics.org -Source0: http://cairographics.org/releases/%{name}-%{version}.tar.xz +Source0: http://cairographics.org/snapshots/%{name}-%{version}.tar.xz + +# Backported from upstream +Patch0: 0001-Fix-assertion-failure-in-the-freetype-backend.patch Patch3: cairo-multilib.patch @@ -23,18 +33,18 @@ BuildRequires: freetype-devel >= %{freetype_version} BuildRequires: fontconfig-devel >= %{fontconfig_version} BuildRequires: glib2-devel BuildRequires: librsvg2-devel +%if 0%{?with_gl} BuildRequires: mesa-libGL-devel BuildRequires: mesa-libEGL-devel +%endif %description Cairo is a 2D graphics library designed to provide high-quality display and print output. Currently supported output targets include the X Window -System, OpenGL (via glitz), in-memory image buffers, and image files (PDF, -PostScript, and SVG). +System, in-memory image buffers, and image files (PDF, PostScript, and SVG). Cairo is designed to produce consistent output on all output media while -taking advantage of display hardware acceleration when available (e.g. -through the X Render Extension or OpenGL). +taking advantage of display hardware acceleration when available. %package devel Summary: Development files for cairo @@ -81,8 +91,7 @@ This package contains tools for working with the cairo graphics library. * cairo-trace: Record cairo library calls for later playback %prep -%setup -q -%patch3 -p1 -b .multilib +%autosetup -p1 %build %configure --disable-static \ @@ -92,8 +101,8 @@ This package contains tools for working with the cairo graphics library. --enable-pdf \ --enable-svg \ --enable-tee \ - --enable-gl \ --enable-gobject \ + %{cairogl} \ --disable-gtk-doc sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool @@ -131,7 +140,6 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %{_includedir}/cairo/cairo-version.h %{_includedir}/cairo/cairo-xlib-xrender.h %{_includedir}/cairo/cairo-xlib.h -%{_includedir}/cairo/cairo-gl.h %{_includedir}/cairo/cairo-script.h %{_includedir}/cairo/cairo-xcb.h %{_libdir}/libcairo.so @@ -146,13 +154,16 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %{_libdir}/pkgconfig/cairo-tee.pc %{_libdir}/pkgconfig/cairo-xlib.pc %{_libdir}/pkgconfig/cairo-xlib-xrender.pc -%{_libdir}/pkgconfig/cairo-egl.pc -%{_libdir}/pkgconfig/cairo-gl.pc -%{_libdir}/pkgconfig/cairo-glx.pc %{_libdir}/pkgconfig/cairo-script.pc %{_libdir}/pkgconfig/cairo-xcb-shm.pc %{_libdir}/pkgconfig/cairo-xcb.pc %{_datadir}/gtk-doc/html/cairo +%if 0%{?with_gl} +%{_includedir}/cairo/cairo-gl.h +%{_libdir}/pkgconfig/cairo-egl.pc +%{_libdir}/pkgconfig/cairo-gl.pc +%{_libdir}/pkgconfig/cairo-glx.pc +%endif %files gobject %{_libdir}/libcairo-gobject.so.* @@ -167,6 +178,14 @@ find $RPM_BUILD_ROOT -name '*.la' -delete %{_libdir}/cairo/ %changelog +* Mon Sep 10 2018 Kalev Lember - 1.15.12-3 +- Rebuild against new freetype +- Resolves: #1625906 + +* Fri Jun 01 2018 Richard Hughes - 1.15.12-1 +- Update to 1.15.12 +- Resolves: #1576535 + * Wed Apr 19 2017 Kalev Lember - 1.14.8-2 - Remove all libtool .la files from cairo private directories as well - Resolves: #1386819