1 diff -ruN zlib-1.2.2-orig/Makefile.in zlib-1.2.2-2/Makefile.in
2 --- zlib-1.2.2-orig/Makefile.in 2004-09-15 16:27:20.000000000 +0200
3 +++ zlib-1.2.2-2/Makefile.in 2004-11-13 13:38:12.000000000 +0100
5 # -Wstrict-prototypes -Wmissing-prototypes
9 +LDSHARED=$(CC) -shared -Wl,-soname,$(SHAREDLIBM)
16 SHAREDLIBV=libz.so.1.2.2
29 exec_prefix = ${prefix}
30 libdir = ${exec_prefix}/lib
32 echo ' *** zlib test FAILED ***'; \
35 -libz.a: $(OBJS) $(OBJA)
36 - $(AR) $@ $(OBJS) $(OBJA)
37 +$(STATICLIB): $(OBJS) $(OBJA)
38 + $(AR) rc $@ $(OBJS) $(OBJA)
39 -@ ($(RANLIB) $@ || true) >/dev/null 2>&1
46 +$(SHAREDLIB): $(SHAREDLIBV)
48 $(SHAREDLIBV): $(OBJS)
49 - $(LDSHARED) -o $@ $(OBJS)
50 + $(LDSHARED) -lc -o $@ $(OBJS)
51 rm -f $(SHAREDLIB) $(SHAREDLIBM)
53 ln -s $@ $(SHAREDLIBM)
55 $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS)
58 - -@if [ ! -d $(exec_prefix) ]; then mkdir -p $(exec_prefix); fi
59 - -@if [ ! -d $(includedir) ]; then mkdir -p $(includedir); fi
60 - -@if [ ! -d $(libdir) ]; then mkdir -p $(libdir); fi
61 - -@if [ ! -d $(man3dir) ]; then mkdir -p $(man3dir); fi
62 - cp zlib.h zconf.h $(includedir)
63 - chmod 644 $(includedir)/zlib.h $(includedir)/zconf.h
64 - cp $(LIBS) $(libdir)
65 - cd $(libdir); chmod 755 $(LIBS)
66 - -@(cd $(libdir); $(RANLIB) libz.a || true) >/dev/null 2>&1
67 - cd $(libdir); if test -f $(SHAREDLIBV); then \
68 + -@if [ ! -d $(DESTDIR)$(exec_prefix) ]; then mkdir -p $(DESTDIR)$(exec_prefix); fi
69 + -@if [ ! -d $(DESTDIR)$(includedir) ]; then mkdir -p $(DESTDIR)$(includedir); fi
70 + -@if [ ! -d $(DESTDIR)$(libdir) ]; then mkdir -p $(DESTDIR)$(libdir); fi
71 + -@if [ ! -d $(DESTDIR)$(man3dir) ]; then mkdir -p $(DESTDIR)$(man3dir); fi
72 + cp zlib.h zconf.h $(DESTDIR)$(includedir)
73 + chmod 644 $(DESTDIR)$(includedir)/zlib.h $(DESTDIR)$(includedir)/zconf.h
74 + cp $(STATICLIB) $(SHAREDLIBV) $(DESTDIR)$(libdir)
75 + cd $(DESTDIR)$(libdir); chmod 755 $(LIBS)
76 + -@(cd $(DESTDIR)$(libdir); $(RANLIB) libz.a || true) >/dev/null 2>&1
77 + cd $(DESTDIR)$(libdir); if test -f $(SHAREDLIBV); then \
78 rm -f $(SHAREDLIB) $(SHAREDLIBM); \
79 ln -s $(SHAREDLIBV) $(SHAREDLIB); \
80 ln -s $(SHAREDLIBV) $(SHAREDLIBM); \
81 (ldconfig || true) >/dev/null 2>&1; \
83 - cp zlib.3 $(man3dir)
84 - chmod 644 $(man3dir)/zlib.3
85 + cp zlib.3 $(DESTDIR)$(man3dir)
86 + chmod 644 $(DESTDIR)$(man3dir)/zlib.3
87 # The ranlib in install is needed on NeXTSTEP which checks file times
88 # ldconfig is for Linux
90 diff -ruN zlib-1.2.2-orig/configure zlib-1.2.2-2/configure
91 --- zlib-1.2.2-orig/configure 2004-09-07 07:50:06.000000000 +0200
92 +++ zlib-1.2.2-2/configure 2004-11-13 12:37:43.000000000 +0100
94 VER=`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`
95 VER2=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\)\\..*/\1/p' < zlib.h`
96 VER1=`sed -n -e '/VERSION "/s/.*"\([0-9]*\)\\..*/\1/p' < zlib.h`
99 RANLIB=${RANLIB-"ranlib"}
100 prefix=${prefix-/usr/local}
101 exec_prefix=${exec_prefix-'${prefix}'}
104 if test "$gcc" -eq 1 && ($cc -c $cflags $test.c) 2>/dev/null; then
106 - SFLAGS=${CFLAGS-"-fPIC -O3"}
107 + SFLAGS=${CFLAGS-"-D_REENTRANT -fPIC -O3"}
109 case `(uname -s || echo unknown) 2>/dev/null` in
110 Linux | linux | GNU | GNU/*) LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1"};;
112 echo Checking for mmap support... No.
117 +int main() { char buf[10]; snprintf(buf, sizeof(buf), "%s", "F"); return 0; }
119 +if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
120 + echo "Checking for snprintf... Yes."
121 + CFLAGS="$CFLAGS -DHAS_snprintf"
123 + echo "Checking for snprintf.. No."
129 +int main(void) { va_list a; vsnprintf(0, 0, "", a); return 0; }
131 +if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
132 + echo "Checking for vsnprintf... Yes."
133 + CFLAGS="$CFLAGS -DHAS_vsnprintf"
135 + echo "Checking for vsnprintf.. No."
141 @@ -424,20 +447,21 @@
145 -/^CFLAGS *=/s#=.*#=$CFLAGS#
146 -/^CPP *=/s#=.*#=$CPP#
147 -/^LDSHARED *=/s#=.*#=$LDSHARED#
148 -/^LIBS *=/s#=.*#=$LIBS#
149 -/^SHAREDLIB *=/s#=.*#=$SHAREDLIB#
150 -/^SHAREDLIBV *=/s#=.*#=$SHAREDLIBV#
151 -/^SHAREDLIBM *=/s#=.*#=$SHAREDLIBM#
153 -/^RANLIB *=/s#=.*#=$RANLIB#
154 -/^EXE *=/s#=.*#=$EXE#
155 -/^prefix *=/s#=.*#=$prefix#
156 -/^exec_prefix *=/s#=.*#=$exec_prefix#
157 -/^libdir *=/s#=.*#=$libdir#
158 -/^includedir *=/s#=.*#=$includedir#
159 -/^mandir *=/s#=.*#=$mandir#
160 -/^LDFLAGS *=/s#=.*#=$LDFLAGS#
161 +/^CC *=/s%=.*%= $CC%
162 +/^CFLAGS *=/s%=.*%= $CFLAGS%
163 +/^CPP *=/s%=.*%= $CPP%
164 +/^LDSHARED *=/s%=.*%= $LDSHARED%
165 +/^LIBS *=/s%=.*%= $LIBS%
166 +/^SHAREDLIB *=/s%=.*%= $SHAREDLIB%
167 +/^SHAREDLIBV *=/s%=.*%= $SHAREDLIBV%
168 +/^SHAREDLIBM *=/s%=.*%= $SHAREDLIBM%
169 +/^AR *=/s%=.*%= $AR%
170 +/^RANLIB *=/s%=.*%= $RANLIB%
171 +/^EXE *=/s%=.*%= $EXE%
172 +/^prefix *=/s%=.*%= $prefix%
173 +/^exec_prefix *=/s%=.*%= $exec_prefix%
174 +/^libdir *=/s%=.*%= $libdir%
175 +/^includedir *=/s%=.*%= $includedir%
176 +/^mandir *=/s%=.*%= $mandir%
177 +/^LDFLAGS *=/s%=.*%= $LDFLAGS%
179 diff -ruN zlib-1.2.2-orig/contrib/minizip/Makefile zlib-1.2.2-2/contrib/minizip/Makefile
180 --- zlib-1.2.2-orig/contrib/minizip/Makefile 2003-09-10 20:00:16.000000000 +0200
181 +++ zlib-1.2.2-2/contrib/minizip/Makefile 2004-11-13 12:37:43.000000000 +0100
185 +CFLAGS=-O2 -g -I../.. -Dunix
187 -UNZ_OBJS = miniunz.o unzip.o ioapi.o ../../libz.a
188 -ZIP_OBJS = minizip.o zip.o ioapi.o ../../libz.a
189 +UNZ_OBJS = miniunz.o unzip.o ioapi.o
190 +ZIP_OBJS = minizip.o zip.o ioapi.o
193 $(CC) -c $(CFLAGS) $*.c
198 - $(CC) $(CFLAGS) -o $@ $(UNZ_OBJS)
199 + $(CC) $(CFLAGS) -o $@ $(UNZ_OBJS) -L ../.. -lz
202 - $(CC) $(CFLAGS) -o $@ $(ZIP_OBJS)
203 + $(CC) $(CFLAGS) -o $@ $(ZIP_OBJS) -L ../.. -lz
205 test: miniunz minizip
206 ./minizip test readme.txt