1 Index: zlib-1.2.3/Makefile.in
2 ===================================================================
3 --- zlib-1.2.3.orig/Makefile.in 2007-06-04 13:24:03.760040896 +0200
4 +++ zlib-1.2.3/Makefile.in 2007-06-04 13:24:03.839028888 +0200
6 # -Wstrict-prototypes -Wmissing-prototypes
10 +LDSHARED=$(CC) -shared -Wl,-soname,$(SHAREDLIBM)
17 SHAREDLIBV=libz.so.1.2.3
30 exec_prefix = ${prefix}
31 libdir = ${exec_prefix}/lib
33 echo ' *** zlib test FAILED ***'; \
36 -libz.a: $(OBJS) $(OBJA)
37 - $(AR) $@ $(OBJS) $(OBJA)
38 +$(STATICLIB): $(OBJS) $(OBJA)
39 + $(AR) rc $@ $(OBJS) $(OBJA)
40 -@ ($(RANLIB) $@ || true) >/dev/null 2>&1
47 +$(SHAREDLIB): $(SHAREDLIBV)
49 $(SHAREDLIBV): $(OBJS)
50 - $(LDSHARED) -o $@ $(OBJS)
51 + $(LDSHARED) -lc -o $@ $(OBJS)
52 rm -f $(SHAREDLIB) $(SHAREDLIBM)
54 ln -s $@ $(SHAREDLIBM)
56 $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS)
59 - -@if [ ! -d $(exec_prefix) ]; then mkdir -p $(exec_prefix); fi
60 - -@if [ ! -d $(includedir) ]; then mkdir -p $(includedir); fi
61 - -@if [ ! -d $(libdir) ]; then mkdir -p $(libdir); fi
62 - -@if [ ! -d $(man3dir) ]; then mkdir -p $(man3dir); fi
63 - cp zlib.h zconf.h $(includedir)
64 - chmod 644 $(includedir)/zlib.h $(includedir)/zconf.h
65 - cp $(LIBS) $(libdir)
66 - cd $(libdir); chmod 755 $(LIBS)
67 - -@(cd $(libdir); $(RANLIB) libz.a || true) >/dev/null 2>&1
68 - cd $(libdir); if test -f $(SHAREDLIBV); then \
69 + -@if [ ! -d $(DESTDIR)$(exec_prefix) ]; then mkdir -p $(DESTDIR)$(exec_prefix); fi
70 + -@if [ ! -d $(DESTDIR)$(includedir) ]; then mkdir -p $(DESTDIR)$(includedir); fi
71 + -@if [ ! -d $(DESTDIR)$(libdir) ]; then mkdir -p $(DESTDIR)$(libdir); fi
72 + -@if [ ! -d $(DESTDIR)$(man3dir) ]; then mkdir -p $(DESTDIR)$(man3dir); fi
73 + cp zlib.h zconf.h $(DESTDIR)$(includedir)
74 + chmod 644 $(DESTDIR)$(includedir)/zlib.h $(DESTDIR)$(includedir)/zconf.h
75 + cp $(STATICLIB) $(SHAREDLIBV) $(DESTDIR)$(libdir)
76 + cd $(DESTDIR)$(libdir); chmod 755 $(LIBS)
77 + -@(cd $(DESTDIR)$(libdir); $(RANLIB) libz.a || true) >/dev/null 2>&1
78 + cd $(DESTDIR)$(libdir); if test -f $(SHAREDLIBV); then \
79 rm -f $(SHAREDLIB) $(SHAREDLIBM); \
80 ln -s $(SHAREDLIBV) $(SHAREDLIB); \
81 ln -s $(SHAREDLIBV) $(SHAREDLIBM); \
82 (ldconfig || true) >/dev/null 2>&1; \
84 - cp zlib.3 $(man3dir)
85 - chmod 644 $(man3dir)/zlib.3
86 + cp zlib.3 $(DESTDIR)$(man3dir)
87 + chmod 644 $(DESTDIR)$(man3dir)/zlib.3
88 # The ranlib in install is needed on NeXTSTEP which checks file times
89 # ldconfig is for Linux
91 Index: zlib-1.2.3/configure
92 ===================================================================
93 --- zlib-1.2.3.orig/configure 2007-06-04 13:24:03.765040136 +0200
94 +++ zlib-1.2.3/configure 2007-06-04 13:24:03.839028888 +0200
96 VER=`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`
97 VER2=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\)\\..*/\1/p' < zlib.h`
98 VER1=`sed -n -e '/VERSION "/s/.*"\([0-9]*\)\\..*/\1/p' < zlib.h`
101 RANLIB=${RANLIB-"ranlib"}
102 prefix=${prefix-/usr/local}
103 exec_prefix=${exec_prefix-'${prefix}'}
106 if test "$gcc" -eq 1 && ($cc -c $cflags $test.c) 2>/dev/null; then
108 - SFLAGS=${CFLAGS-"-fPIC -O3"}
109 + SFLAGS=${CFLAGS-"-D_REENTRANT -fPIC -O3"}
111 - case `(uname -s || echo unknown) 2>/dev/null` in
112 - Linux | linux | GNU | GNU/*) LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1"};;
113 - CYGWIN* | Cygwin* | cygwin* | OS/2* )
115 - QNX*) # This is for QNX6. I suppose that the QNX rule below is for QNX2,QNX4
116 - # (alain.bonnefoy@icbt.com)
117 - LDSHARED=${LDSHARED-"$cc -shared -Wl,-hlibz.so.1"};;
119 - LDSHARED=${LDSHARED-"$cc -shared $SFLAGS"}
120 - case `(uname -m || echo unknown) 2>/dev/null` in
123 - SHAREDLIB='libz.so';;
126 - SHAREDLIB='libz.sl';;
128 - Darwin*) shared_ext='.dylib'
129 - SHAREDLIB=libz$shared_ext
130 - SHAREDLIBV=libz.$VER$shared_ext
131 - SHAREDLIBM=libz.$VER1$shared_ext
132 - LDSHARED=${LDSHARED-"$cc -dynamiclib -install_name $libdir/$SHAREDLIBM -compatibility_version $VER1 -current_version $VER"};;
133 - *) LDSHARED=${LDSHARED-"$cc -shared"};;
135 + LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1"}
137 # find system name and corresponding cc options
140 echo Checking for mmap support... No.
145 +int main() { char buf[10]; snprintf(buf, sizeof(buf), "%s", "F"); return 0; }
147 +if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
148 + echo "Checking for snprintf... Yes."
149 + CFLAGS="$CFLAGS -DHAS_snprintf"
151 + echo "Checking for snprintf.. No."
157 +int main(void) { va_list a; vsnprintf(0, 0, "", a); return 0; }
159 +if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
160 + echo "Checking for vsnprintf... Yes."
161 + CFLAGS="$CFLAGS -DHAS_vsnprintf"
163 + echo "Checking for vsnprintf.. No."
169 @@ -440,20 +440,21 @@
173 -/^CFLAGS *=/s#=.*#=$CFLAGS#
174 -/^CPP *=/s#=.*#=$CPP#
175 -/^LDSHARED *=/s#=.*#=$LDSHARED#
176 -/^LIBS *=/s#=.*#=$LIBS#
177 -/^SHAREDLIB *=/s#=.*#=$SHAREDLIB#
178 -/^SHAREDLIBV *=/s#=.*#=$SHAREDLIBV#
179 -/^SHAREDLIBM *=/s#=.*#=$SHAREDLIBM#
181 -/^RANLIB *=/s#=.*#=$RANLIB#
182 -/^EXE *=/s#=.*#=$EXE#
183 -/^prefix *=/s#=.*#=$prefix#
184 -/^exec_prefix *=/s#=.*#=$exec_prefix#
185 -/^libdir *=/s#=.*#=$libdir#
186 -/^includedir *=/s#=.*#=$includedir#
187 -/^mandir *=/s#=.*#=$mandir#
188 -/^LDFLAGS *=/s#=.*#=$LDFLAGS#
189 +/^CC *=/s%=.*%= $CC%
190 +/^CFLAGS *=/s%=.*%= $CFLAGS%
191 +/^CPP *=/s%=.*%= $CPP%
192 +/^LDSHARED *=/s%=.*%= $LDSHARED%
193 +/^LIBS *=/s%=.*%= $LIBS%
194 +/^SHAREDLIB *=/s%=.*%= $SHAREDLIB%
195 +/^SHAREDLIBV *=/s%=.*%= $SHAREDLIBV%
196 +/^SHAREDLIBM *=/s%=.*%= $SHAREDLIBM%
197 +/^AR *=/s%=.*%= $AR%
198 +/^RANLIB *=/s%=.*%= $RANLIB%
199 +/^EXE *=/s%=.*%= $EXE%
200 +/^prefix *=/s%=.*%= $prefix%
201 +/^exec_prefix *=/s%=.*%= $exec_prefix%
202 +/^libdir *=/s%=.*%= $libdir%
203 +/^includedir *=/s%=.*%= $includedir%
204 +/^mandir *=/s%=.*%= $mandir%
205 +/^LDFLAGS *=/s%=.*%= $LDFLAGS%
207 Index: zlib-1.2.3/contrib/minizip/Makefile
208 ===================================================================
209 --- zlib-1.2.3.orig/contrib/minizip/Makefile 2007-06-04 13:24:03.773038920 +0200
210 +++ zlib-1.2.3/contrib/minizip/Makefile 2007-06-04 13:24:03.839028888 +0200
214 +CFLAGS=-O2 -g -I../.. -Dunix
216 -UNZ_OBJS = miniunz.o unzip.o ioapi.o ../../libz.a
217 -ZIP_OBJS = minizip.o zip.o ioapi.o ../../libz.a
218 +UNZ_OBJS = miniunz.o unzip.o ioapi.o
219 +ZIP_OBJS = minizip.o zip.o ioapi.o
222 $(CC) -c $(CFLAGS) $*.c
227 - $(CC) $(CFLAGS) -o $@ $(UNZ_OBJS)
228 + $(CC) $(CFLAGS) -o $@ $(UNZ_OBJS) -L ../.. -lz
231 - $(CC) $(CFLAGS) -o $@ $(ZIP_OBJS)
232 + $(CC) $(CFLAGS) -o $@ $(ZIP_OBJS) -L ../.. -lz
234 test: miniunz minizip
235 ./minizip test readme.txt