From d5b3a734402a61e2790e90410fe08634eebe32ce Mon Sep 17 00:00:00 2001 From: Von Random Date: Mon, 9 Jan 2017 10:50:18 +0300 Subject: [PATCH] add cairo-ubuntu that works with older freetype2 --- cairo-ubuntu/.SRCINFO | 50 +++++++++++++ cairo-ubuntu/CHANGELOG | 52 ++++++++++++++ cairo-ubuntu/PKGBUILD | 72 +++++++++++++++++++ .../cairo-respect-fontconfig_pb.patch | 13 ++++ .../cairo-server-side-gradients.patch | 17 +++++ cairo-ubuntu/cairo-webkit-html5-fix.patch | 30 ++++++++ 6 files changed, 234 insertions(+) create mode 100644 cairo-ubuntu/.SRCINFO create mode 100644 cairo-ubuntu/CHANGELOG create mode 100644 cairo-ubuntu/PKGBUILD create mode 100644 cairo-ubuntu/cairo-respect-fontconfig_pb.patch create mode 100644 cairo-ubuntu/cairo-server-side-gradients.patch create mode 100644 cairo-ubuntu/cairo-webkit-html5-fix.patch diff --git a/cairo-ubuntu/.SRCINFO b/cairo-ubuntu/.SRCINFO new file mode 100644 index 0000000..dc3ac73 --- /dev/null +++ b/cairo-ubuntu/.SRCINFO @@ -0,0 +1,50 @@ +# Generated by mksrcinfo v8 +# Sun Jun 19 09:43:20 UTC 2016 +pkgbase = cairo-ubuntu + pkgdesc = Cairo vector graphics library + pkgver = 1.14.6 + pkgrel = 1 + url = http://cairographics.org/ + changelog = CHANGELOG + arch = i686 + arch = x86_64 + license = LGPL + license = MPL + 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>=0.28.0 + depends = glib2 + depends = mesa + depends = libgl + depends = lzo + provides = cairo=1.14.6 + provides = cairo-ubuntu + provides = cairo-xcb + conflicts = cairo + conflicts = cairo-cleartype + conflicts = cairo-git + conflicts = cairo-gl-git + conflicts = cairo-glitz + conflicts = cairo-ocaml-git + conflicts = cairo-small + replaces = cairo-xcb + source = http://cairographics.org/releases/cairo-1.14.6.tar.xz + source = cairo-respect-fontconfig_pb.patch + source = cairo-server-side-gradients.patch + source = cairo-webkit-html5-fix.patch + md5sums = 23a0b2f0235431d35238df1d3a517fdb + md5sums = 080eac1ce1b2fa2beb550555d31d29b8 + md5sums = 4ffec1c86085da11bf9f56d6bf88fbdf + md5sums = 6080d20e289f5e75cc013e8f40710aa3 + +pkgname = cairo-ubuntu + diff --git a/cairo-ubuntu/CHANGELOG b/cairo-ubuntu/CHANGELOG new file mode 100644 index 0000000..303bde9 --- /dev/null +++ b/cairo-ubuntu/CHANGELOG @@ -0,0 +1,52 @@ + +cairo-infinality-ultimate +========================= + +CHANGELOG +--------- + +2014-10-15 +~~~~~~~~~~ + +### cairo-infinality-ultimate, rev. 1.14.0-1 (incl. multilib) + +* New upstream release. + +2014-09-26 +~~~~~~~~~~ + +### cairo-infinality-ultimate, rev. 1.13.1-2 (incl. multilib) + +* Merging latest upstream commits as used in the stock Arch Linux cairo 1.13.1. +* Removing obsolete Ubuntu patches. + +2014-09-09 +~~~~~~~~~~ + +### cairo-infinality-ultimate, rev. 1.13.1-1 (incl. multilib) + +* Upstream code base upgraded to version 1.13.1 (Ubuntu source package). +* Fixed Webkit browsers crashing on HTML5 video playback. + +2014-06-01 +~~~~~~~~~~ + +### cairo-infinality-ultimate, rev. 1.12.16-6 (incl. multilib) + +* Package update. + +2014-05-03 +~~~~~~~~~~ + +### cairo-infinality-ultimate, rev. 1.12.16-5 + +* Package update. + +2013-10-11 +~~~~~~~~~~ + +### cairo-infinality-ultimate, rev. 1.12.16-3 + +* Packages rebuilt with the updated Ubuntu patchset. + + diff --git a/cairo-ubuntu/PKGBUILD b/cairo-ubuntu/PKGBUILD new file mode 100644 index 0000000..48d7e1f --- /dev/null +++ b/cairo-ubuntu/PKGBUILD @@ -0,0 +1,72 @@ +# Maintainer: Ner0 +# Contributor: Tevin Zhang +# Contributor: Paul Bredbury +# Contributor: Biru Ionut +# Contributor: Andrea Fagiani + +# Installation order: freetype2-ubuntu fontconfig-ubuntu libxft-ubuntu cairo-ubuntu +# Source : https://github.com/bohoomil/fontconfig-ultimate/tree/pkgbuild/03_cairo-iu +# Thanks to bohomil + +pkgname=cairo-ubuntu +_name=cairo +pkgver=1.14.6 +pkgrel=1 +pkgdesc="Cairo vector graphics library" +arch=(i686 x86_64) +license=('LGPL' 'MPL') +changelog=CHANGELOG +url="http://cairographics.org/" +depends=('libpng' 'libxrender' 'libxext' 'fontconfig' 'pixman>=0.28.0' + 'glib2' 'mesa' 'libgl' 'lzo') +makedepends=('librsvg' 'gtk2' 'poppler-glib' 'libspectre' + 'gtk-doc' 'valgrind' 'git') +provides=("cairo=$pkgver" 'cairo-ubuntu' 'cairo-xcb') +replaces=('cairo-xcb') +conflicts=('cairo' 'cairo-cleartype' 'cairo-git' 'cairo-gl-git' 'cairo-glitz' + 'cairo-ocaml-git' 'cairo-small') +source=(http://cairographics.org/releases/cairo-$pkgver.tar.xz + cairo-respect-fontconfig_pb.patch + cairo-server-side-gradients.patch + cairo-webkit-html5-fix.patch) + +prepare(){ + cd $_name-$pkgver + + patch -Np1 -i $srcdir/cairo-respect-fontconfig_pb.patch + patch -Np1 -i $srcdir/cairo-server-side-gradients.patch + patch -Np1 -i $srcdir/cairo-webkit-html5-fix.patch +} + +build() { + cd $_name-$pkgver + + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --disable-static \ + --disable-lto \ + --enable-tee \ + --enable-gl \ + --enable-egl \ + --enable-svg \ + --enable-ps \ + --enable-pdf \ + --enable-gobject \ + --enable-gtk-doc + + make +} + +check() { + cd $_name-$pkgver +} + +package() { + cd $_name-$pkgver + make DESTDIR="$pkgdir" install +} +md5sums=('23a0b2f0235431d35238df1d3a517fdb' + '080eac1ce1b2fa2beb550555d31d29b8' + '4ffec1c86085da11bf9f56d6bf88fbdf' + '6080d20e289f5e75cc013e8f40710aa3') diff --git a/cairo-ubuntu/cairo-respect-fontconfig_pb.patch b/cairo-ubuntu/cairo-respect-fontconfig_pb.patch new file mode 100644 index 0000000..68844fc --- /dev/null +++ b/cairo-ubuntu/cairo-respect-fontconfig_pb.patch @@ -0,0 +1,13 @@ +--- a/src/cairo-ft-font.c 2008-09-29 21:43:13.000000000 +0100 ++++ b/src/cairo-ft-font.c 2008-09-29 21:52:19.000000000 +0100 +@@ -1705,7 +1705,9 @@ + 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-ubuntu/cairo-server-side-gradients.patch b/cairo-ubuntu/cairo-server-side-gradients.patch new file mode 100644 index 0000000..7b134aa --- /dev/null +++ b/cairo-ubuntu/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 +=================================================================== +--- cairo-1.12.2.orig/src/cairo-xlib-display.c 2012-04-25 21:53:19.000000000 +1200 ++++ cairo-1.12.2/src/cairo-xlib-display.c 2012-05-17 16:06:18.543220800 +1200 +@@ -266,11 +266,7 @@ + /* 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-ubuntu/cairo-webkit-html5-fix.patch b/cairo-ubuntu/cairo-webkit-html5-fix.patch new file mode 100644 index 0000000..e56bbc9 --- /dev/null +++ b/cairo-ubuntu/cairo-webkit-html5-fix.patch @@ -0,0 +1,30 @@ +From 0742b90a214b35951414558f6f5579f79b8a8194 Mon Sep 17 00:00:00 2001 +From: Massimo Valentini +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 +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 +