From f282f15ae747cab342559be7ec65c9bee4c9ba55 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Thu, 5 Jul 2018 00:40:15 -0500 Subject: user/pixman: take, fix --- user/pixman/APKBUILD | 40 +++++++++++++++++++++++++++++++++++ user/pixman/float-header-fix.patch | 16 ++++++++++++++ user/pixman/stacksize-reduction.patch | 35 ++++++++++++++++++++++++++++++ 3 files changed, 91 insertions(+) create mode 100644 user/pixman/APKBUILD create mode 100644 user/pixman/float-header-fix.patch create mode 100644 user/pixman/stacksize-reduction.patch (limited to 'user/pixman') diff --git a/user/pixman/APKBUILD b/user/pixman/APKBUILD new file mode 100644 index 000000000..607a49afb --- /dev/null +++ b/user/pixman/APKBUILD @@ -0,0 +1,40 @@ +# Maintainer: A. Wilcox +pkgname=pixman +pkgver=0.34.0 +pkgrel=5 +pkgdesc="Low-level pixel manipulation library" +url="https://www.X.Org/" +arch="all" +license="MIT" +subpackages="$pkgname-dev $pkgname-dbg" +makedepends="perl linux-headers" +source="https://www.X.Org/releases/individual/lib/$pkgname-$pkgver.tar.bz2 + float-header-fix.patch + stacksize-reduction.patch + " + +build() { + cd "$builddir" + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr \ + --disable-static \ + --disable-openmp \ + --disable-arm-iwmmxt + make +} + +check() { + cd "$builddir" + make check +} + +package() { + cd "$builddir" + make DESTDIR="$pkgdir" install +} + +sha512sums="755a3f5596e7bd9710abc8e5bfd341adaf2177f5b21f7aaae7f85b8fb57580ea48df586ad32bf6adef6ce0430e7cadaa57754a2fa466bc4b15bf70ee64cd1418 pixman-0.34.0.tar.bz2 +5064da221fe406e58169df0b07df7123ccf65487e654dba9e0903122480363c2b4e11ec0a14ac546658c747934509f2f66e3d0d078d6dd0ac92505c24b0e9ee9 float-header-fix.patch +3d75e7328e6eaaa6e8f4defa4402db815764369f94b81be38fba07933267fe24b03b591dd4c3f3544cb090650153728bfbdd81a91acaf19524c3d08f61427f63 stacksize-reduction.patch" diff --git a/user/pixman/float-header-fix.patch b/user/pixman/float-header-fix.patch new file mode 100644 index 000000000..5c151a14f --- /dev/null +++ b/user/pixman/float-header-fix.patch @@ -0,0 +1,16 @@ +--- ./pixman/pixman-private.h.orig ++++ ./pixman/pixman-private.h +@@ -1,5 +1,3 @@ +-#include +- + #ifndef PIXMAN_PRIVATE_H + #define PIXMAN_PRIVATE_H + +@@ -30,6 +28,7 @@ + #include + #include + #include ++#include + + #include "pixman-compiler.h" + diff --git a/user/pixman/stacksize-reduction.patch b/user/pixman/stacksize-reduction.patch new file mode 100644 index 000000000..38da9b3ff --- /dev/null +++ b/user/pixman/stacksize-reduction.patch @@ -0,0 +1,35 @@ +Reduce the stack footprint of pixman's function +general_composite_rect() which allocates a large buffer +`stack_scanline_buffer`. Make it `static __thread` instead. + +--- a/pixman/pixman-general.c 2015-12-27 21:37:37.000000000 +0100 ++++ b/pixman/pixman-general.c 2016-05-05 12:24:47.346661080 +0200 +@@ -128,8 +128,8 @@ + pixman_composite_info_t *info) + { + PIXMAN_COMPOSITE_ARGS (info); +- uint8_t stack_scanline_buffer[3 * SCANLINE_BUFFER_LENGTH]; +- uint8_t *scanline_buffer = (uint8_t *) stack_scanline_buffer; ++ static __thread uint8_t static_scanline_buffer[3 * SCANLINE_BUFFER_LENGTH]; ++ uint8_t *scanline_buffer = (uint8_t *) static_scanline_buffer; + uint8_t *src_buffer, *mask_buffer, *dest_buffer; + pixman_iter_t src_iter, mask_iter, dest_iter; + pixman_combine_32_func_t compose; +@@ -158,7 +158,7 @@ + if (width <= 0 || _pixman_multiply_overflows_int (width, Bpp * 3)) + return; + +- if (width * Bpp * 3 > sizeof (stack_scanline_buffer) - 15 * 3) ++ if (width * Bpp * 3 > sizeof (static_scanline_buffer) - 15 * 3) + { + scanline_buffer = pixman_malloc_ab_plus_c (width, Bpp * 3, 15 * 3); + +@@ -232,7 +232,7 @@ + if (dest_iter.fini) + dest_iter.fini (&dest_iter); + +- if (scanline_buffer != (uint8_t *) stack_scanline_buffer) ++ if (scanline_buffer != (uint8_t *) static_scanline_buffer) + free (scanline_buffer); + } + -- cgit v1.2.3-60-g2f50