diff options
author | Doug Goldstein <cardoe@gentoo.org> | 2008-08-21 13:20:17 +0000 |
---|---|---|
committer | Doug Goldstein <cardoe@gentoo.org> | 2008-08-21 13:20:17 +0000 |
commit | f55c76177e363b799dee5bc810672d5001714de7 (patch) | |
tree | fb3ca56b1bdb2f1bbaea9e1e8bbdc7cf4c2be1b4 /x11-libs/cairo | |
parent | drop (more or less) useless messages to einfo instead of elog (diff) | |
download | gentoo-2-f55c76177e363b799dee5bc810672d5001714de7.tar.gz gentoo-2-f55c76177e363b799dee5bc810672d5001714de7.tar.bz2 gentoo-2-f55c76177e363b799dee5bc810672d5001714de7.zip |
fix issue with libpng's API change. bug #235072
(Portage version: 2.2_rc8/cvs/Linux 2.6.25-gentoo-r6 x86_64)
Diffstat (limited to 'x11-libs/cairo')
-rw-r--r-- | x11-libs/cairo/ChangeLog | 8 | ||||
-rw-r--r-- | x11-libs/cairo/cairo-1.6.4-r1.ebuild | 83 | ||||
-rw-r--r-- | x11-libs/cairo/files/cairo-1.6.4-libpng-api-change.patch | 27 |
3 files changed, 117 insertions, 1 deletions
diff --git a/x11-libs/cairo/ChangeLog b/x11-libs/cairo/ChangeLog index d3f6caaa2628..bf5ba4c7ba33 100644 --- a/x11-libs/cairo/ChangeLog +++ b/x11-libs/cairo/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for x11-libs/cairo # Copyright 2000-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/x11-libs/cairo/ChangeLog,v 1.189 2008/08/16 03:18:10 cardoe Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-libs/cairo/ChangeLog,v 1.190 2008/08/21 13:20:16 cardoe Exp $ + +*cairo-1.6.4-r1 (21 Aug 2008) + + 21 Aug 2008; Doug Goldstein <cardoe@gentoo.org> + +files/cairo-1.6.4-libpng-api-change.patch, +cairo-1.6.4-r1.ebuild: + fix issue with libpng's API change. bug #235072 16 Aug 2008; Doug Goldstein <cardoe@gentoo.org> metadata.xml: add GLEP 56 USE flag desc from use.local.desc diff --git a/x11-libs/cairo/cairo-1.6.4-r1.ebuild b/x11-libs/cairo/cairo-1.6.4-r1.ebuild new file mode 100644 index 000000000000..60ea008f6fcf --- /dev/null +++ b/x11-libs/cairo/cairo-1.6.4-r1.ebuild @@ -0,0 +1,83 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/x11-libs/cairo/cairo-1.6.4-r1.ebuild,v 1.1 2008/08/21 13:20:16 cardoe Exp $ + +inherit eutils flag-o-matic libtool + +DESCRIPTION="A vector graphics library with cross-device output support" +HOMEPAGE="http://cairographics.org/" +SRC_URI="http://cairographics.org/releases/${P}.tar.gz" + +LICENSE="|| ( LGPL-2.1 MPL-1.1 )" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd" +IUSE="debug directfb doc glitz opengl svg test X xcb" + +# Test causes a circular depend on gtk+... since gtk+ needs cairo but test needs gtk+ so we need to block it +RESTRICT="test" + +RDEPEND="media-libs/fontconfig + >=media-libs/freetype-2.1.9 + sys-libs/zlib + media-libs/libpng + >=x11-libs/pixman-0.10.0 + X? ( + x11-libs/libXrender + x11-libs/libXext + x11-libs/libX11 + virtual/xft + xcb? ( x11-libs/libxcb + x11-libs/xcb-util ) + ) + directfb? ( >=dev-libs/DirectFB-0.9.24 ) + glitz? ( >=media-libs/glitz-0.5.1 ) + svg? ( dev-libs/libxml2 )" + +DEPEND="${RDEPEND} + >=dev-util/pkgconfig-0.19 + X? ( x11-proto/renderproto + xcb? ( x11-proto/xcb-proto ) ) + doc? ( + >=dev-util/gtk-doc-1.6 + ~app-text/docbook-xml-dtd-4.2 + )" + +src_unpack() { + unpack ${A} + cd "${S}" + + # libpng's API changed as of 1.2.30, this is backwards compat with + # older libpng's as well. bug #235072 + epatch "${FILESDIR}"/${PN}-1.6.4-libpng-api-change.patch + + # We need to run elibtoolize to ensure correct so versioning on FreeBSD + elibtoolize +} + +src_compile() { + local use_xcb + + #gets rid of fbmmx.c inlining warnings + append-flags -finline-limit=1200 + + if use glitz && use opengl; then + export glitz_LIBS=-lglitz-glx + fi + + use_xcb="--disable-xcb" + use X && use xcb && use_xcb="--enable-xcb" + + econf $(use_enable X xlib) $(use_enable doc gtk-doc) \ + $(use_enable directfb) ${use_xcb} \ + $(use_enable svg) $(use_enable glitz) $(use_enable X xlib-xrender) \ + $(use_enable debug test-surfaces) --enable-pdf --enable-png \ + --enable-freetype --enable-ps \ + || die "configure failed" + + emake || die "compile failed" +} + +src_install() { + make DESTDIR="${D}" install || die "Installation failed" + dodoc AUTHORS ChangeLog NEWS README +} diff --git a/x11-libs/cairo/files/cairo-1.6.4-libpng-api-change.patch b/x11-libs/cairo/files/cairo-1.6.4-libpng-api-change.patch new file mode 100644 index 000000000000..b67de786b361 --- /dev/null +++ b/x11-libs/cairo/files/cairo-1.6.4-libpng-api-change.patch @@ -0,0 +1,27 @@ +diff -ru cairo-1.6.4/src/cairo-png.c cairo-1.6.4-mod/src/cairo-png.c +--- cairo-1.6.4/src/cairo-png.c 2008-04-11 17:07:25.000000000 -0400 ++++ cairo-1.6.4-mod/src/cairo-png.c 2008-08-19 17:19:36.682399853 -0400 +@@ -119,6 +119,14 @@ + } + + ++/* Starting with libpng-1.2.30, we must explicitly specify an output_flush_fn. ++ * Otherwise, we will segfault if we are writing to a stream. */ ++static void ++png_simple_output_flush_fn (png_structp png_ptr) ++{ ++ return; ++} ++ + static cairo_status_t + write_png (cairo_surface_t *surface, + png_rw_ptr write_func, +@@ -179,7 +187,7 @@ + goto BAIL3; + #endif + +- png_set_write_fn (png, closure, write_func, NULL); ++ png_set_write_fn (png, closure, write_func, png_simple_output_flush_fn); + + switch (image->format) { + case CAIRO_FORMAT_ARGB32: |