diff options
author | Stefan Cornelius <dercorny@gentoo.org> | 2006-05-30 12:48:18 +0000 |
---|---|---|
committer | Stefan Cornelius <dercorny@gentoo.org> | 2006-05-30 12:48:18 +0000 |
commit | 2a6cbec5afeefa3ee154731fb6cb10243cad81c6 (patch) | |
tree | 3eb3e2d455f390ef5bcbadd7bbdfa58942a008af /media-gfx | |
parent | Stable on amd64 wrt bug #132213 (diff) | |
download | gentoo-2-2a6cbec5afeefa3ee154731fb6cb10243cad81c6.tar.gz gentoo-2-2a6cbec5afeefa3ee154731fb6cb10243cad81c6.tar.bz2 gentoo-2-2a6cbec5afeefa3ee154731fb6cb10243cad81c6.zip |
Adding zgv 5.9, bug #134839
(Portage version: 2.1_rc3-r1)
Diffstat (limited to 'media-gfx')
-rw-r--r-- | media-gfx/zgv/ChangeLog | 10 | ||||
-rw-r--r-- | media-gfx/zgv/files/digest-zgv-5.9 | 3 | ||||
-rw-r--r-- | media-gfx/zgv/files/zgv-5.9-cmyk-yccl-fix.diff | 64 | ||||
-rw-r--r-- | media-gfx/zgv/zgv-5.9.ebuild | 52 |
4 files changed, 127 insertions, 2 deletions
diff --git a/media-gfx/zgv/ChangeLog b/media-gfx/zgv/ChangeLog index 0eb67608d48c..a4b5ebb37513 100644 --- a/media-gfx/zgv/ChangeLog +++ b/media-gfx/zgv/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for media-gfx/zgv -# Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-gfx/zgv/ChangeLog,v 1.11 2004/12/15 14:59:04 lanius Exp $ +# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/media-gfx/zgv/ChangeLog,v 1.12 2006/05/30 12:48:18 dercorny Exp $ + +*zgv-5.9 (30 May 2006) + + 30 May 2006; Stefan Cornelius <corny@gentoo.org> + +files/zgv-5.9-cmyk-yccl-fix.diff, +zgv-5.9.ebuild: + Adding zgv 5.9, security bug #134839 *zgv-5.8 (06 Nov 2004) diff --git a/media-gfx/zgv/files/digest-zgv-5.9 b/media-gfx/zgv/files/digest-zgv-5.9 new file mode 100644 index 000000000000..f63e50c101d5 --- /dev/null +++ b/media-gfx/zgv/files/digest-zgv-5.9 @@ -0,0 +1,3 @@ +MD5 d65a434ddeb612f0c488177f873afad2 zgv-5.9.tar.gz 395525 +RMD160 1d1c47c77adc732c581d9db1189243a94c510586 zgv-5.9.tar.gz 395525 +SHA256 92e5d848fb51a77dc0ebb0ab383c1499c23aaff01f5445e9b0d75e067a8a64ba zgv-5.9.tar.gz 395525 diff --git a/media-gfx/zgv/files/zgv-5.9-cmyk-yccl-fix.diff b/media-gfx/zgv/files/zgv-5.9-cmyk-yccl-fix.diff new file mode 100644 index 000000000000..e510a4ba9ec2 --- /dev/null +++ b/media-gfx/zgv/files/zgv-5.9-cmyk-yccl-fix.diff @@ -0,0 +1,64 @@ +--- zgv-5.9/src/readjpeg.c Sun Oct 31 14:54:26 2004 ++++ zgv/src/readjpeg.c Wed Sep 21 21:03:22 2005 +@@ -92,11 +92,13 @@ + int *real_width,int *real_height) + { + static FILE *in; ++static int cmyk; + struct my_error_mgr jerr; + int row_stride; /* physical row width in output buffer */ + int tmp,f; +-unsigned char *ptr; ++unsigned char *ptr,*ptr2; + ++cmyk=0; + use_errmsg=0; + theimage=NULL; + howfar=howfarfunc; +@@ -161,6 +163,15 @@ + pal[f]=pal[256+f]=pal[512+f]=f; + } + ++if(cinfo.jpeg_color_space==JCS_CMYK) ++ cmyk=1; ++ ++if(cinfo.jpeg_color_space==JCS_YCCK) ++ { ++ cmyk=1; ++ cinfo.out_color_space=JCS_CMYK; ++ } ++ + width=cinfo.image_width; + height=cinfo.image_height; + +@@ -191,7 +202,7 @@ + } + + if(WH_BAD(width,height) || +- (theimage=(byte *)malloc(pixelsize*width*height))==NULL) ++ (theimage=(byte *)malloc(pixelsize*width*(height+cmyk)))==NULL) + { + jpegerr("Out of memory"); /* XXX misleading if width/height are bad */ + longjmp(jerr.setjmp_buffer,1); +@@ -222,7 +233,20 @@ + while(cinfo.output_scanline<height) + { + jpeg_read_scanlines(&cinfo,&ptr,1); +- for(f=0;f<width;f++) { tmp=*ptr; *ptr=ptr[2]; ptr[2]=tmp; ptr+=3; } ++ if(!cmyk) ++ for(f=0;f<width;f++) { tmp=*ptr; *ptr=ptr[2]; ptr[2]=tmp; ptr+=3; } ++ else ++ { ++ ptr2=ptr; ++ for(f=0;f<width;f++,ptr+=3,ptr2+=4) ++ { ++ tmp=ptr2[3]; ++ ptr[0]=(tmp*ptr2[2])/255; ++ ptr[1]=(tmp*ptr2[1])/255; ++ ptr[2]=(tmp*ptr2[0])/255; ++ } ++ } ++ + if(howfar!=NULL) howfar(cinfo.output_scanline,height); + } + diff --git a/media-gfx/zgv/zgv-5.9.ebuild b/media-gfx/zgv/zgv-5.9.ebuild new file mode 100644 index 000000000000..99208f006a1f --- /dev/null +++ b/media-gfx/zgv/zgv-5.9.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-gfx/zgv/zgv-5.9.ebuild,v 1.1 2006/05/30 12:48:18 dercorny Exp $ + +inherit eutils + +DESCRIPTION="A svgalib console image viewer" +HOMEPAGE="http://www.svgalib.org/rus/zgv/" +SRC_URI="http://www.svgalib.org/rus/zgv/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86" +IUSE="" + +DEPEND=">=media-libs/svgalib-1.4.2 + >=media-libs/jpeg-6b-r2 + media-libs/libpng + >=media-libs/tiff-3.5.5 + >=sys-libs/zlib-1.1.4 + sys-apps/gawk" + +src_unpack() { + unpack ${A} + cd ${S} + sed -i "/^CFLAGS=/s:=.*:=${CFLAGS}:" config.mk + sed -i "s:4755:0755:" src/Makefile + sed -i -e 's:$(RM):echo:' src/Makefile + sed -i -e 's:$(RM):echo:' doc/Makefile + epatch ${FILESDIR}/zgv-5.9-cmyk-yccl-fix.diff +} + +src_compile() { + emake || die +} + +src_install() { + dodir /usr/bin /usr/share/info /usr/share/man/man1 + make PREFIX=${D}/usr \ + INFODIR=${D}/usr/share/info \ + MANDIR=${D}/usr/share/man/man1 \ + install || die + dodoc AUTHORS COPYING ChangeLog INSTALL NEWS README* SECURITY TODO + + # Fix info files + cd ${D}/usr/share/info + rm dir* + mv zgv zgv.info + for i in 1 2 3 4 ; do + mv zgv-$i zgv.info-$i + done +} |