1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-06 02:57:10 +02:00
openwrt-xburst/package/zlib/patches/zlib.patch
olli aedfb448b4 security update
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@2951 3c298f89-4303-0410-b956-a3cf2f4a3e73
2006-01-13 15:36:09 +00:00

89 lines
2.7 KiB
Diff

--- zlib-1.2.3-orig/Makefile.in 2005-07-18 04:25:21.000000000 +0200
+++ zlib-1.2.3/Makefile.in 2006-01-13 15:31:04.000000000 +0100
@@ -25,20 +25,23 @@
# -Wstrict-prototypes -Wmissing-prototypes
LDFLAGS=libz.a
-LDSHARED=$(CC)
+LDSHARED=$(CC) -shared -Wl,-soname,$(SHAREDLIBM)
CPP=$(CC) -E
-LIBS=libz.a
+LIBS=
+STATICLIB=libz.a
SHAREDLIB=libz.so
SHAREDLIBV=libz.so.1.2.3
SHAREDLIBM=libz.so.1
-AR=ar rc
+AR=ar
RANLIB=ranlib
TAR=tar
SHELL=/bin/sh
EXE=
+DESTDIR =
+
prefix = /usr/local
exec_prefix = ${prefix}
libdir = ${exec_prefix}/lib
@@ -67,8 +70,8 @@
echo ' *** zlib test FAILED ***'; \
fi
-libz.a: $(OBJS) $(OBJA)
- $(AR) $@ $(OBJS) $(OBJA)
+$(STATICLIB): $(OBJS) $(OBJA)
+ $(AR) rc $@ $(OBJS) $(OBJA)
-@ ($(RANLIB) $@ || true) >/dev/null 2>&1
match.o: match.S
@@ -77,8 +80,10 @@
mv _match.o match.o
rm -f _match.s
+$(SHAREDLIB): $(SHAREDLIBV)
+
$(SHAREDLIBV): $(OBJS)
- $(LDSHARED) -o $@ $(OBJS)
+ $(LDSHARED) -lc -o $@ $(OBJS)
rm -f $(SHAREDLIB) $(SHAREDLIBM)
ln -s $@ $(SHAREDLIB)
ln -s $@ $(SHAREDLIBM)
@@ -90,23 +95,23 @@
$(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS)
install: $(LIBS)
- -@if [ ! -d $(exec_prefix) ]; then mkdir -p $(exec_prefix); fi
- -@if [ ! -d $(includedir) ]; then mkdir -p $(includedir); fi
- -@if [ ! -d $(libdir) ]; then mkdir -p $(libdir); fi
- -@if [ ! -d $(man3dir) ]; then mkdir -p $(man3dir); fi
- cp zlib.h zconf.h $(includedir)
- chmod 644 $(includedir)/zlib.h $(includedir)/zconf.h
- cp $(LIBS) $(libdir)
- cd $(libdir); chmod 755 $(LIBS)
- -@(cd $(libdir); $(RANLIB) libz.a || true) >/dev/null 2>&1
- cd $(libdir); if test -f $(SHAREDLIBV); then \
+ -@if [ ! -d $(DESTDIR)$(exec_prefix) ]; then mkdir -p $(DESTDIR)$(exec_prefix); fi
+ -@if [ ! -d $(DESTDIR)$(includedir) ]; then mkdir -p $(DESTDIR)$(includedir); fi
+ -@if [ ! -d $(DESTDIR)$(libdir) ]; then mkdir -p $(DESTDIR)$(libdir); fi
+ -@if [ ! -d $(DESTDIR)$(man3dir) ]; then mkdir -p $(DESTDIR)$(man3dir); fi
+ cp zlib.h zconf.h $(DESTDIR)$(includedir)
+ chmod 644 $(DESTDIR)$(includedir)/zlib.h $(DESTDIR)$(includedir)/zconf.h
+ cp $(STATICLIB) $(SHAREDLIBV) $(DESTDIR)$(libdir)
+ cd $(DESTDIR)$(libdir); chmod 755 $(LIBS)
+ -@(cd $(DESTDIR)$(libdir); $(RANLIB) libz.a || true) >/dev/null 2>&1
+ cd $(DESTDIR)$(libdir); if test -f $(SHAREDLIBV); then \
rm -f $(SHAREDLIB) $(SHAREDLIBM); \
ln -s $(SHAREDLIBV) $(SHAREDLIB); \
ln -s $(SHAREDLIBV) $(SHAREDLIBM); \
(ldconfig || true) >/dev/null 2>&1; \
fi
- cp zlib.3 $(man3dir)
- chmod 644 $(man3dir)/zlib.3
+ cp zlib.3 $(DESTDIR)$(man3dir)
+ chmod 644 $(DESTDIR)$(man3dir)/zlib.3
# The ranlib in install is needed on NeXTSTEP which checks file times
# ldconfig is for Linux