summaryrefslogtreecommitdiff
path: root/media-gfx/zgv
diff options
context:
space:
mode:
Diffstat (limited to 'media-gfx/zgv')
-rw-r--r--media-gfx/zgv/Manifest8
-rw-r--r--media-gfx/zgv/files/zgv-5.9-Makefile-QA.patch56
-rw-r--r--media-gfx/zgv/files/zgv-5.9-cmyk-yccl-fix.diff64
-rw-r--r--media-gfx/zgv/files/zgv-5.9-libpng15.patch22
-rw-r--r--media-gfx/zgv/metadata.xml5
-rw-r--r--media-gfx/zgv/zgv-5.9.ebuild56
6 files changed, 211 insertions, 0 deletions
diff --git a/media-gfx/zgv/Manifest b/media-gfx/zgv/Manifest
new file mode 100644
index 000000000000..60c221e89a99
--- /dev/null
+++ b/media-gfx/zgv/Manifest
@@ -0,0 +1,8 @@
+AUX zgv-5.9-Makefile-QA.patch 1906 SHA256 5979a006a7a54f999afc3cfeb7f2a3c6b4bc4ed7c28a7854055df58abe72e492 SHA512 a266ccb673475c2a520c4a28f1859522a3fe9be626080c45fb5f2bdd200d3eeb9f22dab74456910f60369e48d4ed1d5a5a8c9faa3e3a5bda7d9ca82807dba9f0 WHIRLPOOL f7690a2569dbe8c88ee2db4add1717387070eba0c563a6229cde5ee96105cb578846db7d67916328474756ba4f719b3e3d34c3597ced6ea75af921f2d294444c
+AUX zgv-5.9-cmyk-yccl-fix.diff 1554 SHA256 17291c05c6d67c32b5bfc1c4afd0756bc8e168567c7a8e965a2befb20b18689c SHA512 b2ed44029d87038139137deb068ea55503ca4bb10cb6bf61880115dd913427cdded4e7808eec9947a1b35760efa7547420ea5fa2f0416266d0d307ce6b10cfd3 WHIRLPOOL 340871e54bde2363779ba7f2fc53ebbbc9ecf726c53e5c2949296cc3ba9a7e261cc490caf83327731af5c53dc72d9412fd914b8718bb63f3f5400d4348da9a6f
+AUX zgv-5.9-libpng15.patch 468 SHA256 7e38c92999be1dafa6234b9d2869b9359ea02941da2dbd29d500faf2f3f871dc SHA512 ff7ec6258960381d9cb9c061af67bfb9984a1bae70c0c902a0837787c82bd60ed699e8aa9d76f35a993a76aaf8ea5a9740cffa88fdb0bb654f9b3b09ba3cac00 WHIRLPOOL edd89e70183b4767d4267b3ca02270d6bf6164c0ffba03655c48dbb1caee7070f79aa48e7761947ffed0d04f94702393bb03dcffb09fffb4da5c4f3cc3cbb896
+DIST zgv-5.9.tar.gz 395525 SHA256 92e5d848fb51a77dc0ebb0ab383c1499c23aaff01f5445e9b0d75e067a8a64ba SHA512 f78d43c1703559f28961d8ce9ed6fc21cbb28b33885f824cc682591bf659d234b6c641f1677d42c592bcb22843854cbbac32ce0911bd1092f76a7ef5bfe31ddf WHIRLPOOL fc0d89cdf7686624736994e4c83bb12691095cb6815bab4461abbe1280bf9e0c4550125ab1665142648c2069e442f5e29fbbcad1fe7a6625b3646bf52ac07f0e
+EBUILD zgv-5.9.ebuild 1157 SHA256 fc538e8f6f5bf34cf4cce95ebfda451ebc9849f791253cc2f2ad17661aaa666f SHA512 9471aca8f6be313a79c9b27fc148ce35db5d2b1c1dea99904bbad2f054a5848fc7322874518ae9ac15305a359a00f7831c7f78c5bcdfbb7316e4da1cb015fb48 WHIRLPOOL 6a0ea208e31f85eb2f58dbeecaedc9a4546b5f4d0d2d70f0799e335bfa7b3bded2224fe26339e47d0d4c800f55eb4f3093115d77ac05bfdf0170408316e6cadc
+MISC ChangeLog 2609 SHA256 49b24757c337c127c1577ed68b370260e7398f3ea3b694f5594281b6ab75c47a SHA512 a828f4be136cdac4ac305b59e1acc6b60c7720aecf4693316ca3f312a9e4952940b702c5b591a2bddc4fc4320be9ec07c26fbb14f04b48cc92ca6c8d14ff0c68 WHIRLPOOL 80788bad0dbf37f7652ab84c8ba9962ddd8617d6c49ab6dabe9701fd055ce4cf763295bbdfc6577234e493d9c258dee43cccc7f9d0b6ef082f29c7bfac8c6af5
+MISC ChangeLog-2015 2739 SHA256 13d7e7163f2477aced8f85eb07c8edb46dc76985891c1cb97b3a1bdd23db45f7 SHA512 0e1022125a7d2e5408fb78260c5b547f7daccd46493284faa8ccae26352ba30fcf11d91a5de41a350aa4a078859a61520fbb2ca702aa7430fdce9d0f9a64e2cf WHIRLPOOL 682957ee7a549c83b4539caedd12583bb5ad204d14ba79ca1d5fcb595e8e1b3bd9cecb5f10d5ba3cc9a901ea4a13af526216d3b80b065d41901009bd50a76b74
+MISC metadata.xml 166 SHA256 2caff447f5bd2701d8456ada5cc633c41ef4373fa4bfeabeb73599d40bcc941b SHA512 a56648c974a1d14dd4c18237532773c72057a13ab90c58b5da04f185e3c12a8bd8d5c21fb06053507f31766291a82dc7d87b34cd65fd94cfe2af7295c813ef84 WHIRLPOOL 1ff70497eca6531f0e0614c72a19f4b8e5ff486a58d369f4f0b36308d1d6b01168f9da887740e3b9f536236be251d3fe05f904d27a9233a7cf613416ba882968
diff --git a/media-gfx/zgv/files/zgv-5.9-Makefile-QA.patch b/media-gfx/zgv/files/zgv-5.9-Makefile-QA.patch
new file mode 100644
index 000000000000..e4569547d175
--- /dev/null
+++ b/media-gfx/zgv/files/zgv-5.9-Makefile-QA.patch
@@ -0,0 +1,56 @@
+diff -NrU5 zgv-5.9.original/src/Makefile zgv-5.9/src/Makefile
+--- zgv-5.9.original/src/Makefile 2009-09-28 15:31:29.000000000 -0600
++++ zgv-5.9/src/Makefile 2009-09-28 15:56:26.000000000 -0600
+@@ -45,11 +45,11 @@
+ readbmp.o readtga.o readpng.o readpcx.o \
+ readxvpic.o readmrf.o readxbm.o readxpm.o \
+ modesel.o readpcd.o readtiff.o readprf.o zgv_io.o
+
+ zgv: $(ZGV_OBJS)
+- $(CC) $(CFLAGS) -o zgv $(ZGV_OBJS) $(ZGV_LIBS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o zgv $(ZGV_OBJS) $(ZGV_LIBS)
+
+ bdf2h: bdf2h.o
+ $(CC) $(CFLAGS) -o bdf2h bdf2h.o
+
+ install-info: install-info.c
+@@ -59,28 +59,28 @@
+ # installation. Not nice to put this in the install target,
+ # but it's likely to cause problems if I don't.
+ #
+ install: all
+ @if [ "$(BACKEND)" = SVGALIB ]; then \
+- echo $(RM) /usr/bin/zgv; \
+- $(RM) /usr/bin/zgv; \
+- echo install -m 4755 -o root -g root -s zgv $(BINDIR); \
+- install -m 4755 -o root -g root -s zgv $(BINDIR); \
++ echo echo /usr/bin/zgv; \
++ echo /usr/bin/zgv; \
++ echo install -m 0755 -o root -g root zgv $(BINDIR); \
++ install -m 0755 -o root -g root zgv $(BINDIR); \
+ fi
+ @if [ "$(BACKEND)" = SDL ]; then \
+- echo $(RM) /usr/bin/zgv-sdl; \
+- $(RM) /usr/bin/zgv-sdl; \
+- echo install -m 755 -s zgv $(BINDIR)/zgv-sdl; \
+- install -m 755 -s zgv $(BINDIR)/zgv-sdl; \
++ echo echo /usr/bin/zgv-sdl; \
++ echo /usr/bin/zgv-sdl; \
++ echo install -m 755 zgv $(BINDIR)/zgv-sdl; \
++ install -m 755 zgv $(BINDIR)/zgv-sdl; \
+ fi
+
+ uninstall:
+- $(RM) $(BINDIR)/zgv $(BINDIR)/zgv-sdl
++ echo $(BINDIR)/zgv $(BINDIR)/zgv-sdl
+
+ clean:
+- $(RM) *.o *~ zgv bdf2h fontbmps.h install-info
+- $(RM) rcfile_opt.h rcfile_var.h rcfile_short.h
++ echo *.o *~ zgv bdf2h fontbmps.h install-info
++ echo rcfile_opt.h rcfile_var.h rcfile_short.h
+
+ # Dependancies
+ 3deffects.o: 3deffects.c 3deffects.h font.h readnbkey.h zgv.h \
+ rc_config.h rcfile.h mousecur.h rbmenu.h
+ bdf2h.o: bdf2h.c
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/files/zgv-5.9-libpng15.patch b/media-gfx/zgv/files/zgv-5.9-libpng15.patch
new file mode 100644
index 000000000000..2f12532831de
--- /dev/null
+++ b/media-gfx/zgv/files/zgv-5.9-libpng15.patch
@@ -0,0 +1,22 @@
+http://bugs.gentoo.org/389591
+
+--- src/readpng.c
++++ src/readpng.c
+@@ -63,7 +63,7 @@
+ use_errmsg=1;
+
+ /* cleanup is done after jump back, so just do that now... */
+-longjmp(png_ptr->jmpbuf,1);
++longjmp(png_jmpbuf(png_ptr), 1);
+ }
+
+
+@@ -132,7 +132,7 @@
+ return(_PICERR_NOMEM);
+ }
+
+-if(setjmp(png_ptr->jmpbuf))
++if(setjmp(png_jmpbuf(png_ptr)))
+ {
+ /* if we get here, there was an error. */
+ /* don't use local variables here, they may have been blasted */
diff --git a/media-gfx/zgv/metadata.xml b/media-gfx/zgv/metadata.xml
new file mode 100644
index 000000000000..6f49eba8f496
--- /dev/null
+++ b/media-gfx/zgv/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+</pkgmetadata>
diff --git a/media-gfx/zgv/zgv-5.9.ebuild b/media-gfx/zgv/zgv-5.9.ebuild
new file mode 100644
index 000000000000..c5761d43e5fa
--- /dev/null
+++ b/media-gfx/zgv/zgv-5.9.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+inherit eutils toolchain-funcs
+
+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=""
+
+RDEPEND=">=media-libs/svgalib-1.4.2
+ virtual/jpeg
+ media-libs/libpng
+ >=media-libs/tiff-3.5.5
+ >=sys-libs/zlib-1.1.4
+ sys-apps/gawk"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ sed -i -e "/^CFLAGS=/s:=.*:=${CFLAGS}:" config.mk || die
+ sed -i -e 's:$(RM):echo:' doc/Makefile || die
+
+ epatch \
+ "${FILESDIR}"/${P}-Makefile-QA.patch \
+ "${FILESDIR}"/${P}-cmyk-yccl-fix.diff \
+ "${FILESDIR}"/${P}-libpng15.patch
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ dodir /usr/bin /usr/share/info /usr/share/man/man1
+
+ emake \
+ PREFIX="${D}"/usr \
+ INFODIR="${D}"/usr/share/info \
+ MANDIR="${D}"/usr/share/man/man1 \
+ install
+
+ dodoc AUTHORS 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
+}