Update to 2.32 from David Hill <dhill@mindcry.org>. Clean up a bit.

This commit is contained in:
naddy 2006-07-30 17:33:40 +00:00
parent 34e18f06b6
commit 9afa4982b3
7 changed files with 88 additions and 63 deletions

View File

@ -1,15 +1,14 @@
# $OpenBSD: Makefile,v 1.33 2004/12/04 15:45:41 robert Exp $
# $FreeBSD: Makefile,v 1.11 1997/11/25 20:45:45 ache Exp $
# $OpenBSD: Makefile,v 1.34 2006/07/30 17:33:40 naddy Exp $
COMMENT= "create/update ZIP files compatible with PKZip(tm)"
DISTNAME= zip23
PKGNAME= zip-2.3p0
DISTNAME= zip-2.32
CATEGORIES= archivers
MASTER_SITES= ftp://ftp.uu.net/pub/archiving/zip/src/ \
ftp://ftp.icce.rug.nl/infozip/src/
MASTER_SITES= ftp://ftp.info-zip.org/pub/infozip/src/ \
${MASTER_SITE_SOURCEFORGE:=infozip/} \
http://mirror.switch.ch/ftp/mirror/infozip/src/
DISTFILES= zip23.tar.gz zcrypt29.zip
DISTFILES= zip232.tar.gz zcrypt29.zip
HOMEPAGE= http://www.ctan.org/tex-archive/tools/zip/info-zip/Zip.html
@ -20,23 +19,15 @@ PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
WANTLIB= c
MAKE_FLAGS= CC="${CC}" CFLAGS="${CFLAGS} -I. -DUNIX"
MAKE_FLAGS= CC="${CC}" CFLAGS_NOOPT="${CFLAGS} -I. -DUNIX"
FAKE_FLAGS= prefix="${WRKINST}${PREFIX}"
MAKE_FILE= unix/Makefile
ALL_TARGET= generic
WRKDIST= ${WRKDIR}/${PKGNAME:S/p0//}
DOCS= README WHERE
post-extract:
@mv -f ${WRKDIR}/{crypt.c,crypt.h} ${WRKSRC}
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/zip
cd ${WRKSRC}; ${INSTALL_DATA} ${DOCS} ${PREFIX}/share/doc/zip
@mv -f ${WRKDIR}/crypt.[ch] ${WRKSRC}
NO_REGRESS= Yes

View File

@ -1,8 +1,8 @@
MD5 (zcrypt29.zip) = 0c969ba1661183b041a142945ed2710e
MD5 (zip23.tar.gz) = 5206a99541f3b0ab90f1baa167392c4f
MD5 (zip232.tar.gz) = 8a4da4460386e324debe97f3b7fe4d96
RMD160 (zcrypt29.zip) = 701aa47d910b76c85a868b343912ebd2d849bdc3
RMD160 (zip23.tar.gz) = e84f0ec91807e7f213ba28bac51499b9995191b9
RMD160 (zip232.tar.gz) = 6b9326c8a60bc6bf08825e416140fd0ca8a6a7f1
SHA1 (zcrypt29.zip) = 04223ea88ba3cf5d0f8d6a5fc9c1a4cd8c568f56
SHA1 (zip23.tar.gz) = 0600c93218e6acf1be75dd79da4244eabc8e16cf
SHA1 (zip232.tar.gz) = 5bc562bf95d9aee0cb6625e6038898e1f191a4aa
SIZE (zcrypt29.zip) = 20248
SIZE (zip23.tar.gz) = 723283
SIZE (zip232.tar.gz) = 807180

View File

@ -1,19 +1,19 @@
$OpenBSD: patch-fileio_c,v 1.1 2004/02/06 08:29:24 kevlo Exp $
--- fileio.c.orig 2004-02-06 16:11:15.000000000 +0000
+++ fileio.c 2004-02-06 16:21:58.000000000 +0000
@@ -859,7 +859,15 @@ char *zip; /* path name of
$OpenBSD: patch-fileio_c,v 1.2 2006/07/30 17:33:40 naddy Exp $
--- fileio.c.orig Thu Jun 16 05:31:52 2005
+++ fileio.c Sun Jul 30 19:09:14 2006
@@ -919,7 +919,15 @@ char *zip; /* path name of
}
#else
strcat(t, "ziXXXXXX"); /* must use lowercase for Linux dos file system */
- return mktemp(t);
+ {
+ int fd = mkstemp(t);
+ if ( fd == -1 ) {
+ perror( "can't create temp file" );
+ if (fd == -1) {
+ perror("can't create temp file");
+ exit(1);
+ }
+ close(fd);
+ return t;
+ return (t);
+ }
#endif /* NO_MKTEMP */
#endif /* TANDEM */

View File

@ -1,10 +1,11 @@
--- unix/Makefile.orig Mon Nov 29 00:22:42 1999
+++ unix/Makefile Sun Jul 23 22:24:56 2000
@@ -125,11 +125,9 @@
$OpenBSD: patch-unix_Makefile,v 1.3 2006/07/30 17:33:40 naddy Exp $
--- unix/Makefile.orig Sun Apr 23 01:52:18 2006
+++ unix/Makefile Sun Jul 30 19:09:14 2006
@@ -128,11 +128,9 @@ $(ZIPMANUAL): man/zip.1
# install
install: $(ZIPS)
-$(INSTALL_D) $(BINDIR)
- $(INSTALL) $(ZIPS) $(BINDIR)
- $(INSTALL_PROGRAM) $(ZIPS) $(BINDIR)
- -cd $(BINDIR); $(CHMOD) $(BINFLAGS) $(ZIPS)
+ $(BSD_INSTALL_PROGRAM) $(ZIPS) $(BINDIR)
-$(INSTALL_D) $(MANDIR)

View File

@ -0,0 +1,43 @@
$OpenBSD: patch-unix_configure,v 1.1 2006/07/30 17:33:40 naddy Exp $
--- unix/configure.orig Sun Jul 30 19:28:24 2006
+++ unix/configure Sun Jul 30 19:28:40 2006
@@ -15,39 +15,6 @@ CC=${1-cc}
CFLAGS=${2-"-I. -DUNIX"}
LFLAGS1=""
LN="ln -s"
-echo "Check C compiler type (optimization option)"
-cat > conftest.c << _EOF_
-int main()
-{
-#ifndef __SUNPRO_C
- bad code
-#endif
- return 0;
-}
-_EOF_
-$CC $CFLAGS -c conftest.c > /dev/null 2>/dev/null
-if test $? -eq 0; then
- echo ' Sun C (-xO3)'
- CFLAGS="${CFLAGS} -xO3"
-else
- cat > conftest.c << _EOF_
-int main()
-{
-#ifndef __DECC
- bad code
-#endif
- return 0;
-}
-_EOF_
- $CC $CFLAGS -c conftest.c > /dev/null 2>/dev/null
- if test $? -eq 0; then
- echo ' DEC C (-O3)'
- CFLAGS="${CFLAGS} -O3"
- else
- echo ' Other (gcc?) (-O2)'
- CFLAGS="${CFLAGS} -O2"
- fi
-fi
echo Check for the C preprocessor
# on SVR4, cc -E does not produce correct assembler files. Need /lib/cpp.

View File

@ -1,28 +1,21 @@
$OpenBSD: patch-unix_unix_c,v 1.1 2004/12/04 15:36:36 robert Exp $
--- unix/unix.c.orig Sat Dec 4 16:25:31 2004
+++ unix/unix.c Sat Dec 4 16:26:56 2004
@@ -319,9 +319,9 @@
a file size of -1 */
{
$OpenBSD: patch-unix_unix_c,v 1.2 2006/07/30 17:33:40 naddy Exp $
--- unix/unix.c.orig Tue May 30 00:35:00 2006
+++ unix/unix.c Sun Jul 30 19:09:14 2006
@@ -338,7 +338,7 @@ ulg filetime(f, a, n, t)
struct stat s; /* results of stat() */
- char name[FNMAX];
/* converted to pointer from using FNMAX - 11/8/04 EG */
char *name;
- int len = strlen(f);
-
+ char *name;
+ size_t len = strlen(f);
+
if (f == label) {
if (a != NULL)
*a = label_mode;
@@ -331,6 +331,11 @@
t->atime = t->mtime = t->ctime = label_utim;
return label_time;
}
+
+ name = malloc(len + 1);
+ if (!name)
+ return 0;
+
strcpy(name, f);
if (name[len - 1] == '/')
name[len - 1] = '\0';
@@ -438,7 +438,7 @@ int set_extra_field(z, z_utim)
{
struct stat s;
char *name;
- int len = strlen(z->name);
+ size_t len = strlen(z->name);
/* For the full sized UT local field including the UID/GID fields, we
* have to stat the file again. */

View File

@ -1,9 +1,6 @@
@comment $OpenBSD: PLIST,v 1.8 2004/08/03 11:30:02 espie Exp $
@comment $OpenBSD: PLIST,v 1.9 2006/07/30 17:33:40 naddy Exp $
bin/zip
bin/zipcloak
bin/zipnote
bin/zipsplit
@man man/man1/zip.1
share/doc/zip/
share/doc/zip/README
share/doc/zip/WHERE