summaryrefslogtreecommitdiff
path: root/user/cairo
diff options
context:
space:
mode:
Diffstat (limited to 'user/cairo')
-rw-r--r--user/cairo/APKBUILD82
-rw-r--r--user/cairo/CVE-2018-19876.patch30
-rw-r--r--user/cairo/cairo-respect-fontconfig_pb.patch13
-rw-r--r--user/cairo/cairo-webkit-html5-fix.patch30
4 files changed, 78 insertions, 77 deletions
diff --git a/user/cairo/APKBUILD b/user/cairo/APKBUILD
index bfb290d7b..3f1823ece 100644
--- a/user/cairo/APKBUILD
+++ b/user/cairo/APKBUILD
@@ -1,67 +1,55 @@
-# Maintainer:
+# Maintainer: Zach van Rijn <me@zv.io>
pkgname=cairo
-pkgver=1.16.0
-pkgrel=1
+pkgver=1.18.4
+pkgrel=0
pkgdesc="A vector graphics library"
url="https://cairographics.org/"
arch="all"
-options="!check" # Recursive dependency on gtk+2.0 for check.
+options="!check" # Times out (after 3600 seconds).
license="LGPL-2.0+ AND MPL-1.1"
-depends=
-depends_dev="fontconfig-dev freetype-dev libxrender-dev pixman-dev
- xcb-util-dev libxext-dev $pkgname-tools"
-makedepends="$depends_dev zlib-dev expat-dev glib-dev libpng-dev
- autoconf automake libtool"
+depends=""
+depends_dev="$pkgname-tools"
+makedepends="expat-dev fontconfig-dev freetype-dev glib-dev gtk-doc libpng-dev
+ libx11-dev libxext-dev libxrender-dev meson pixman-dev xcb-util-dev
+ zlib-dev"
subpackages="$pkgname-dev $pkgname-doc $pkgname-gobject $pkgname-tools"
-# fontconfig-ultimate https://github.com/bohoomil/fontconfig-ultimate
-_ultver="2016-04-23"
source="https://cairographics.org/releases/$pkgname-$pkgver.tar.xz
- fontconfig-ultimate-$_ultver.tar.gz::https://github.com/bohoomil/fontconfig-ultimate/archive/$_ultver.tar.gz
musl-stacksize.patch
- CVE-2018-19876.patch
+ cairo-respect-fontconfig_pb.patch
+ cairo-webkit-html5-fix.patch
"
# secfixes:
+# 1.16.0-r2:
+# - CVE-2019-6462
+# - CVE-2020-35492
# 1.16.0-r1:
# - CVE-2018-19876
-prepare() {
- default_prepare
+build() {
+ meson setup \
+ -Dprefix=/usr \
+ -Dfontconfig=enabled \
+ -Dfreetype=enabled \
+ -Dglib=enabled \
+ -Dpng=enabled \
+ -Dspectre=disabled \
+ -Dtee=enabled \
+ -Dxcb=enabled \
+ -Dxlib=enabled \
+ -Dzlib=enabled \
+ -Dgtk_doc=true \
+ build
- # infinality
- for j in "$srcdir"/fontconfig-ultimate-$_ultver/$pkgname/*.patch; do
- msg "Applying ${j}"
- patch -p1 -i $j
- done
+ meson compile -C build
}
-build() {
- autoreconf -vif
- ./configure \
- --build=$CBUILD \
- --host=$CHOST \
- --prefix=/usr \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --enable-ft \
- --enable-gobject \
- --enable-pdf \
- --enable-png \
- --enable-ps \
- --enable-svg \
- --enable-tee \
- --enable-x \
- --enable-xcb \
- --enable-xcb-shm \
- --enable-xlib \
- --enable-xlib-xrender \
- --disable-xlib-xcb \
- --disable-static
- make
+check() {
+ meson test -C build
}
package() {
- make DESTDIR="$pkgdir" install
+ DESTDIR="$pkgdir" meson install -C build
}
gobject() {
@@ -78,7 +66,7 @@ tools() {
"$subpkgdir"/usr/lib/cairo/
}
-sha512sums="9eb27c4cf01c0b8b56f2e15e651f6d4e52c99d0005875546405b64f1132aed12fbf84727273f493d84056a13105e065009d89e94a8bfaf2be2649e232b82377f cairo-1.16.0.tar.xz
-d8185f4ec74f44c4746acf7e79bba7ff7ffd9d35bdabeb25e10b4e12825942d910931aa857f1645e5c8185bcb40a1f1ffe1e7e647428e9ea66618b2aec52fac3 fontconfig-ultimate-2016-04-23.tar.gz
+sha512sums="863679f817ed67dc2c916c035d740916e27e7e69c04fca63936e37d274e7f4c79848d16c8f7c481798864602e8847c489f698df89b785cbc576c925dbd513316 cairo-1.18.4.tar.xz
86f26fe41deb5e14f553c999090d1ec1d92a534fa7984112c9a7f1d6c6a8f1b7bb735947e8ec3f26e817f56410efe8cc46c5e682f6a278d49b40a683513740e0 musl-stacksize.patch
-9020c596caa54a2ac435d5dae0f121d36d3c3f34d487b9c1032665b1bd15813506adf31984e34b5dd328ee0e068de0627e1d061230758328cae4fa993c3a9209 CVE-2018-19876.patch"
+bdc01ec3619e40e6e260890e038628607076d56d8e64ceaf8a3fd3c92e348d451a12852148a168f2e0e69d40285800fa66e39fdee771d1e0d632311c61923ca2 cairo-respect-fontconfig_pb.patch
+9bf936f9c84f00409d75665034b21fa345c2e1c414715a899ad37ae10eaf54348537a3386ce078a56f1e931c749c3e50a99dd3b4e8aab484077ee18b5b89abe9 cairo-webkit-html5-fix.patch"
diff --git a/user/cairo/CVE-2018-19876.patch b/user/cairo/CVE-2018-19876.patch
deleted file mode 100644
index 33731e4fc..000000000
--- a/user/cairo/CVE-2018-19876.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 90e85c2493fdfa3551f202ff10282463f1e36645 Mon Sep 17 00:00:00 2001
-From: Carlos Garcia Campos <cgarcia@igalia.com>
-Date: Mon, 19 Nov 2018 12:33:07 +0100
-Subject: [PATCH] ft: Use FT_Done_MM_Var instead of free when available in
- cairo_ft_apply_variations
-
-Fixes a crash when using freetype >= 2.9
----
- src/cairo-ft-font.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c
-index 325dd61b4..981973f78 100644
---- a/src/cairo-ft-font.c
-+++ b/src/cairo-ft-font.c
-@@ -2393,7 +2393,11 @@ skip:
- done:
- free (coords);
- free (current_coords);
-+#if HAVE_FT_DONE_MM_VAR
-+ FT_Done_MM_Var (face->glyph->library, ft_mm_var);
-+#else
- free (ft_mm_var);
-+#endif
- }
- }
-
---
-2.21.0
-
diff --git a/user/cairo/cairo-respect-fontconfig_pb.patch b/user/cairo/cairo-respect-fontconfig_pb.patch
new file mode 100644
index 000000000..0bb0f4a7a
--- /dev/null
+++ b/user/cairo/cairo-respect-fontconfig_pb.patch
@@ -0,0 +1,13 @@
+--- a/src/cairo-ft-font.c 2015-03-10 23:21:07.000000000 +0100
++++ b/src/cairo-ft-font.c 2015-03-11 21:59:05.747697134 +0100
+@@ -1932,7 +1932,9 @@ _cairo_ft_options_merge (cairo_ft_option
+ options->base.subpixel_order = other->base.subpixel_order;
+ }
+
+- if (options->base.hint_style == CAIRO_HINT_STYLE_DEFAULT)
++ options->base.hint_style = CAIRO_HINT_STYLE_DEFAULT;
++
++ if (other->base.hint_style != CAIRO_HINT_STYLE_DEFAULT)
+ options->base.hint_style = other->base.hint_style;
+
+ if (other->base.hint_style == CAIRO_HINT_STYLE_NONE)
diff --git a/user/cairo/cairo-webkit-html5-fix.patch b/user/cairo/cairo-webkit-html5-fix.patch
new file mode 100644
index 000000000..07c5c6db8
--- /dev/null
+++ b/user/cairo/cairo-webkit-html5-fix.patch
@@ -0,0 +1,30 @@
+From 0742b90a214b35951414558f6f5579f79b8a8194 Mon Sep 17 00:00:00 2001
+From: Massimo Valentini <mvalentini@src.gnome.org>
+Date: Thu, 21 Aug 2014 17:15:51 +0200
+Subject: [PATCH] Fix segfault rendering videos in webkit based browsers
+
+do not tessellate empty boxes.
+
+Reported-by: Henrique Lengler <henriqueleng@openmailbox.org>
+Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81699
+---
+ src/cairo-bentley-ottmann-rectangular.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/cairo-bentley-ottmann-rectangular.c b/src/cairo-bentley-ottmann-rectangular.c
+index 5541bdc..4bcd8d1 100644
+--- a/src/cairo-bentley-ottmann-rectangular.c
++++ b/src/cairo-bentley-ottmann-rectangular.c
+@@ -834,6 +834,9 @@ _cairo_bentley_ottmann_tessellate_boxes (const cairo_boxes_t *in,
+ for (i = 0; i < chunk->count; i++) {
+ int h;
+
++ if (box[i].p1.y == box[i].p2.y)
++ continue;
++
+ if (box[i].p1.x < box[i].p2.x) {
+ rectangles[j].left.x = box[i].p1.x;
+ rectangles[j].left.dir = 1;
+--
+1.9.3
+