diff options
author | Marinus Schraal <foser@gentoo.org> | 2005-03-30 09:51:37 +0000 |
---|---|---|
committer | Marinus Schraal <foser@gentoo.org> | 2005-03-30 09:51:37 +0000 |
commit | 55021621cf8b2dd88ba9966533f4bbfa3ec955a3 (patch) | |
tree | 4a7d7e2d2e2c5f19469d1ae913aebb387e7404c3 /media-libs/gdk-pixbuf | |
parent | digest fix (diff) | |
download | historical-55021621cf8b2dd88ba9966533f4bbfa3ec955a3.tar.gz historical-55021621cf8b2dd88ba9966533f4bbfa3ec955a3.tar.bz2 historical-55021621cf8b2dd88ba9966533f4bbfa3ec955a3.zip |
add bmp loader fix
Package-Manager: portage-2.0.51.19
Diffstat (limited to 'media-libs/gdk-pixbuf')
4 files changed, 123 insertions, 3 deletions
diff --git a/media-libs/gdk-pixbuf/Manifest b/media-libs/gdk-pixbuf/Manifest index 275dd8d39fae..5ceb27b4902e 100644 --- a/media-libs/gdk-pixbuf/Manifest +++ b/media-libs/gdk-pixbuf/Manifest @@ -1,10 +1,13 @@ -MD5 18aa044e5155ebc7a6cd0e32c86c5de1 gdk-pixbuf-0.22.0.ebuild 1306 MD5 3826b463f06d731336873a516b683bd4 gdk-pixbuf-0.22.0-r2.ebuild 1502 -MD5 c8b5e670856dfc60c58cf653f8c5372e ChangeLog 5943 +MD5 18aa044e5155ebc7a6cd0e32c86c5de1 gdk-pixbuf-0.22.0.ebuild 1306 +MD5 ff94323b5fdaea6e9eb36f572aab72c2 gdk-pixbuf-0.22.0-r4.ebuild 1768 MD5 9dcfbabc6910dbdf835de445608d844d gdk-pixbuf-0.22.0-r3.ebuild 1678 +MD5 c8b5e670856dfc60c58cf653f8c5372e ChangeLog 5943 MD5 03ad2e6c4ab41244af1015a8bbb0b39f metadata.xml 158 +MD5 d1fb93f1ae994875158a7e0c108c36f8 files/gdk-pixbuf-0.22.0-bmp_reject_corrupt.patch 1157 MD5 5f59d5772b1482d885a180dbc581cf84 files/gdk-pixbuf-0.22.0-bmp_secure.patch 557 -MD5 6311cee2e3fa5106adf17758b5dab6c6 files/gdk-pixbuf-0.22.0-loaders.patch 2307 MD5 7cb705de10c34e6b633af2ff2912e908 files/digest-gdk-pixbuf-0.22.0-r2 70 MD5 7cb705de10c34e6b633af2ff2912e908 files/digest-gdk-pixbuf-0.22.0-r3 70 +MD5 7cb705de10c34e6b633af2ff2912e908 files/digest-gdk-pixbuf-0.22.0-r4 70 +MD5 6311cee2e3fa5106adf17758b5dab6c6 files/gdk-pixbuf-0.22.0-loaders.patch 2307 MD5 7cb705de10c34e6b633af2ff2912e908 files/digest-gdk-pixbuf-0.22.0 70 diff --git a/media-libs/gdk-pixbuf/files/digest-gdk-pixbuf-0.22.0-r4 b/media-libs/gdk-pixbuf/files/digest-gdk-pixbuf-0.22.0-r4 new file mode 100644 index 000000000000..ce45f33770cf --- /dev/null +++ b/media-libs/gdk-pixbuf/files/digest-gdk-pixbuf-0.22.0-r4 @@ -0,0 +1 @@ +MD5 05fcb68ceaa338614ab650c775efc2f2 gdk-pixbuf-0.22.0.tar.bz2 398208 diff --git a/media-libs/gdk-pixbuf/files/gdk-pixbuf-0.22.0-bmp_reject_corrupt.patch b/media-libs/gdk-pixbuf/files/gdk-pixbuf-0.22.0-bmp_reject_corrupt.patch new file mode 100644 index 000000000000..ffb4378aa3ab --- /dev/null +++ b/media-libs/gdk-pixbuf/files/gdk-pixbuf-0.22.0-bmp_reject_corrupt.patch @@ -0,0 +1,48 @@ +--- gdk-pixbuf-0.22.0/gdk-pixbuf/io-bmp.c 2002-09-27 23:12:40.000000000 +0200 ++++ gdk-pixbuf-0.22.0.patched/gdk-pixbuf/io-bmp.c 2005-03-30 01:33:06.000000000 +0200 +@@ -31,8 +31,6 @@ + #include "gdk-pixbuf-private.h" + #include "gdk-pixbuf-io.h" + +- +- + #if 0 + /* If these structures were unpacked, they would define the two headers of the + * BMP file. After them comes the palette, and then the image data. +@@ -206,7 +204,7 @@ + + if (State == NULL) + return NULL; +- ++ + while (feof(f) == 0) { + length = fread(membuf, 1, sizeof (membuf), f); + if (length > 0) +@@ -245,11 +243,26 @@ + static gboolean + grow_buffer (struct bmp_progressive_state *State) + { +- guchar *tmp = realloc (State->buff, State->BufferSize); ++ guchar *tmp; ++ ++ if (State->BufferSize == 0) { ++#if 0 ++ g_set_error (error, ++ GDK_PIXBUF_ERROR, ++ GDK_PIXBUF_ERROR_CORRUPT_IMAGE, ++ _("BMP image has bogus header data")); ++#endif ++ State->read_state = READ_STATE_ERROR; ++ return FALSE; ++ } ++ ++ tmp = realloc (State->buff, State->BufferSize); ++ + if (!tmp) { + State->read_state = READ_STATE_ERROR; + return FALSE; + } ++ + State->buff = tmp; + return TRUE; + } diff --git a/media-libs/gdk-pixbuf/gdk-pixbuf-0.22.0-r4.ebuild b/media-libs/gdk-pixbuf/gdk-pixbuf-0.22.0-r4.ebuild new file mode 100644 index 000000000000..735a316a0bf6 --- /dev/null +++ b/media-libs/gdk-pixbuf/gdk-pixbuf-0.22.0-r4.ebuild @@ -0,0 +1,68 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-libs/gdk-pixbuf/gdk-pixbuf-0.22.0-r4.ebuild,v 1.1 2005/03/30 09:51:37 foser Exp $ + +inherit virtualx libtool gnome.org gnuconfig eutils + +DESCRIPTION="GNOME Image Library" +HOMEPAGE="http://www.gtk.org/" + +LICENSE="GPL-2 LGPL-2" +SLOT="0" +KEYWORDS="~x86 ~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc" +IUSE="doc mmx" + +RDEPEND="media-libs/jpeg + media-libs/tiff + =x11-libs/gtk+-1.2* + >=media-libs/libpng-1.2.1 + amd64? ( sys-libs/db ) + !amd64? ( <sys-libs/db-2 ) + >=gnome-base/gnome-libs-1.4.1.2-r1" +# We need gnome-libs here, else gnome support do not get compiled into +# gdk-pixbuf (the GnomeCanvasPixbuf library ) +DEPEND="${RDEPEND} + doc? ( dev-util/gtk-doc )" + +src_unpack() { + + unpack ${A} + + cd ${S} + # security fix (#64230) + epatch ${FILESDIR}/${P}-bmp_secure.patch + epatch ${FILESDIR}/${P}-loaders.patch + # reject corrupt bmps (#64230) + epatch ${FILESDIR}/${P}-bmp_reject_corrupt.patch + +} + +src_compile() { + #allow to build on mipslinux systems + gnuconfig_update + + local myconf + #update libtool, else we get the "relink bug" + elibtoolize + + use doc && myconf="--enable-gtk-doc" \ + || myconf="--disable-gtk-doc" + use mmx || myconf="${myconf} --disable-mmx" + econf --sysconfdir=/etc/X11/gdk-pixbuf ${myconf} || die + + #build needs to be able to + #connect to an X display. + Xemake || die +} + +src_install() { + einstall \ + sysconfdir=${D}/etc/X11/gdk-pixbuf || die + + dosed -e "s:${D}::g" /usr/bin/gdk-pixbuf-config + #fix permissions on the loaders + chmod a+rx ${D}/usr/$(get_libdir)/gdk-pixbuf/loaders + chmod a+r ${D}/usr/$(get_libdir)/gdk-pixbuf/loaders/* + + dodoc AUTHORS COPYING* ChangeLog INSTALL README NEWS TODO +} |