diff options
-rw-r--r-- | devel/zlib/Makefile | 8 | ||||
-rw-r--r-- | devel/zlib/PLIST | 7 | ||||
-rw-r--r-- | devel/zlib/distinfo | 11 | ||||
-rw-r--r-- | devel/zlib/files/lt.mk | 46 | ||||
-rw-r--r-- | devel/zlib/patches/patch-aa | 62 | ||||
-rw-r--r-- | devel/zlib/patches/patch-ab | 36 | ||||
-rw-r--r-- | devel/zlib/patches/patch-ac | 46 | ||||
-rw-r--r-- | devel/zlib/patches/patch-ad | 44 |
8 files changed, 56 insertions, 204 deletions
diff --git a/devel/zlib/Makefile b/devel/zlib/Makefile index 3fdf32ccf26..d1a325a9900 100644 --- a/devel/zlib/Makefile +++ b/devel/zlib/Makefile @@ -1,7 +1,6 @@ -# $NetBSD: Makefile,v 1.21 2004/01/05 11:44:01 jlam Exp $ +# $NetBSD: Makefile,v 1.22 2004/01/12 21:19:50 adam Exp $ -DISTNAME= zlib-1.1.4 -PKGREVISION= 1 +DISTNAME= zlib-1.2.1 CATEGORIES= devel MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=libpng/} \ http://www.libpng.org/pub/png/src/ \ @@ -19,7 +18,4 @@ USE_LIBTOOL= # defined HAS_CONFIGURE= # defined INSTALLATION_DIRS= include lib -post-extract: - ${CP} ${FILESDIR}/lt.mk ${WRKSRC} - .include "../../mk/bsd.pkg.mk" diff --git a/devel/zlib/PLIST b/devel/zlib/PLIST index f24e715c780..cbf2a57138b 100644 --- a/devel/zlib/PLIST +++ b/devel/zlib/PLIST @@ -1,8 +1,9 @@ -@comment $NetBSD: PLIST,v 1.1 2001/11/01 01:27:23 zuntum Exp $ +@comment $NetBSD: PLIST,v 1.2 2004/01/12 21:19:50 adam Exp $ include/zconf.h include/zlib.h lib/libz.a lib/libz.la lib/libz.so -lib/libz.so.0 -lib/libz.so.0.1 +lib/libz.so.1 +lib/libz.so.1.2 +man/man3/zlib.3 diff --git a/devel/zlib/distinfo b/devel/zlib/distinfo index 8c1eedbd57f..6e8fb7f62fc 100644 --- a/devel/zlib/distinfo +++ b/devel/zlib/distinfo @@ -1,8 +1,5 @@ -$NetBSD: distinfo,v 1.4 2003/03/05 13:05:44 salo Exp $ +$NetBSD: distinfo,v 1.5 2004/01/12 21:19:50 adam Exp $ -SHA1 (zlib-1.1.4.tar.gz) = a9d8553979956b54e887d0f090267bcec2856423 -Size (zlib-1.1.4.tar.gz) = 181144 bytes -SHA1 (patch-aa) = 126697f6731e3a8e00442baea09f58a7bf70a475 -SHA1 (patch-ab) = f154bd3cc566a35e4fcf28d0af849b715631f6dc -SHA1 (patch-ac) = 33449b9e949ea756627e5898f06fd39bb3355c3c -SHA1 (patch-ad) = b188a3d4cfee5899853e129bb89b3905b056fa80 +SHA1 (zlib-1.2.1.tar.gz) = a3d51efc98b87b9ebd1a528d726007b0cb08a612 +Size (zlib-1.2.1.tar.gz) = 345833 bytes +SHA1 (patch-aa) = 97a1756fdcb844d1621d9c12b72b55e9536be34e diff --git a/devel/zlib/files/lt.mk b/devel/zlib/files/lt.mk deleted file mode 100644 index 499d884e8ac..00000000000 --- a/devel/zlib/files/lt.mk +++ /dev/null @@ -1,46 +0,0 @@ -# Original NetBSD: Makefile,v 1.13 1999/07/09 07:07:13 garbled Exp - -# libtool-using Makefile for libz, derived deom bsd.mk for Solaris - HF - -LIB= z -MKMAN= no - -SRCS= adler32.c compress.c crc32.c deflate.c gzio.c infblock.c \ - infcodes.c inffast.c inflate.c inftrees.c infutil.c trees.c uncompr.c \ - zutil.c - -CPPFLAGS+= -I${.CURDIR} - -CLEANFILES+= minigzip - -INCS= zconf.h zlib.h -INCSDIR=${PREFIX}/include -LIBDIR=${PREFIX}/lib - -SHLIB_MAJOR= 0 -SHLIB_MINOR= 1 - -test: minigzip - echo hello world | ./minigzip | ./minigzip -d - -# Note: CFLAGS ommitted by intention! -# This is to verify that zlib.h works standalone. -minigzip : minigzip.c libz.la - ${LIBTOOL} $(CC) -o minigzip ${.CURDIR}/minigzip.c libz.la - - - -all: minigzip - -.SUFFIXES: .lo .c -.c.lo: - ${LIBTOOL} ${CC} -c $*.c -lib${LIB}.la: ${SRCS:.c=.lo} - ${LIBTOOL} ${CC} -o lib${LIB}.la ${SRCS:.c=.lo} \ - -rpath ${LIBDIR} \ - -version-info ${SHLIB_MAJOR}:${SHLIB_MINOR} -install: - ${BSD_INSTALL_DATA_DIR} ${INCSDIR} - ${BSD_INSTALL_DATA} zconf.h zlib.h ${INCSDIR} - ${LIBTOOL} ${BSD_INSTALL_DATA} libz.la ${LIBDIR} - diff --git a/devel/zlib/patches/patch-aa b/devel/zlib/patches/patch-aa index 4b4731a9206..6029ee04cc8 100644 --- a/devel/zlib/patches/patch-aa +++ b/devel/zlib/patches/patch-aa @@ -1,21 +1,51 @@ -$NetBSD: patch-aa,v 1.3 2003/03/05 13:05:45 salo Exp $ +$NetBSD: patch-aa,v 1.4 2004/01/12 21:19:50 adam Exp $ ---- lt.mk.orig 2003-03-05 04:17:05.000000000 +0100 -+++ lt.mk 2003-03-05 04:18:44.000000000 +0100 -@@ -10,6 +10,7 @@ - zutil.c +--- Makefile.in.orig 2003-11-09 02:29:23.000000000 +0000 ++++ Makefile.in +@@ -16,9 +16,7 @@ + # To install in $HOME instead of /usr/local, use: + # make install prefix=$HOME - CPPFLAGS+= -I${.CURDIR} -+CFLAGS= +-CC=cc - CLEANFILES+= minigzip +-CFLAGS=-O + #CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 + #CFLAGS=-g -DDEBUG + #CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ +@@ -54,7 +52,6 @@ OBJA = -@@ -34,7 +35,7 @@ + TEST_OBJS = example.o minigzip.o - .SUFFIXES: .lo .c - .c.lo: -- ${LIBTOOL} ${CC} -c $*.c -+ ${LIBTOOL} ${CC} ${CFLAGS} -c $*.c - lib${LIB}.la: ${SRCS:.c=.lo} - ${LIBTOOL} ${CC} -o lib${LIB}.la ${SRCS:.c=.lo} \ - -rpath ${LIBDIR} \ +-all: example$(EXE) minigzip$(EXE) + + check: test + test: all +@@ -77,11 +74,11 @@ match.o: match.S + mv _match.o match.o + rm -f _match.s + +-$(SHAREDLIBV): $(OBJS) +- $(LDSHARED) -o $@ $(OBJS) +- rm -f $(SHAREDLIB) $(SHAREDLIBM) +- ln -s $@ $(SHAREDLIB) +- ln -s $@ $(SHAREDLIBM) ++all: $(OBJS) ++ ${LIBTOOL} --mode=link ${CC} -o libz.la ${OBJS:.o=.lo} -rpath ${PREFIX}/lib -version-info 1:2 ++ ++.c.o: ++ ${LIBTOOL} --mode=compile ${CC} ${CFLAGS} -c $< + + example$(EXE): example.o $(LIBS) + $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS) +@@ -90,6 +87,11 @@ minigzip$(EXE): minigzip.o $(LIBS) + $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) + + install: $(LIBS) ++ ${BSD_INSTALL_DATA} zconf.h zlib.h ${PREFIX}/include ++ ${BSD_INSTALL_DATA} zlib.3 ${PREFIX}/man/man3 ++ ${LIBTOOL} --mode=install ${BSD_INSTALL_DATA} libz.la ${PREFIX}/lib ++ ++installold: $(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 diff --git a/devel/zlib/patches/patch-ab b/devel/zlib/patches/patch-ab deleted file mode 100644 index 5a8e990ce77..00000000000 --- a/devel/zlib/patches/patch-ab +++ /dev/null @@ -1,36 +0,0 @@ -$NetBSD: patch-ab,v 1.1 1999/09/24 14:37:40 agc Exp $ - -Use a version of the basesrc Makefile - ---- /dev/null Fri Sep 24 15:02:44 1999 -+++ bsd.mk Fri Sep 24 15:19:26 1999 -@@ -0,0 +1,29 @@ -+# Original NetBSD: Makefile,v 1.13 1999/07/09 07:07:13 garbled Exp -+ -+LIB= z -+MKMAN= no -+ -+SRCS= adler32.c compress.c crc32.c deflate.c gzio.c infblock.c \ -+ infcodes.c inffast.c inflate.c inftrees.c infutil.c trees.c uncompr.c \ -+ zutil.c -+ -+CPPFLAGS+= -I${.CURDIR} -+ -+CLEANFILES+= minigzip -+ -+INCS= zconf.h zlib.h -+INCSDIR=${PREFIX}/include -+LIBDIR=${PREFIX}/lib -+ -+SHLIB_MAJOR= 0 -+SHLIB_MINOR= 1 -+ -+.include <bsd.lib.mk> -+ -+test: minigzip -+ echo hello world | ./minigzip | ./minigzip -d -+ -+# Note: CFLAGS ommitted by intention! -+# This is to verify that zlib.h works standalone. -+minigzip : minigzip.c libz.a -+ $(CC) -o minigzip ${.CURDIR}/minigzip.c libz.a diff --git a/devel/zlib/patches/patch-ac b/devel/zlib/patches/patch-ac deleted file mode 100644 index ce1abdedf96..00000000000 --- a/devel/zlib/patches/patch-ac +++ /dev/null @@ -1,46 +0,0 @@ -$NetBSD: patch-ac,v 1.1 2003/03/05 13:05:45 salo Exp $ - ---- configure.orig 1998-07-08 20:19:35.000000000 +0200 -+++ configure 2003-03-05 04:04:33.000000000 +0100 -@@ -181,6 +181,32 @@ - echo Checking for mmap support... No. - fi - -+cat > $test.c <<EOF -+#include <stdio.h> -+char *p; -+int main() { return snprintf(p, 10, "1234567890"); } -+EOF -+if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then -+ echo "Checking for snprintf... Yes." -+ CFLAGS="$CFLAGS -DHAS_snprintf" -+else -+ echo "Checking for snprintf... No." -+fi -+ -+cat > $test.c <<EOF -+#include <stdio.h> -+#include <stdarg.h> -+char *p; -+va_list ap; -+int main() { return vsnprintf(p, 10, "1234567890", ap); } -+EOF -+if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then -+ echo "Checking for vsnprintf... Yes." -+ CFLAGS="$CFLAGS -DHAS_vsnprintf" -+else -+ echo "Checking for vsnprintf... No." -+fi -+ - CPP=${CPP-"$CC -E"} - case $CFLAGS in - *ASMV*) -@@ -195,7 +221,7 @@ - rm -f $test.[co] $test$shared_ext - - # udpate Makefile --sed < Makefile.in " -+sed < lt.mk " - /^CC *=/s%=.*%=$CC% - /^CFLAGS *=/s%=.*%=$CFLAGS% - /^CPP *=/s%=.*%=$CPP% diff --git a/devel/zlib/patches/patch-ad b/devel/zlib/patches/patch-ad deleted file mode 100644 index 6ad801f87c8..00000000000 --- a/devel/zlib/patches/patch-ad +++ /dev/null @@ -1,44 +0,0 @@ -$NetBSD: patch-ad,v 1.1 2003/03/05 13:05:45 salo Exp $ - -CAN-2003-0107 - Buffer overflow in the gzprintf function in zlib 1.1.4, when - zlib is compiled without vsnprintf or when long inputs are - truncated using vsnprintf, allows attackers to cause a denial - of service or possibly execute arbitrary code. - ---- gzio.c.orig 2002-03-11 14:16:01.000000000 +0100 -+++ gzio.c 2003-03-05 02:27:14.000000000 +0100 -@@ -530,13 +530,13 @@ - - va_start(va, format); - #ifdef HAS_vsnprintf -- (void)vsnprintf(buf, sizeof(buf), format, va); -+ len = vsnprintf(buf, sizeof(buf), format, va); - #else - (void)vsprintf(buf, format, va); -+ len = strlen(buf); /* some *sprintf don't return the nb of bytes written */ - #endif - va_end(va); -- len = strlen(buf); /* some *sprintf don't return the nb of bytes written */ -- if (len <= 0) return 0; -+ if (len <= 0 || len >= sizeof(buf)) return 0; - - return gzwrite(file, buf, (unsigned)len); - } -@@ -553,14 +553,14 @@ - int len; - - #ifdef HAS_snprintf -- snprintf(buf, sizeof(buf), format, a1, a2, a3, a4, a5, a6, a7, a8, -+ len = snprintf(buf, sizeof(buf), format, a1, a2, a3, a4, a5, a6, a7, a8, - a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20); - #else - sprintf(buf, format, a1, a2, a3, a4, a5, a6, a7, a8, - a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20); --#endif - len = strlen(buf); /* old sprintf doesn't return the nb of bytes written */ -- if (len <= 0) return 0; -+#endif -+ if (len <= 0 || len >= sizeof(buf)) return 0; - - return gzwrite(file, buf, len); - } |