summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /games-util/dzip
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'games-util/dzip')
-rw-r--r--games-util/dzip/Manifest1
-rw-r--r--games-util/dzip/dzip-2.9-r1.ebuild47
-rw-r--r--games-util/dzip/dzip-2.9-r2.ebuild42
-rw-r--r--games-util/dzip/dzip-2.9-r3.ebuild31
-rw-r--r--games-util/dzip/files/dzip-2.9-scrub-names.patch88
-rw-r--r--games-util/dzip/files/dzip-2.9-system-zlib-r2.patch72
-rw-r--r--games-util/dzip/files/dzip-2.9-system-zlib.patch52
-rw-r--r--games-util/dzip/files/dzip-amd64.diff30
-rw-r--r--games-util/dzip/metadata.xml8
9 files changed, 371 insertions, 0 deletions
diff --git a/games-util/dzip/Manifest b/games-util/dzip/Manifest
new file mode 100644
index 000000000000..bac31ff81293
--- /dev/null
+++ b/games-util/dzip/Manifest
@@ -0,0 +1 @@
+DIST dz29src.zip 100354 SHA256 de858f6a811096ebd099301cb4acd21eaf9eb1b3f95c1b21ec9e910bcf6f0f17 SHA512 3e1071da6ae5c9064b7222f1bb553b787ded4acbfe8463a7a94f17e60748b68cdfc17672ef7220deddd394c6709efe632e53e61508fd48bfa9001e43a37e788f WHIRLPOOL 550585852d2c950a5bc893ca134d4cc96c896b5960d8d37235d77a8fa8e31496f7e1634ae4c5e5d3c8709e9fcace1319652aa7b306634a3e7fcaa2451581b3b0
diff --git a/games-util/dzip/dzip-2.9-r1.ebuild b/games-util/dzip/dzip-2.9-r1.ebuild
new file mode 100644
index 000000000000..2d65428144e8
--- /dev/null
+++ b/games-util/dzip/dzip-2.9-r1.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils toolchain-funcs games
+
+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="~ppc x86"
+IUSE=""
+
+DEPEND="app-arch/unzip"
+RDEPEND=""
+
+S=${WORKDIR}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/dzip-2.9-scrub-names.patch #93079
+}
+
+src_compile() {
+ emake \
+ -f Makefile.linux \
+ CC="$(tc-getCC)" \
+ CFLAGS="${CFLAGS}" \
+ || die "emake failed"
+}
+
+src_install () {
+ dogamesbin dzip || die "dogamesbin failed"
+ dodoc Readme || die "dodoc failed"
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ echo
+ elog "Demo files can be found at http://planetquake.com/sda/"
+ elog "and http://planetquake.com/qdq/"
+ echo
+}
diff --git a/games-util/dzip/dzip-2.9-r2.ebuild b/games-util/dzip/dzip-2.9-r2.ebuild
new file mode 100644
index 000000000000..260c5088adf5
--- /dev/null
+++ b/games-util/dzip/dzip-2.9-r2.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+inherit eutils games
+
+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="~ppc ~x86"
+IUSE=""
+
+DEPEND="app-arch/unzip"
+RDEPEND=""
+
+S=${WORKDIR}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-system-zlib.patch \
+ "${FILESDIR}"/${P}-scrub-names.patch #93079
+ rm -rf zlib
+ mv -f Makefile{.linux,}
+}
+
+src_install () {
+ dogamesbin dzip || die "dogamesbin failed"
+ dodoc Readme || die "dodoc failed"
+ prepgamesdirs
+}
+
+pkg_postinst() {
+ games_pkg_postinst
+ echo
+ elog "Demo files can be found at http://planetquake.com/sda/"
+ elog "and http://planetquake.com/qdq/"
+ echo
+}
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..b7e9f0dade6d
--- /dev/null
+++ b/games-util/dzip/dzip-2.9-r3.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+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
+ dodoc Readme
+}
diff --git a/games-util/dzip/files/dzip-2.9-scrub-names.patch b/games-util/dzip/files/dzip-2.9-scrub-names.patch
new file mode 100644
index 000000000000..079fae3fd070
--- /dev/null
+++ b/games-util/dzip/files/dzip-2.9-scrub-names.patch
@@ -0,0 +1,88 @@
+Fix directory traversals issues.
+
+Since .dz files normally just have relative directory trees:
+pak/
+pak/file
+pak/subdir/file
+
+we strip out all the components which ascend in the directory tree
+
+http://bugs.gentoo.org/93079
+
+--- main.c
++++ main.c
+@@ -77,6 +77,48 @@ int dzRead (int inlen)
+ return 1;
+ }
+
++#define IS_SEP(c) (c == '/' || c == ':' || c == '\\')
++void scrub_name(char *smee)
++{
++ char *paths[] = { "../", "..\\", "..:", NULL};
++ size_t p, i, len;
++ char scrubit, scrubbed;
++
++ scrubbed = 0;
++ len = strlen(smee);
++ i = 0;
++ scrubit = 1;
++
++ /* search the path and scrub out all relative paths */
++ while (i + 3 < len) {
++ for (p = 0; paths[p]; ++p) {
++ if (scrubit && !strncmp(paths[p], smee+i, 3)) {
++ scrubbed = 1;
++ memset(smee+i, '\0', 3);
++ i += 2;
++ break;
++ }
++ }
++ scrubit = IS_SEP(smee[i]) || smee[i] == '\0';
++ ++i;
++ }
++
++ if (!scrubbed)
++ return;
++
++ /* condense the string over all the scrubbed bits */
++ p = 0;
++ for (i = 0; i < len; ++i) {
++ while (p < len && smee[p] == '\0')
++ ++p;
++ if (p == len) {
++ smee[i] = '\0';
++ break;
++ }
++ smee[i] = smee[p++];
++ }
++}
++
+ int dzReadDirectoryEntry (direntry_t *de)
+ {
+ char *s;
+@@ -102,6 +144,7 @@ int dzReadDirectoryEntry (direntry_t *de
+ s = Dzip_malloc(de->len);
+ dzFile_Read(s, de->len);
+ de->name = s;
++ scrub_name(de->name);
+ if (de->pak && de->type != TYPE_PAK)
+ return 1; /* dont mess with dirchar inside pakfiles */
+ do
+--- v1code.c
++++ v1code.c
+@@ -201,6 +201,7 @@ void demv1_dxentities(void)
+
+ }
+
++extern void scrub_name(char *smee);
+ void dzUncompressV1 (int testing)
+ {
+ int i, inlen = 0;
+@@ -221,6 +222,7 @@ void dzUncompressV1 (int testing)
+ {
+ de = directory + i;
+ crcval = INITCRC;
++ scrub_name(de->name);
+ printf("%s %s",action,de->name);
+ fflush(stdout);
+
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-2.9-system-zlib.patch b/games-util/dzip/files/dzip-2.9-system-zlib.patch
new file mode 100644
index 000000000000..f68304adf240
--- /dev/null
+++ b/games-util/dzip/files/dzip-2.9-system-zlib.patch
@@ -0,0 +1,52 @@
+--- 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
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++)
+ {
diff --git a/games-util/dzip/metadata.xml b/games-util/dzip/metadata.xml
new file mode 100644
index 000000000000..e7005c1ae69b
--- /dev/null
+++ b/games-util/dzip/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>games</herd>
+<maintainer>
+ <email>hanno@gentoo.org</email>
+</maintainer>
+</pkgmetadata>