summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'games-util/dzip/files/dzip-2.9-system-zlib-r2.patch')
-rw-r--r--games-util/dzip/files/dzip-2.9-system-zlib-r2.patch72
1 files changed, 72 insertions, 0 deletions
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
++}