diff options
author | Hanno Boeck <hanno@gentoo.org> | 2010-01-22 20:16:13 +0000 |
---|---|---|
committer | Hanno Boeck <hanno@gentoo.org> | 2010-01-22 20:16:13 +0000 |
commit | 7558dc296da801bbea5e0c1ace63326b74496b0f (patch) | |
tree | 64a074aad5afda0e27639ea10187ac99f9972702 /games-util | |
parent | stable ppc, bug 285395 (diff) | |
download | historical-7558dc296da801bbea5e0c1ace63326b74496b0f.tar.gz historical-7558dc296da801bbea5e0c1ace63326b74496b0f.tar.bz2 historical-7558dc296da801bbea5e0c1ace63326b74496b0f.zip |
dzip fix zlib segfaults and 64 bit breakage
Package-Manager: portage-2.1.7.16/cvs/Linux x86_64
Diffstat (limited to 'games-util')
-rw-r--r-- | games-util/dzip/ChangeLog | 10 | ||||
-rw-r--r-- | games-util/dzip/dzip-2.9-r3.ebuild | 31 | ||||
-rw-r--r-- | games-util/dzip/files/dzip-2.9-system-zlib-r2.patch | 72 | ||||
-rw-r--r-- | games-util/dzip/files/dzip-amd64.diff | 30 |
4 files changed, 141 insertions, 2 deletions
diff --git a/games-util/dzip/ChangeLog b/games-util/dzip/ChangeLog index a21ed9d25e73..ac5d37c7a725 100644 --- a/games-util/dzip/ChangeLog +++ b/games-util/dzip/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for games-util/dzip -# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/games-util/dzip/ChangeLog,v 1.11 2009/05/31 02:39:49 nyhm Exp $ +# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/games-util/dzip/ChangeLog,v 1.12 2010/01/22 20:16:12 hanno Exp $ + +*dzip-2.9-r3 (22 Jan 2010) + + 22 Jan 2010; Hanno Boeck <hanno@gentoo.org> +dzip-2.9-r3.ebuild, + +files/dzip-2.9-system-zlib-r2.patch, +files/dzip-amd64.diff: + Fix segfaults with latest zlib and fix 64 bit breakage. 31 May 2009; Tristan Heaven <nyhm@gentoo.org> dzip-2.9-r2.ebuild: Fix LICENSE: as-is -> ZLIB diff --git a/games-util/dzip/dzip-2.9-r3.ebuild b/games-util/dzip/dzip-2.9-r3.ebuild new file mode 100644 index 000000000000..7ae8bd0b980b --- /dev/null +++ b/games-util/dzip/dzip-2.9-r3.ebuild @@ -0,0 +1,31 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/games-util/dzip/dzip-2.9-r3.ebuild,v 1.1 2010/01/22 20:16:12 hanno Exp $ + +EAPI=2 +inherit eutils + +DESCRIPTION="compressor/uncompressor for demo recordings from id's Quake" +HOMEPAGE="http://speeddemosarchive.com/dzip/" +SRC_URI="http://speeddemosarchive.com/dzip/dz${PV/./}src.zip" + +LICENSE="ZLIB" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="" +DEPEND="app-arch/unzip" +RDEPEND="" + +S="${WORKDIR}" + +src_prepare() { + epatch "${FILESDIR}"/${P}-system-zlib-r2.patch + epatch "${FILESDIR}"/${P}-scrub-names.patch #93079 + epatch "${FILESDIR}/dzip-amd64.diff" + mv -f Makefile{.linux,} +} + +src_install () { + dobin dzip || die "dobin failed" + dodoc Readme || die "dodoc failed" +} diff --git a/games-util/dzip/files/dzip-2.9-system-zlib-r2.patch b/games-util/dzip/files/dzip-2.9-system-zlib-r2.patch new file mode 100644 index 000000000000..4bf10f8b98f6 --- /dev/null +++ b/games-util/dzip/files/dzip-2.9-system-zlib-r2.patch @@ -0,0 +1,72 @@ +--- dzip.h ++++ dzip.h +@@ -2,7 +2,7 @@ + #include <stdlib.h>
+ #include <string.h>
+
+-#include "zlib/zlib.h"
++#include <zlib.h>
+
+ typedef unsigned char uchar;
+
+@@ -177,4 +177,4 @@ + #else
+ #define DIRCHAR '/'
+ #define WRONGCHAR '\\'
+-#endif +\ No newline at end of file ++#endif
+--- Makefile.linux ++++ Makefile.linux +@@ -1,18 +1,17 @@ + # Makefile for linux
+
+-CC = gcc
+-CFLAGS = -Wall -O3
++CC ?= gcc
++CFLAGS ?= -O3
++CFLAGS += -Wall
+ TARGET = dzip
+ OBJECTS = main.o compress.o uncompress.o list.o crc32.o \
+- encode.o decode.o v1code.o conmain.o delete.o \
+- zlib/adler32.o zlib/deflate.o zlib/trees.o \
+- zlib/inflate.o zlib/infblock.o zlib/inftrees.o zlib/infcodes.o \
+- zlib/infutil.o zlib/inffast.o
++ encode.o decode.o v1code.o conmain.o delete.o
++LIBS = -lz
+
+ TMPFILES = gmon.out frag*
+
+ $(TARGET): $(OBJECTS)
+- $(CC) $(CFLAGS) $(OBJECTS) -o $(TARGET) $(LDFLAGS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS)
+
+ clean:
+ rm -f $(TARGET) $(OBJECTS) $(TMPFILES)
+@@ -24,4 +23,4 @@ + encode.o: encode.c dzip.h
+ list.o: list.c dzip.h dzipcon.h
+ decode.o: decode.c dzip.h dzipcon.h
+-v1code.o: v1code.c dzip.h dzipcon.h +\ No newline at end of file ++v1code.o: v1code.c dzip.h dzipcon.h
+--- conmain.c.orig 2010-01-17 15:10:20.938605770 +0000 ++++ conmain.c 2010-01-17 15:10:34.180603846 +0000 +@@ -507,8 +507,8 @@ + if (!strcmp(argv[i],"-o")) i++;
+ }
+
+- zs.zalloc = Dzip_calloc;
+- zs.zfree = free;
++ zs.zalloc = Z_NULL; // Dzip_calloc; <- wrong number of arguments, reverting to default
++ zs.zfree = Z_NULL; // free; <- wrong number of arguments, reverting to default
+
+ if (flag[SW_LIST] || flag[SW_EXTRACT] || flag[SW_VERIFY])
+ {
+@@ -618,4 +618,4 @@ + dzDeleteFiles_MakeList(files + 1, fileargs - 1);
+ free(files);
+ exit(0);
+-} +\ No newline at end of file ++}
diff --git a/games-util/dzip/files/dzip-amd64.diff b/games-util/dzip/files/dzip-amd64.diff new file mode 100644 index 000000000000..ef49ff330570 --- /dev/null +++ b/games-util/dzip/files/dzip-amd64.diff @@ -0,0 +1,30 @@ +--- dzip/crc32.c 2002-07-12 06:07:54.000000000 +0200 ++++ dz/crc32.c 2010-01-20 23:23:43.000000000 +0100 +@@ -1,10 +1,12 @@ ++#include <stdint.h> ++ + unsigned long crcval; + unsigned long crctable[256]; + +-unsigned long crc_reflect(unsigned long x, int bits) +-{
+- int i; +- unsigned long v = 0, b = 1 << (bits - 1); ++unsigned long crc_reflect(uint32_t x, int bits) ++{ ++ uint32_t i; ++ uint32_t v = 0, b = 1 << (bits - 1); + + for (i = 0; i < bits; i++) + { +@@ -16,8 +18,8 @@ + + void crc_init(void) + { +- unsigned long crcpol = 0x04c11db7; +- unsigned long i, j, k; ++ uint32_t crcpol = 0x04c11db7; ++ uint32_t i, j, k; + + for (i = 0; i < 256; i++) + { |