summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2018-07-05 00:45:48 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2018-07-05 00:45:48 -0500
commit50996c246981980a7bf0fae1fc0a5907cc2b294a (patch)
treef80465be79d66ffc76a8684a412eaf68efc0ccd3
parent8bab8a78b84e21215cefba433242343e7aaeceed (diff)
downloadpackages-50996c246981980a7bf0fae1fc0a5907cc2b294a.tar.gz
packages-50996c246981980a7bf0fae1fc0a5907cc2b294a.tar.bz2
packages-50996c246981980a7bf0fae1fc0a5907cc2b294a.tar.xz
packages-50996c246981980a7bf0fae1fc0a5907cc2b294a.zip
user/cairo: bump, mark no maintainer, fix
-rw-r--r--user/cairo/APKBUILD81
-rw-r--r--user/cairo/musl-stacksize.patch23
2 files changed, 104 insertions, 0 deletions
diff --git a/user/cairo/APKBUILD b/user/cairo/APKBUILD
new file mode 100644
index 000000000..676764645
--- /dev/null
+++ b/user/cairo/APKBUILD
@@ -0,0 +1,81 @@
+# Maintainer:
+pkgname=cairo
+pkgver=1.14.12
+pkgrel=2
+pkgdesc="A vector graphics library"
+url="https://cairographics.org/"
+arch="all"
+options="!check" # Recursive dependency on gtk+2.0 for check.
+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"
+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
+ "
+
+prepare() {
+ cd "$builddir"
+ default_prepare
+
+ # infinality
+ for j in "$srcdir"/fontconfig-ultimate-$_ultver/$pkgname/*.patch; do
+ msg "Applying ${j}"
+ patch -p1 -i $j
+ done
+}
+
+build() {
+ cd "$builddir"
+ 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
+}
+
+package() {
+ cd "$builddir"
+ make DESTDIR="$pkgdir" install
+}
+
+gobject() {
+ pkgdesc="$pkgdesc (gobject bindings)"
+ mkdir -p "$subpkgdir"/usr/lib
+ mv "$pkgdir"/usr/lib/libcairo-gobject.so.* "$subpkgdir"/usr/lib/
+}
+
+tools() {
+ pkgdesc="$pkgdesc (development tools)"
+ mkdir -p "$subpkgdir"/usr/lib/cairo
+ mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
+ mv "$pkgdir"/usr/lib/cairo/libcairo-trace.* \
+ "$subpkgdir"/usr/lib/cairo/
+}
+
+sha512sums="ede6e75ae95605bf5c4b3859b1824cf125c4a2a35a67d38244cc70951ca44b1d4fd7cf622953d3a7cb868fb5b00856ef6d68ee615276b76eec437641290b01e1 cairo-1.14.12.tar.xz
+d8185f4ec74f44c4746acf7e79bba7ff7ffd9d35bdabeb25e10b4e12825942d910931aa857f1645e5c8185bcb40a1f1ffe1e7e647428e9ea66618b2aec52fac3 fontconfig-ultimate-2016-04-23.tar.gz
+86f26fe41deb5e14f553c999090d1ec1d92a534fa7984112c9a7f1d6c6a8f1b7bb735947e8ec3f26e817f56410efe8cc46c5e682f6a278d49b40a683513740e0 musl-stacksize.patch"
diff --git a/user/cairo/musl-stacksize.patch b/user/cairo/musl-stacksize.patch
new file mode 100644
index 000000000..d10469e17
--- /dev/null
+++ b/user/cairo/musl-stacksize.patch
@@ -0,0 +1,23 @@
+Reduce the footprint of stack frame usage by turning
+some large(r) structures as `static __thread` instead.
+
+--- a/src/cairo-rectangular-scan-converter.c 2015-10-27 22:04:21.000000000 +0100
++++ b/src/cairo-rectangular-scan-converter.c 2016-05-07 04:25:26.640851782 +0200
+@@ -489,7 +489,7 @@
+ cairo_span_renderer_t *renderer,
+ rectangle_t **rectangles)
+ {
+- sweep_line_t sweep_line;
++ static __thread sweep_line_t sweep_line;
+ rectangle_t *start, *stop;
+ cairo_status_t status;
+
+@@ -656,7 +656,7 @@
+ cairo_span_renderer_t *renderer)
+ {
+ cairo_rectangular_scan_converter_t *self = converter;
+- rectangle_t *rectangles_stack[CAIRO_STACK_ARRAY_LENGTH (rectangle_t *)];
++ static __thread rectangle_t *rectangles_stack[CAIRO_STACK_ARRAY_LENGTH (rectangle_t *)];
+ rectangle_t **rectangles;
+ struct _cairo_rectangular_scan_converter_chunk *chunk;
+ cairo_status_t status;