1 |
commit: 8e27a74b58384414d920401521f7460a240ea37a |
2 |
Author: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Mar 30 02:00:30 2019 +0000 |
4 |
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Mar 30 02:03:47 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8e27a74b |
7 |
|
8 |
x11-libs/cairo: Pull in a few fixes from upstream |
9 |
|
10 |
Bug: https://bugs.gentoo.org/672908 |
11 |
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org> |
12 |
|
13 |
x11-libs/cairo/cairo-1.16.0-r3.ebuild | 132 +++++++++++++++++++++ |
14 |
...one_MM_Var-instead-of-free-when-available.patch | 30 +++++ |
15 |
.../files/cairo-1.16.0-pdf-add-missing-flush.patch | 29 +++++ |
16 |
3 files changed, 191 insertions(+) |
17 |
|
18 |
diff --git a/x11-libs/cairo/cairo-1.16.0-r3.ebuild b/x11-libs/cairo/cairo-1.16.0-r3.ebuild |
19 |
new file mode 100644 |
20 |
index 00000000000..127a9e7d75f |
21 |
--- /dev/null |
22 |
+++ b/x11-libs/cairo/cairo-1.16.0-r3.ebuild |
23 |
@@ -0,0 +1,132 @@ |
24 |
+# Copyright 1999-2019 Gentoo Authors |
25 |
+# Distributed under the terms of the GNU General Public License v2 |
26 |
+ |
27 |
+EAPI=6 |
28 |
+ |
29 |
+inherit eutils flag-o-matic autotools multilib-minimal |
30 |
+ |
31 |
+if [[ ${PV} == *9999* ]]; then |
32 |
+ inherit git-r3 |
33 |
+ EGIT_REPO_URI="https://gitlab.freedesktop.org/cairo/cairo.git" |
34 |
+ SRC_URI="" |
35 |
+else |
36 |
+ SRC_URI="https://www.cairographics.org/releases/${P}.tar.xz" |
37 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
38 |
+fi |
39 |
+ |
40 |
+DESCRIPTION="A vector graphics library with cross-device output support" |
41 |
+HOMEPAGE="https://www.cairographics.org/ https://gitlab.freedesktop.org/cairo/cairo" |
42 |
+LICENSE="|| ( LGPL-2.1 MPL-1.1 )" |
43 |
+SLOT="0" |
44 |
+IUSE="X aqua debug gles2 +glib opengl static-libs +svg utils valgrind xcb" |
45 |
+# gtk-doc regeneration doesn't seem to work with out-of-source builds |
46 |
+#[[ ${PV} == *9999* ]] && IUSE="${IUSE} doc" # API docs are provided in tarball, no need to regenerate |
47 |
+ |
48 |
+# Test causes a circular depend on gtk+... since gtk+ needs cairo but test needs gtk+ so we need to block it |
49 |
+RESTRICT="test" |
50 |
+ |
51 |
+RDEPEND=" |
52 |
+ >=dev-libs/lzo-2.06-r1[${MULTILIB_USEDEP}] |
53 |
+ >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}] |
54 |
+ >=media-libs/freetype-2.5.0.1:2[${MULTILIB_USEDEP}] |
55 |
+ >=media-libs/libpng-1.6.10:0=[${MULTILIB_USEDEP}] |
56 |
+ sys-libs/binutils-libs:0=[${MULTILIB_USEDEP}] |
57 |
+ >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] |
58 |
+ >=x11-libs/pixman-0.32.4[${MULTILIB_USEDEP}] |
59 |
+ gles2? ( >=media-libs/mesa-9.1.6[gles2,${MULTILIB_USEDEP}] ) |
60 |
+ glib? ( >=dev-libs/glib-2.34.3:2[${MULTILIB_USEDEP}] ) |
61 |
+ opengl? ( >=media-libs/mesa-9.1.6[egl,${MULTILIB_USEDEP}] ) |
62 |
+ X? ( |
63 |
+ >=x11-libs/libXrender-0.9.8[${MULTILIB_USEDEP}] |
64 |
+ >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}] |
65 |
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}] |
66 |
+ ) |
67 |
+ xcb? ( |
68 |
+ >=x11-libs/libxcb-1.9.1[${MULTILIB_USEDEP}] |
69 |
+ )" |
70 |
+DEPEND="${RDEPEND} |
71 |
+ virtual/pkgconfig |
72 |
+ >=sys-devel/libtool-2 |
73 |
+ X? ( x11-base/xorg-proto )" |
74 |
+#[[ ${PV} == *9999* ]] && DEPEND="${DEPEND} |
75 |
+# doc? ( |
76 |
+# >=dev-util/gtk-doc-1.6 |
77 |
+# ~app-text/docbook-xml-dtd-4.2 |
78 |
+# )" |
79 |
+ |
80 |
+REQUIRED_USE=" |
81 |
+ gles2? ( !opengl ) |
82 |
+" |
83 |
+ |
84 |
+PATCHES=( |
85 |
+ "${FILESDIR}"/${PN}-1.12.18-disable-test-suite.patch |
86 |
+ "${FILESDIR}"/${PN}-respect-fontconfig.patch |
87 |
+ "${FILESDIR}"/${P}-pdf-add-missing-flush.patch |
88 |
+ "${FILESDIR}"/${P}-ft-Use-FT_Done_MM_Var-instead-of-free-when-available.patch |
89 |
+) |
90 |
+ |
91 |
+src_prepare() { |
92 |
+ default |
93 |
+ |
94 |
+ # tests and perf tools require X, bug #483574 |
95 |
+ if ! use X; then |
96 |
+ sed -e '/^SUBDIRS/ s#boilerplate test perf# #' -i Makefile.am || die |
97 |
+ fi |
98 |
+ |
99 |
+ # Slightly messed build system YAY |
100 |
+ if [[ ${PV} == *9999* ]]; then |
101 |
+ touch boilerplate/Makefile.am.features |
102 |
+ touch src/Makefile.am.features |
103 |
+ touch ChangeLog |
104 |
+ fi |
105 |
+ |
106 |
+ eautoreconf |
107 |
+} |
108 |
+ |
109 |
+multilib_src_configure() { |
110 |
+ local myopts |
111 |
+ |
112 |
+ [[ ${CHOST} == *-interix* ]] && append-flags -D_REENTRANT |
113 |
+ |
114 |
+ use elibc_FreeBSD && myopts+=" --disable-symbol-lookup" |
115 |
+ |
116 |
+ # [[ ${PV} == *9999* ]] && myopts+=" $(use_enable doc gtk-doc)" |
117 |
+ |
118 |
+ ECONF_SOURCE="${S}" \ |
119 |
+ econf \ |
120 |
+ --disable-dependency-tracking \ |
121 |
+ $(use_with X x) \ |
122 |
+ $(use_enable X tee) \ |
123 |
+ $(use_enable X xlib) \ |
124 |
+ $(use_enable X xlib-xrender) \ |
125 |
+ $(use_enable aqua quartz) \ |
126 |
+ $(use_enable aqua quartz-image) \ |
127 |
+ $(use_enable debug test-surfaces) \ |
128 |
+ $(use_enable gles2 glesv2) \ |
129 |
+ $(use_enable glib gobject) \ |
130 |
+ $(use_enable opengl gl) \ |
131 |
+ $(use_enable static-libs static) \ |
132 |
+ $(use_enable svg) \ |
133 |
+ $(use_enable utils trace) \ |
134 |
+ $(use_enable valgrind) \ |
135 |
+ $(use_enable xcb) \ |
136 |
+ $(use_enable xcb xcb-shm) \ |
137 |
+ --enable-ft \ |
138 |
+ --enable-pdf \ |
139 |
+ --enable-png \ |
140 |
+ --enable-ps \ |
141 |
+ --enable-script \ |
142 |
+ --enable-interpreter \ |
143 |
+ --disable-drm \ |
144 |
+ --disable-directfb \ |
145 |
+ --disable-gallium \ |
146 |
+ --disable-qt \ |
147 |
+ --disable-vg \ |
148 |
+ --disable-xlib-xcb \ |
149 |
+ ${myopts} |
150 |
+} |
151 |
+ |
152 |
+multilib_src_install_all() { |
153 |
+ prune_libtool_files --all |
154 |
+ einstalldocs |
155 |
+} |
156 |
|
157 |
diff --git a/x11-libs/cairo/files/cairo-1.16.0-ft-Use-FT_Done_MM_Var-instead-of-free-when-available.patch b/x11-libs/cairo/files/cairo-1.16.0-ft-Use-FT_Done_MM_Var-instead-of-free-when-available.patch |
158 |
new file mode 100644 |
159 |
index 00000000000..3709c5a90f8 |
160 |
--- /dev/null |
161 |
+++ b/x11-libs/cairo/files/cairo-1.16.0-ft-Use-FT_Done_MM_Var-instead-of-free-when-available.patch |
162 |
@@ -0,0 +1,30 @@ |
163 |
+From 90e85c2493fdfa3551f202ff10282463f1e36645 Mon Sep 17 00:00:00 2001 |
164 |
+From: Carlos Garcia Campos <cgarcia@××××××.com> |
165 |
+Date: Mon, 19 Nov 2018 12:33:07 +0100 |
166 |
+Subject: [PATCH] ft: Use FT_Done_MM_Var instead of free when available in |
167 |
+ cairo_ft_apply_variations |
168 |
+ |
169 |
+Fixes a crash when using freetype >= 2.9 |
170 |
+--- |
171 |
+ src/cairo-ft-font.c | 4 ++++ |
172 |
+ 1 file changed, 4 insertions(+) |
173 |
+ |
174 |
+diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c |
175 |
+index 325dd61b4..981973f78 100644 |
176 |
+--- a/src/cairo-ft-font.c |
177 |
++++ b/src/cairo-ft-font.c |
178 |
+@@ -2393,7 +2393,11 @@ skip: |
179 |
+ done: |
180 |
+ free (coords); |
181 |
+ free (current_coords); |
182 |
++#if HAVE_FT_DONE_MM_VAR |
183 |
++ FT_Done_MM_Var (face->glyph->library, ft_mm_var); |
184 |
++#else |
185 |
+ free (ft_mm_var); |
186 |
++#endif |
187 |
+ } |
188 |
+ } |
189 |
+ |
190 |
+-- |
191 |
+2.19.2 |
192 |
+ |
193 |
|
194 |
diff --git a/x11-libs/cairo/files/cairo-1.16.0-pdf-add-missing-flush.patch b/x11-libs/cairo/files/cairo-1.16.0-pdf-add-missing-flush.patch |
195 |
new file mode 100644 |
196 |
index 00000000000..19345f14187 |
197 |
--- /dev/null |
198 |
+++ b/x11-libs/cairo/files/cairo-1.16.0-pdf-add-missing-flush.patch |
199 |
@@ -0,0 +1,29 @@ |
200 |
+From 4c8813f0eaacc32c27126ad2296951a626300b89 Mon Sep 17 00:00:00 2001 |
201 |
+From: Adrian Johnson <ajohnson@×××××××.com> |
202 |
+Date: Thu, 25 Oct 2018 18:46:17 +1030 |
203 |
+Subject: [PATCH] pdf: add missing flush |
204 |
+ |
205 |
+Issue #342 |
206 |
+--- |
207 |
+ src/cairo-pdf-surface.c | 5 +++++ |
208 |
+ 1 file changed, 5 insertions(+) |
209 |
+ |
210 |
+diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c |
211 |
+index 7eb61aa1e..939b2d2d7 100644 |
212 |
+--- a/src/cairo-pdf-surface.c |
213 |
++++ b/src/cairo-pdf-surface.c |
214 |
+@@ -7711,6 +7711,11 @@ _cairo_pdf_surface_mask (void *abstract_surface, |
215 |
+ * and most common, case to handle. */ |
216 |
+ if (_cairo_pattern_is_constant_alpha (mask, &extents.bounded, &alpha) && |
217 |
+ _can_paint_pattern (source)) { |
218 |
++ |
219 |
++ status = _cairo_pdf_operators_flush (&surface->pdf_operators); |
220 |
++ if (unlikely (status)) |
221 |
++ goto cleanup; |
222 |
++ |
223 |
+ _cairo_output_stream_printf (surface->output, "q\n"); |
224 |
+ status = _cairo_pdf_surface_paint_pattern (surface, |
225 |
+ op, |
226 |
+-- |
227 |
+2.19.2 |
228 |
+ |