summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Deljanov2019-03-25 16:19:55 -0400
committerPhilip Deljanov2019-03-25 16:19:55 -0400
commitd9f61b5a0fd0ef94c04c45fabdfec0f53789c9c0 (patch)
tree236bdaf00278f3cf9f3c9f1fcc393aa88f7ce72d
downloadaur-d9f61b5a0fd0ef94c04c45fabdfec0f53789c9c0.tar.gz
Add cairo-infinality-remix to AUR.
-rw-r--r--.SRCINFO53
-rw-r--r--0001-ft-Use-FT_Done_MM_Var-instead-of-free-when-available.patch32
-rw-r--r--PKGBUILD92
-rw-r--r--cairo-make-lcdfilter-default.patch28
-rw-r--r--cairo-respect-fontconfig_pb.patch13
-rw-r--r--cairo-server-side-gradients.patch17
-rw-r--r--cairo-webkit-html5-fix.patch30
7 files changed, 265 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..efb7a5017e9
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,53 @@
+pkgbase = cairo-infinality-remix
+ pkgdesc = Cairo vector graphics library with Infinality patch support
+ pkgver = 1.16.0
+ pkgrel = 2
+ url = http://cairographics.org/
+ arch = i686
+ arch = x86_64
+ groups = infinality-remix
+ license = LGPL
+ license = MPL
+ makedepends = libgl
+ makedepends = librsvg
+ makedepends = gtk2
+ makedepends = poppler-glib
+ makedepends = libspectre
+ makedepends = gtk-doc
+ makedepends = valgrind
+ makedepends = git
+ depends = libpng
+ depends = libxrender
+ depends = libxext
+ depends = fontconfig
+ depends = pixman
+ depends = glib2
+ depends = libgl
+ depends = lzo
+ provides = cairo-xcb
+ provides = cairo
+ conflicts = cairo
+ conflicts = cairo-git
+ conflicts = cairo-nomesa
+ conflicts = cairo-infinality
+ conflicts = cairo-infinality-ultimate
+ conflicts = cairo-cleartype
+ conflicts = cairo-dfb
+ conflicts = cairo-ocaml-git
+ conflicts = cairo-ubuntu
+ replaces = cairo-xcb
+ source = git+https://anongit.freedesktop.org/git/cairo#tag=1.16.0
+ source = 0001-ft-Use-FT_Done_MM_Var-instead-of-free-when-available.patch
+ source = cairo-make-lcdfilter-default.patch
+ source = cairo-respect-fontconfig_pb.patch
+ source = cairo-server-side-gradients.patch
+ source = cairo-webkit-html5-fix.patch
+ sha256sums = SKIP
+ sha256sums = 52ab418058076ad01e046ebbbdc834f390305516c222d07de91a93a4dcebe921
+ sha256sums = 9d692ffdbb13eaf5a66e7b5821fa6d67f2dbe3629d86d40e44f8bdcf0e6cdc2d
+ sha256sums = 3ef17cfd14b3edc14092b5e96fc63673b6b020b7f05adaa59d3c3e4b0cfdde66
+ sha256sums = b80c99b10fd48dbf98abd70ca2d1265ad6035383c47bfbee5e540a814b6d2a23
+ sha256sums = e4fea537fae57f42a453dbace666482fc4de4cb7090d0141fdefb4388f842f32
+
+pkgname = cairo-infinality-remix
+
diff --git a/0001-ft-Use-FT_Done_MM_Var-instead-of-free-when-available.patch b/0001-ft-Use-FT_Done_MM_Var-instead-of-free-when-available.patch
new file mode 100644
index 00000000000..0cc9f45d429
--- /dev/null
+++ b/0001-ft-Use-FT_Done_MM_Var-instead-of-free-when-available.patch
@@ -0,0 +1,32 @@
+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
+
+Signed-off-by: Laurent Carlier <lordheavym@gmail.com>
+---
+ 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.20.1
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..9d81b07e75b
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,92 @@
+# Maintainer: Philip Deljanov <philip dot deljanov at gmail dot com>
+# Contributor: bohoomil <bohoomil at zoho dot com>
+
+pkgname=cairo-infinality-remix
+_name=cairo
+pkgver=1.16.0
+pkgrel=2
+pkgdesc="Cairo vector graphics library with Infinality patch support"
+arch=(i686 x86_64)
+license=('LGPL' 'MPL')
+url="http://cairographics.org/"
+groups=('infinality-remix')
+
+# requires libGL + libEGL - all libgl variants (mesa
+depends=('libpng' 'libxrender' 'libxext' 'fontconfig' 'pixman' 'glib2' 'libgl' 'lzo')
+makedepends=('libgl' 'librsvg' 'gtk2' 'poppler-glib' 'libspectre' 'gtk-doc' 'valgrind' 'git')
+provides=('cairo-xcb' 'cairo')
+replaces=('cairo-xcb')
+conflicts=('cairo'
+ 'cairo-git'
+ 'cairo-nomesa'
+ 'cairo-infinality'
+ 'cairo-infinality-ultimate'
+ 'cairo-cleartype'
+ 'cairo-dfb'
+ 'cairo-ocaml-git'
+ 'cairo-ubuntu')
+
+source=("git+https://anongit.freedesktop.org/git/cairo#tag=$pkgver"
+ 0001-ft-Use-FT_Done_MM_Var-instead-of-free-when-available.patch
+ cairo-make-lcdfilter-default.patch
+ cairo-respect-fontconfig_pb.patch
+ cairo-server-side-gradients.patch
+ cairo-webkit-html5-fix.patch)
+
+sha256sums=('SKIP'
+ '52ab418058076ad01e046ebbbdc834f390305516c222d07de91a93a4dcebe921'
+ '9d692ffdbb13eaf5a66e7b5821fa6d67f2dbe3629d86d40e44f8bdcf0e6cdc2d'
+ '3ef17cfd14b3edc14092b5e96fc63673b6b020b7f05adaa59d3c3e4b0cfdde66'
+ 'b80c99b10fd48dbf98abd70ca2d1265ad6035383c47bfbee5e540a814b6d2a23'
+ 'e4fea537fae57f42a453dbace666482fc4de4cb7090d0141fdefb4388f842f32')
+
+prepare(){
+ cd $_name
+
+ # CVE-2018-19876
+ patch -Np1 -i "${srcdir}"/0001-ft-Use-FT_Done_MM_Var-instead-of-free-when-available.patch
+
+ # Infinality patches
+ patch -Np1 -i "${srcdir}"/cairo-make-lcdfilter-default.patch
+ patch -Np1 -i "${srcdir}"/cairo-respect-fontconfig_pb.patch
+
+ # Misc. patches
+ patch -Np1 -i "${srcdir}"/cairo-server-side-gradients.patch
+ patch -Np1 -i "${srcdir}"/cairo-webkit-html5-fix.patch
+
+ # Update gtk-doc
+ cp /usr/share/aclocal/gtk-doc.m4 build/aclocal.gtk-doc.m4
+ cp /usr/share/gtk-doc/data/gtk-doc.make build/Makefile.am.gtk-doc
+
+ NOCONFIGURE=1 ./autogen.sh
+}
+
+build() {
+ cd $_name
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --disable-static \
+ --disable-gl \
+ --enable-tee \
+ --enable-svg \
+ --enable-ps \
+ --enable-pdf \
+ --enable-gobject \
+ --enable-gtk-doc
+ sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
+ make
+}
+
+check() {
+ cd cairo
+ # FIXME: tests don't pass
+ env CAIRO_TEST_TARGET=image \
+ CAIRO_TEST_TARGET_FORMAT=rgba \
+ CAIRO_TESTS='!pthread-show-text' make -k check || :
+}
+
+package() {
+ cd $_name
+ make DESTDIR="$pkgdir" install
+}
diff --git a/cairo-make-lcdfilter-default.patch b/cairo-make-lcdfilter-default.patch
new file mode 100644
index 00000000000..279f40a1b2e
--- /dev/null
+++ b/cairo-make-lcdfilter-default.patch
@@ -0,0 +1,28 @@
+diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c
+index 3e485c5..36703d1 100644
+--- a/src/cairo-ft-font.c
++++ b/src/cairo-ft-font.c
+@@ -1336,7 +1336,7 @@ _render_glyph_outline (FT_Face face,
+ cairo_image_surface_t **surface)
+ {
+ int rgba = FC_RGBA_UNKNOWN;
+- int lcd_filter = FT_LCD_FILTER_LEGACY;
++ int lcd_filter = FT_LCD_FILTER_DEFAULT;
+ FT_GlyphSlot glyphslot = face->glyph;
+ FT_Outline *outline = &glyphslot->outline;
+ FT_Bitmap bitmap;
+@@ -1371,13 +1371,13 @@ _render_glyph_outline (FT_Face face,
+ case CAIRO_LCD_FILTER_NONE:
+ lcd_filter = FT_LCD_FILTER_NONE;
+ break;
+- case CAIRO_LCD_FILTER_DEFAULT:
+ case CAIRO_LCD_FILTER_INTRA_PIXEL:
+ lcd_filter = FT_LCD_FILTER_LEGACY;
+ break;
+ case CAIRO_LCD_FILTER_FIR3:
+ lcd_filter = FT_LCD_FILTER_LIGHT;
+ break;
++ case CAIRO_LCD_FILTER_DEFAULT:
+ case CAIRO_LCD_FILTER_FIR5:
+ lcd_filter = FT_LCD_FILTER_DEFAULT;
+ break;
diff --git a/cairo-respect-fontconfig_pb.patch b/cairo-respect-fontconfig_pb.patch
new file mode 100644
index 00000000000..55912cd2371
--- /dev/null
+++ b/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
+@@ -1841,7 +1841,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/cairo-server-side-gradients.patch b/cairo-server-side-gradients.patch
new file mode 100644
index 00000000000..b5b012aaf21
--- /dev/null
+++ b/cairo-server-side-gradients.patch
@@ -0,0 +1,17 @@
+# Description: don't use server side gradients most drivers don't handle it
+Index: cairo-1.12.2/src/cairo-xlib-display.c
+===================================================================
+--- a/src/cairo-xlib-display.c 2015-03-10 23:21:07.000000000 +0100
++++ b/src/cairo-xlib-display.c 2015-03-11 21:59:05.751030406 +0100
+@@ -263,11 +263,7 @@ _cairo_xlib_device_create (Display *dpy)
+ /* Prior to Render 0.10, there is no protocol support for gradients and
+ * we call function stubs instead, which would silently consume the drawing.
+ */
+-#if RENDER_MAJOR == 0 && RENDER_MINOR < 10
+ display->buggy_gradients = TRUE;
+-#else
+- display->buggy_gradients = FALSE;
+-#endif
+ display->buggy_pad_reflect = FALSE;
+ display->buggy_repeat = FALSE;
+
diff --git a/cairo-webkit-html5-fix.patch b/cairo-webkit-html5-fix.patch
new file mode 100644
index 00000000000..e56bbc92230
--- /dev/null
+++ b/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
+@@ -823,6 +823,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
+