From f38edbff3878008c8b2ae1ca8a496c349763017b Mon Sep 17 00:00:00 2001 From: root Date: Sun, 28 Apr 2013 01:12:25 -0700 Subject: Sun Apr 28 01:11:42 PDT 2013 --- multilib-staging/lib32-cairo/PKGBUILD | 46 +++++++++++++++++++++++++++++ multilib-staging/lib32-cairo/libpng16.patch | 40 +++++++++++++++++++++++++ 2 files changed, 86 insertions(+) create mode 100644 multilib-staging/lib32-cairo/PKGBUILD create mode 100644 multilib-staging/lib32-cairo/libpng16.patch (limited to 'multilib-staging/lib32-cairo') diff --git a/multilib-staging/lib32-cairo/PKGBUILD b/multilib-staging/lib32-cairo/PKGBUILD new file mode 100644 index 000000000..87ddae50b --- /dev/null +++ b/multilib-staging/lib32-cairo/PKGBUILD @@ -0,0 +1,46 @@ +# $Id: PKGBUILD 89175 2013-04-27 13:22:02Z ioni $ +# Maintainer: Ionut Biru + +_pkgbasename=cairo +pkgname=lib32-$_pkgbasename +pkgver=1.12.14 +pkgrel=4 +pkgdesc="Cairo vector graphics library (32-bit)" +arch=('x86_64') +url="http://cairographics.org/" +license=('LGPL' 'MPL') +makedepends=('gcc-multilib' 'lib32-gtk2' 'lib32-mesa>=9.1' 'lib32-mesa-libgl>=9.1' 'mesa-libgl') # we need to avoid old libgl in [extra] +source=(http://cairographics.org/releases/${_pkgbasename}-${pkgver}.tar.xz + libpng16.patch) +options=(!libtool) +sha1sums=('9106ab09b2e7b9f90521b18dd4a7e9577eba6c15' + 'c9911f185637d266ce1d2985bd6fb7d0df3d75b2') + +build() { + export CC="gcc -m32" + export CXX="g++ -m32" + export PKG_CONFIG_PATH="/usr/lib32/pkgconfig" + + cd "${srcdir}/${_pkgbasename}-${pkgver}" + + patch -Np1 -i ../libpng16.patch + ./configure --prefix=/usr \ + --libdir=/usr/lib32 \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --disable-static \ + --enable-tee \ + --enable-gl \ + --enable-egl + # --disable-xlib-xcb + make +} + +package() { + depends=('lib32-libpng' 'lib32-libxext' 'lib32-libxrender' 'lib32-fontconfig' + 'lib32-pixman' 'lib32-glib2' 'lib32-mesa>=9.1' 'lib32-libgl' ${_pkgbasename}) + + cd "${srcdir}/${_pkgbasename}-${pkgver}" + make DESTDIR="${pkgdir}" install + rm -rf "${pkgdir}"/usr/{include,share,bin} +} diff --git a/multilib-staging/lib32-cairo/libpng16.patch b/multilib-staging/lib32-cairo/libpng16.patch new file mode 100644 index 000000000..c16317811 --- /dev/null +++ b/multilib-staging/lib32-cairo/libpng16.patch @@ -0,0 +1,40 @@ +From 2dd2c826a5b367d32cf2d48ed69754795990c5db Mon Sep 17 00:00:00 2001 +From: Chris Wilson +Date: Tue, 16 Apr 2013 09:58:56 +0000 +Subject: png: Avoid marking the surface as in error after a png warning + +It turns out that libpng will continue to load an image after throwing a +warning, and that libpng16 now throws warnings for images that libpng15 +and earlier loaded without error. As we were happily loading those +images into cairo surfaces before, we are therefore being overzealous +in throwing an error now - so just squelch the warning. + +Signed-off-by: Chris Wilson +--- +diff --git a/src/cairo-png.c b/src/cairo-png.c +index e74a4a8..068617d 100644 +--- a/src/cairo-png.c ++++ b/src/cairo-png.c +@@ -149,13 +149,13 @@ static void + png_simple_warning_callback (png_structp png, + png_const_charp error_msg) + { +- cairo_status_t *error = png_get_error_ptr (png); +- +- /* default to the most likely error */ +- if (*error == CAIRO_STATUS_SUCCESS) +- *error = _cairo_error (CAIRO_STATUS_NO_MEMORY); +- +- /* png does not expect to abort and will try to tidy up after a warning */ ++ /* png does not expect to abort and will try to tidy up and continue ++ * loading the image after a warning. So we also want to return the ++ * (incorrect?) surface. ++ * ++ * We use our own warning callback to squelch any attempts by libpng ++ * to write to stderr as we may not be in control of that output. ++ */ + } + + +-- +cgit v0.9.0.2-2-gbebe -- cgit v1.2.3-54-g00ecf