diff options
Diffstat (limited to 'meta/recipes-graphics/cairo')
6 files changed, 87 insertions, 172 deletions
diff --git a/meta/recipes-graphics/cairo/cairo/CVE-2018-19876.patch b/meta/recipes-graphics/cairo/cairo/CVE-2018-19876.patch deleted file mode 100644 index 4252a5663b..0000000000 --- a/meta/recipes-graphics/cairo/cairo/CVE-2018-19876.patch +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | CVE: CVE-2018-19876 | ||
2 | Upstream-Status: Backport | ||
3 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
4 | |||
5 | From 90e85c2493fdfa3551f202ff10282463f1e36645 Mon Sep 17 00:00:00 2001 | ||
6 | From: Carlos Garcia Campos <cgarcia@igalia.com> | ||
7 | Date: Mon, 19 Nov 2018 12:33:07 +0100 | ||
8 | Subject: [PATCH] ft: Use FT_Done_MM_Var instead of free when available in | ||
9 | cairo_ft_apply_variations | ||
10 | |||
11 | Fixes a crash when using freetype >= 2.9 | ||
12 | --- | ||
13 | src/cairo-ft-font.c | 4 ++++ | ||
14 | 1 file changed, 4 insertions(+) | ||
15 | |||
16 | diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c | ||
17 | index 325dd61b4..981973f78 100644 | ||
18 | --- a/src/cairo-ft-font.c | ||
19 | +++ b/src/cairo-ft-font.c | ||
20 | @@ -2393,7 +2393,11 @@ skip: | ||
21 | done: | ||
22 | free (coords); | ||
23 | free (current_coords); | ||
24 | +#if HAVE_FT_DONE_MM_VAR | ||
25 | + FT_Done_MM_Var (face->glyph->library, ft_mm_var); | ||
26 | +#else | ||
27 | free (ft_mm_var); | ||
28 | +#endif | ||
29 | } | ||
30 | } | ||
31 | |||
32 | -- | ||
33 | 2.11.0 | ||
34 | |||
diff --git a/meta/recipes-graphics/cairo/cairo/CVE-2019-6461.patch b/meta/recipes-graphics/cairo/cairo/CVE-2019-6461.patch deleted file mode 100644 index 5232cf70c6..0000000000 --- a/meta/recipes-graphics/cairo/cairo/CVE-2019-6461.patch +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | There is a potential infinite-loop in function _arc_error_normalized(). | ||
2 | |||
3 | CVE: CVE-2019-6461 | ||
4 | Upstream-Status: Pending | ||
5 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
6 | |||
7 | diff --git a/src/cairo-arc.c b/src/cairo-arc.c | ||
8 | index 390397bae..f9249dbeb 100644 | ||
9 | --- a/src/cairo-arc.c | ||
10 | +++ b/src/cairo-arc.c | ||
11 | @@ -99,7 +99,7 @@ _arc_max_angle_for_tolerance_normalized (double tolerance) | ||
12 | do { | ||
13 | angle = M_PI / i++; | ||
14 | error = _arc_error_normalized (angle); | ||
15 | - } while (error > tolerance); | ||
16 | + } while (error > tolerance && error > __DBL_EPSILON__); | ||
17 | |||
18 | return angle; | ||
19 | } | ||
diff --git a/meta/recipes-graphics/cairo/cairo/CVE-2019-6462.patch b/meta/recipes-graphics/cairo/cairo/CVE-2019-6462.patch deleted file mode 100644 index 4e4598c5b5..0000000000 --- a/meta/recipes-graphics/cairo/cairo/CVE-2019-6462.patch +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | There is an assertion in function _cairo_arc_in_direction(). | ||
2 | |||
3 | CVE: CVE-2019-6462 | ||
4 | Upstream-Status: Pending | ||
5 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
6 | |||
7 | diff --git a/src/cairo-arc.c b/src/cairo-arc.c | ||
8 | index 390397bae..1bde774a4 100644 | ||
9 | --- a/src/cairo-arc.c | ||
10 | +++ b/src/cairo-arc.c | ||
11 | @@ -186,7 +186,8 @@ _cairo_arc_in_direction (cairo_t *cr, | ||
12 | if (cairo_status (cr)) | ||
13 | return; | ||
14 | |||
15 | - assert (angle_max >= angle_min); | ||
16 | + if (angle_max < angle_min) | ||
17 | + return; | ||
18 | |||
19 | if (angle_max - angle_min > 2 * M_PI * MAX_FULL_CIRCLES) { | ||
20 | angle_max = fmod (angle_max - angle_min, 2 * M_PI); | ||
diff --git a/meta/recipes-graphics/cairo/cairo/cairo-get_bitmap_surface-bsc1036789-CVE-2017-7475.diff b/meta/recipes-graphics/cairo/cairo/cairo-get_bitmap_surface-bsc1036789-CVE-2017-7475.diff index 7aaad2eedd..6c761bf2a7 100644 --- a/meta/recipes-graphics/cairo/cairo/cairo-get_bitmap_surface-bsc1036789-CVE-2017-7475.diff +++ b/meta/recipes-graphics/cairo/cairo/cairo-get_bitmap_surface-bsc1036789-CVE-2017-7475.diff | |||
@@ -3,7 +3,7 @@ Cairo: Fix Denial-of-Service Attack due to Logical Problem in Program | |||
3 | https://bugs.freedesktop.org/show_bug.cgi?id=100763 | 3 | https://bugs.freedesktop.org/show_bug.cgi?id=100763 |
4 | 4 | ||
5 | CVE: CVE-2017-7475 | 5 | CVE: CVE-2017-7475 |
6 | Upstream-Status: Submitted | 6 | Upstream-Status: Submitted [https://gitlab.freedesktop.org/cairo/cairo/-/issues/80] |
7 | 7 | ||
8 | Signed-off-by: Fan Xin <fan.xin@jp.fujitsu.com> | 8 | Signed-off-by: Fan Xin <fan.xin@jp.fujitsu.com> |
9 | 9 | ||
diff --git a/meta/recipes-graphics/cairo/cairo_1.16.0.bb b/meta/recipes-graphics/cairo/cairo_1.16.0.bb deleted file mode 100644 index 68f993d7ca..0000000000 --- a/meta/recipes-graphics/cairo/cairo_1.16.0.bb +++ /dev/null | |||
@@ -1,98 +0,0 @@ | |||
1 | SUMMARY = "The Cairo 2D vector graphics library" | ||
2 | DESCRIPTION = "Cairo is a multi-platform library providing anti-aliased \ | ||
3 | vector-based rendering for multiple target backends. Paths consist \ | ||
4 | of line segments and cubic splines and can be rendered at any width \ | ||
5 | with various join and cap styles. All colors may be specified with \ | ||
6 | optional translucence (opacity/alpha) and combined using the \ | ||
7 | extended Porter/Duff compositing algebra as found in the X Render \ | ||
8 | Extension." | ||
9 | HOMEPAGE = "http://cairographics.org" | ||
10 | BUGTRACKER = "http://bugs.freedesktop.org" | ||
11 | SECTION = "libs" | ||
12 | |||
13 | LICENSE = "(MPL-1.1 | LGPLv2.1) & GPLv3+" | ||
14 | LICENSE_${PN} = "MPL-1.1 | LGPLv2.1" | ||
15 | LICENSE_${PN}-dev = "MPL-1.1 | LGPLv2.1" | ||
16 | LICENSE_${PN}-doc = "MPL-1.1 | LGPLv2.1" | ||
17 | LICENSE_${PN}-gobject = "MPL-1.1 | LGPLv2.1" | ||
18 | LICENSE_${PN}-script-interpreter = "MPL-1.1 | LGPLv2.1" | ||
19 | LICENSE_${PN}-perf-utils = "GPLv3+" | ||
20 | |||
21 | LIC_FILES_CHKSUM = "file://COPYING;md5=e73e999e0c72b5ac9012424fa157ad77" | ||
22 | |||
23 | DEPENDS = "fontconfig glib-2.0 libpng pixman zlib" | ||
24 | |||
25 | SRC_URI = "http://cairographics.org/releases/cairo-${PV}.tar.xz \ | ||
26 | file://cairo-get_bitmap_surface-bsc1036789-CVE-2017-7475.diff \ | ||
27 | file://CVE-2018-19876.patch \ | ||
28 | file://CVE-2019-6461.patch \ | ||
29 | file://CVE-2019-6462.patch \ | ||
30 | " | ||
31 | |||
32 | SRC_URI[md5sum] = "f19e0353828269c22bd72e271243a552" | ||
33 | SRC_URI[sha256sum] = "5e7b29b3f113ef870d1e3ecf8adf21f923396401604bda16d44be45e66052331" | ||
34 | |||
35 | inherit autotools pkgconfig upstream-version-is-even gtk-doc multilib_script | ||
36 | |||
37 | MULTILIB_SCRIPTS = "${PN}-perf-utils:${bindir}/cairo-trace" | ||
38 | |||
39 | X11DEPENDS = "virtual/libx11 libsm libxrender libxext" | ||
40 | |||
41 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'directfb', d)} \ | ||
42 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xcb', '', d)} \ | ||
43 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'opengl', '', d)} \ | ||
44 | trace" | ||
45 | PACKAGECONFIG_class-native = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xcb', '', d)}" | ||
46 | PACKAGECONFIG_class-nativesdk = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xcb', '', d)}" | ||
47 | |||
48 | PACKAGECONFIG[x11] = "--with-x=yes -enable-xlib,--with-x=no --disable-xlib,${X11DEPENDS}" | ||
49 | PACKAGECONFIG[xcb] = "--enable-xcb,--disable-xcb,libxcb" | ||
50 | PACKAGECONFIG[directfb] = "--enable-directfb=yes,,directfb" | ||
51 | PACKAGECONFIG[valgrind] = "--enable-valgrind=yes,--disable-valgrind,valgrind" | ||
52 | PACKAGECONFIG[egl] = "--enable-egl=yes,--disable-egl,virtual/egl" | ||
53 | PACKAGECONFIG[glesv2] = "--enable-glesv2,--disable-glesv2,virtual/libgles2" | ||
54 | PACKAGECONFIG[opengl] = "--enable-gl,--disable-gl,virtual/libgl" | ||
55 | PACKAGECONFIG[trace] = "--enable-trace,--disable-trace" | ||
56 | |||
57 | EXTRA_OECONF += " \ | ||
58 | ${@bb.utils.contains('TARGET_FPU', 'soft', '--disable-some-floating-point', '', d)} \ | ||
59 | --enable-tee \ | ||
60 | " | ||
61 | |||
62 | # We don't depend on binutils so we need to disable this | ||
63 | export ac_cv_lib_bfd_bfd_openr="no" | ||
64 | # Ensure we don't depend on LZO | ||
65 | export ac_cv_lib_lzo2_lzo2a_decompress="no" | ||
66 | |||
67 | do_install_append () { | ||
68 | rm -rf ${D}${bindir}/cairo-sphinx | ||
69 | rm -rf ${D}${libdir}/cairo/cairo-fdr* | ||
70 | rm -rf ${D}${libdir}/cairo/cairo-sphinx* | ||
71 | rm -rf ${D}${libdir}/cairo/.debug/cairo-fdr* | ||
72 | rm -rf ${D}${libdir}/cairo/.debug/cairo-sphinx* | ||
73 | [ ! -d ${D}${bindir} ] || | ||
74 | rmdir -p --ignore-fail-on-non-empty ${D}${bindir} | ||
75 | [ ! -d ${D}${libdir}/cairo ] || | ||
76 | rmdir -p --ignore-fail-on-non-empty ${D}${libdir}/cairo | ||
77 | } | ||
78 | |||
79 | PACKAGES =+ "cairo-gobject cairo-script-interpreter cairo-perf-utils" | ||
80 | |||
81 | SUMMARY_cairo-gobject = "The Cairo library GObject wrapper library" | ||
82 | DESCRIPTION_cairo-gobject = "A GObject wrapper library for the Cairo API." | ||
83 | |||
84 | SUMMARY_cairo-script-interpreter = "The Cairo library script interpreter" | ||
85 | DESCRIPTION_cairo-script-interpreter = "The Cairo script interpreter implements \ | ||
86 | CairoScript. CairoScript is used by tracing utilities to enable the ability \ | ||
87 | to replay rendering." | ||
88 | |||
89 | DESCRIPTION_cairo-perf-utils = "The Cairo library performance utilities" | ||
90 | |||
91 | FILES_${PN} = "${libdir}/libcairo.so.*" | ||
92 | FILES_${PN}-gobject = "${libdir}/libcairo-gobject.so.*" | ||
93 | FILES_${PN}-script-interpreter = "${libdir}/libcairo-script-interpreter.so.*" | ||
94 | FILES_${PN}-perf-utils = "${bindir}/cairo-trace* ${libdir}/cairo/*.la ${libdir}/cairo/libcairo-trace.so" | ||
95 | |||
96 | BBCLASSEXTEND = "native nativesdk" | ||
97 | |||
98 | UPSTREAM_CHECK_REGEX = "cairo-(?P<pver>\d+(\.\d+)+).tar.xz" | ||
diff --git a/meta/recipes-graphics/cairo/cairo_1.18.0.bb b/meta/recipes-graphics/cairo/cairo_1.18.0.bb new file mode 100644 index 0000000000..4c97e973d0 --- /dev/null +++ b/meta/recipes-graphics/cairo/cairo_1.18.0.bb | |||
@@ -0,0 +1,86 @@ | |||
1 | SUMMARY = "The Cairo 2D vector graphics library" | ||
2 | DESCRIPTION = "Cairo is a multi-platform library providing anti-aliased \ | ||
3 | vector-based rendering for multiple target backends. Paths consist \ | ||
4 | of line segments and cubic splines and can be rendered at any width \ | ||
5 | with various join and cap styles. All colors may be specified with \ | ||
6 | optional translucence (opacity/alpha) and combined using the \ | ||
7 | extended Porter/Duff compositing algebra as found in the X Render \ | ||
8 | Extension." | ||
9 | HOMEPAGE = "http://cairographics.org" | ||
10 | BUGTRACKER = "https://gitlab.freedesktop.org/cairo/cairo/-/issues" | ||
11 | SECTION = "libs" | ||
12 | |||
13 | LICENSE = "(MPL-1.1 | LGPL-2.1-only) & GPL-3.0-or-later" | ||
14 | LICENSE:${PN} = "MPL-1.1 | LGPL-2.1-only" | ||
15 | LICENSE:${PN}-dev = "MPL-1.1 | LGPL-2.1-only" | ||
16 | LICENSE:${PN}-doc = "MPL-1.1 | LGPL-2.1-only" | ||
17 | LICENSE:${PN}-gobject = "MPL-1.1 | LGPL-2.1-only" | ||
18 | LICENSE:${PN}-script-interpreter = "MPL-1.1 | LGPL-2.1-only" | ||
19 | LICENSE:${PN}-perf-utils = "GPL-3.0-or-later" | ||
20 | # Adapt the licenses for cairo-dbg and cairo-src depending on whether | ||
21 | # cairo-trace is being built. | ||
22 | LICENSE:${PN}-dbg = "(MPL-1.1 | LGPL-2.1-only)${@bb.utils.contains('PACKAGECONFIG', 'trace', ' & GPL-3.0-or-later', '', d)}" | ||
23 | LICENSE:${PN}-src = "(MPL-1.1 | LGPL-2.1-only)${@bb.utils.contains('PACKAGECONFIG', 'trace', ' & GPL-3.0-or-later', '', d)}" | ||
24 | |||
25 | LIC_FILES_CHKSUM = "file://COPYING;md5=e73e999e0c72b5ac9012424fa157ad77 \ | ||
26 | ${@bb.utils.contains('PACKAGECONFIG', 'trace', 'file://util/cairo-trace/COPYING-GPL-3;md5=d32239bcb673463ab874e80d47fae504', '', d)}" | ||
27 | |||
28 | |||
29 | DEPENDS = "fontconfig freetype glib-2.0 libpng pixman zlib" | ||
30 | |||
31 | SRC_URI = "http://cairographics.org/releases/cairo-${PV}.tar.xz \ | ||
32 | file://cairo-get_bitmap_surface-bsc1036789-CVE-2017-7475.diff \ | ||
33 | " | ||
34 | |||
35 | SRC_URI[sha256sum] = "243a0736b978a33dee29f9cca7521733b78a65b5418206fef7bd1c3d4cf10b64" | ||
36 | |||
37 | inherit meson pkgconfig upstream-version-is-even gtk-doc multilib_script | ||
38 | |||
39 | # if qemu usermode isn't available, this value needs to be set statically | ||
40 | # (otherwise it's determinted by running a small target executable with qemu) | ||
41 | do_write_config:append() { | ||
42 | cat >${WORKDIR}/cairo.cross <<EOF | ||
43 | [properties] | ||
44 | ipc_rmid_deferred_release = 'true' | ||
45 | EOF | ||
46 | } | ||
47 | EXTRA_OEMESON:append:class-nativesdk = "${@' --cross-file ${WORKDIR}/cairo.cross' if d.getVar('EXEWRAPPER_ENABLED') == 'False' else ''}" | ||
48 | EXTRA_OEMESON:append:class-target = "${@' --cross-file ${WORKDIR}/cairo.cross' if d.getVar('EXEWRAPPER_ENABLED') == 'False' else ''}" | ||
49 | |||
50 | GTKDOC_MESON_OPTION = "gtk_doc" | ||
51 | |||
52 | MULTILIB_SCRIPTS = "${PN}-perf-utils:${bindir}/cairo-trace" | ||
53 | |||
54 | PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xlib xcb', '', d)} trace" | ||
55 | PACKAGECONFIG[xlib] = "-Dxlib=enabled,-Dxlib=disabled,virtual/libx11 libxrender libxext" | ||
56 | PACKAGECONFIG[xcb] = "-Dxcb=enabled,-Dxcb=disabled,libxcb" | ||
57 | # cairo-trace is GPLv3 so add an option to remove it | ||
58 | PACKAGECONFIG[trace] = "" | ||
59 | |||
60 | do_install:append () { | ||
61 | if ! ${@bb.utils.contains('PACKAGECONFIG', 'trace', 'true', 'false', d)}; then | ||
62 | rm ${D}${bindir}/cairo-trace ${D}${libdir}/cairo/libcairo-trace.so | ||
63 | rmdir --ignore-fail-on-non-empty ${D}${bindir} ${D}${libdir}/cairo | ||
64 | fi | ||
65 | } | ||
66 | |||
67 | PACKAGES =+ "cairo-gobject cairo-script-interpreter cairo-perf-utils" | ||
68 | |||
69 | SUMMARY:cairo-gobject = "The Cairo library GObject wrapper library" | ||
70 | DESCRIPTION:cairo-gobject = "A GObject wrapper library for the Cairo API." | ||
71 | |||
72 | SUMMARY:cairo-script-interpreter = "The Cairo library script interpreter" | ||
73 | DESCRIPTION:cairo-script-interpreter = "The Cairo script interpreter implements \ | ||
74 | CairoScript. CairoScript is used by tracing utilities to enable the ability \ | ||
75 | to replay rendering." | ||
76 | |||
77 | DESCRIPTION:cairo-perf-utils = "The Cairo library performance utilities" | ||
78 | |||
79 | FILES:${PN} = "${libdir}/libcairo.so.*" | ||
80 | FILES:${PN}-gobject = "${libdir}/libcairo-gobject.so.*" | ||
81 | FILES:${PN}-script-interpreter = "${libdir}/libcairo-script-interpreter.so.*" | ||
82 | FILES:${PN}-perf-utils = "${bindir}/cairo-* ${libdir}/cairo/libcairo-trace.so ${libdir}/cairo/libcairo-fdr.so" | ||
83 | |||
84 | BBCLASSEXTEND = "native nativesdk" | ||
85 | |||
86 | UPSTREAM_CHECK_REGEX = "cairo-(?P<pver>\d+(\.\d+)+).tar.xz" | ||