aboutsummaryrefslogtreecommitdiff
path: root/archivers/unzip
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>2009-10-26 13:27:24 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>2009-10-26 13:27:24 +0000
commitd2c74b67344934d08940290890c52ae35e907f9e (patch)
tree2e73918a5b5804faf3f7eec2e917e200cbe75477 /archivers/unzip
parent1e51939ce3951f64717590bb0b29577a571e708e (diff)
downloadports-d2c74b67344934d08940290890c52ae35e907f9e.tar.gz
ports-d2c74b67344934d08940290890c52ae35e907f9e.zip
Notes
Diffstat (limited to 'archivers/unzip')
-rw-r--r--archivers/unzip/Makefile21
-rw-r--r--archivers/unzip/distinfo6
-rw-r--r--archivers/unzip/files/patch-aa22
-rw-r--r--archivers/unzip/files/patch-ab16
-rw-r--r--archivers/unzip/files/patch-fileio.c14
-rw-r--r--archivers/unzip/files/patch-inflate.c50
-rw-r--r--archivers/unzip/files/patch-process.c24
-rw-r--r--archivers/unzip/files/patch-unix_unix.c114
-rw-r--r--archivers/unzip/files/patch-unzpriv.h30
9 files changed, 41 insertions, 256 deletions
diff --git a/archivers/unzip/Makefile b/archivers/unzip/Makefile
index d3ac72614119..97a7103134bf 100644
--- a/archivers/unzip/Makefile
+++ b/archivers/unzip/Makefile
@@ -6,16 +6,15 @@
#
PORTNAME= unzip
-PORTVERSION= 5.52
-PORTREVISION= 5
+PORTVERSION= 6.0
CATEGORIES?= archivers
-MASTER_SITES= SF/infozip/UnZip%205.x%20and%20earlier/${PORTVERSION}
-DISTNAME= ${PORTNAME}552
+MASTER_SITES= SF/infozip/UnZip%206.x%20(latest)/UnZip%20${PORTVERSION} \
+ SF/infozip/UnZip%205.x%20and%20earlier/5.51:unreduce
+DISTNAME= ${PORTNAME}60
MAINTAINER?= ache@FreeBSD.org
COMMENT?= List, test and extract compressed files in a ZIP archive
-WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
MAKEFILE= unix/Makefile
.if defined(INSTALL_AS_INFOUNZIP)
UNZIP_NAME= info-unzip
@@ -26,16 +25,18 @@ PLIST_FILES= bin/${UNZIP_NAME} bin/funzip bin/unzipsfx bin/zipgrep bin/zipinfo
PORTDOCS= README WHERE
MAN1= ${UNZIP_NAME}.1 funzip.1 unzipsfx.1 zipgrep.1 zipinfo.1
-CFLAGS+= -D_FILE_OFFSET_BITS=64
-LOCAL_UNZIP= ${CFLAGS} -DACORN_FTYPE_NFS -DWILD_STOP_AT_DIR
+LOCAL_UNZIP= ${CFLAGS} -DACORN_FTYPE_NFS -DWILD_STOP_AT_DIR \
+ -DUNICODE_SUPPORT -DUNICODE_WCHAR -DUTF8_MAYBE_NATIVE -D_MBCS \
+ -DLARGE_FILE_SUPPORT
.if defined(WITH_UNZIP_UNREDUCE)
-DISTFILES= ${DISTNAME}${EXTRACT_SUFX} unreduce_full.zip
-EXTRACT_ONLY= ${PORTNAME}552.tar.gz
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX} unreduce_full.zip:unreduce
+EXTRACT_ONLY= ${PORTNAME}60.tar.gz
LOCAL_UNZIP+= -DUSE_SMITH_CODE
.endif
-MAKE_ENV= LOCAL_UNZIP="${LOCAL_UNZIP}"
+MAKE_ENV= LOCAL_UNZIP="${LOCAL_UNZIP}" \
+ D_USE_BZ2=-DUSE_BZIP2 L_BZ2=-lbz2
.ifdef USE_UNZIP
.error You have `USE_UNZIP' variable defined either in environment or in make(1) arguments. Please undefine and try again.
diff --git a/archivers/unzip/distinfo b/archivers/unzip/distinfo
index 0b607d7a7cdd..214d9a5d1354 100644
--- a/archivers/unzip/distinfo
+++ b/archivers/unzip/distinfo
@@ -1,6 +1,6 @@
-MD5 (unzip552.tar.gz) = 9d23919999d6eac9217d1f41472034a9
-SHA256 (unzip552.tar.gz) = 145d95e2ef1ef9add2e3c97d1340907e33ab8749eb1235372e7f0b7af600a8e9
-SIZE (unzip552.tar.gz) = 1140291
+MD5 (unzip60.tar.gz) = 62b490407489521db863b523a7f86375
+SHA256 (unzip60.tar.gz) = 036d96991646d0449ed0aa952e4fbe21b476ce994abc276e49d30e686708bd37
+SIZE (unzip60.tar.gz) = 1376845
MD5 (unreduce_full.zip) = b7cde206d69b403e7551b9b0c25bd345
SHA256 (unreduce_full.zip) = 1f4d93d2250dc1a1d1d2b8aac09d9989d4f9dd2cb0967373bf41fdf5f108cec1
SIZE (unreduce_full.zip) = 2849
diff --git a/archivers/unzip/files/patch-aa b/archivers/unzip/files/patch-aa
index 11c65e78da3e..2ba157517618 100644
--- a/archivers/unzip/files/patch-aa
+++ b/archivers/unzip/files/patch-aa
@@ -1,6 +1,6 @@
---- unix/Makefile.orig Mon Mar 1 20:37:24 2004
-+++ unix/Makefile Wed May 26 21:43:04 2004
-@@ -42,7 +42,7 @@
+--- unix/Makefile.orig 2009-01-19 01:41:18.000000000 +0300
++++ unix/Makefile 2009-10-26 13:15:47.000000000 +0300
+@@ -42,12 +42,12 @@
# such as -DDOSWILD).
# UnZip flags
@@ -8,15 +8,21 @@
+CC ?= cc# try using "gcc" target rather than changing this (CC and LD
LD = $(CC)# must match, else "unresolved symbol: ___main" is possible)
AS = as
- LOC = $(LOCAL_UNZIP)
-@@ -727,8 +727,8 @@
+ LOC = $(D_USE_BZ2) $(LOCAL_UNZIP)
+ AF = $(LOC)
+-CFLAGS = -O
++#CFLAGS = -O
+ CF_NOOPT = -I. -I$(IZ_BZIP2) -DUNIX $(LOC)
+ CF = $(CFLAGS) $(CF_NOOPT)
+ LFLAGS1 =
+@@ -763,8 +763,8 @@
# FreeBSD on Intel:
freebsd: unix_make
@echo 'NOTE: use bsd target for non-Intel FreeBSD compiles (if any).'
- $(MAKE) unzips CC=gcc LD=gcc AS=gcc\
-- CF="-O3 -Wall -I. -DASM_CRC -DUNIX -DBSD $(LOC)"\
+- CFLAGS="-O3 -Wall -DASM_CRC -DBSD"\
+ $(MAKE) unzips CC="$(CC)" LD="$(CC)" AS="$(CC)"\
-+ CF="-Wall -I. -DASM_CRC -DUNIX -DBSD $(LOC)"\
- AF="-Di386 $(AF)" CRC32=crc_gcc
++ CF="$(CF) -Wall -DASM_CRC -DBSD"\
+ AF="-Di386 $(AF)" CRCA_O=crc_gcc$O
# Generic BSDish Unix gcc. ``The -O3 only works with later versions of gcc;
diff --git a/archivers/unzip/files/patch-ab b/archivers/unzip/files/patch-ab
index 50dfd0b5e7a4..1df0101edef6 100644
--- a/archivers/unzip/files/patch-ab
+++ b/archivers/unzip/files/patch-ab
@@ -1,11 +1,11 @@
---- unix/unix.c.bak Wed May 26 21:40:00 2004
-+++ unix/unix.c Wed May 26 21:40:09 2004
-@@ -533,7 +533,7 @@
-
- default:
- /* allow European characters in filenames: */
-- if (isprint(workch) || (128 <= workch && workch <= 254))
-+ if (isprint(workch) || (128 <= workch && workch <= 255))
+--- unix/unix.c.orig 2009-01-24 02:31:26.000000000 +0300
++++ unix/unix.c 2009-10-26 13:22:08.000000000 +0300
+@@ -610,7 +610,7 @@
+ * else allow 8-bit characters (e.g. UTF-8) in filenames:
+ */
+ if (uO.cflxflag ||
+- (isprint(workch) || (128 <= workch && workch <= 254)))
++ (isprint(workch) || (128 <= workch && workch <= 255)))
*pp++ = (char)workch;
} /* end switch */
diff --git a/archivers/unzip/files/patch-fileio.c b/archivers/unzip/files/patch-fileio.c
deleted file mode 100644
index 880db03dc700..000000000000
--- a/archivers/unzip/files/patch-fileio.c
+++ /dev/null
@@ -1,14 +0,0 @@
---- unzip-5.52.orig/fileio.c
-+++ fileio.c
-@@ -413,7 +413,11 @@
- #endif /* NOVELL_BUG_FAILSAFE */
- Trace((stderr, "open_outfile: doing fopen(%s) for writing\n",
- FnFilter1(G.filename)));
-+#if defined(SYMLINKS) || defined(QLZIP)
-+ if ((G.outfile = fopen(G.filename, FOPWR)) == (FILE *)NULL) {
-+#else
- if ((G.outfile = fopen(G.filename, FOPW)) == (FILE *)NULL) {
-+#endif
- Info(slide, 0x401, ((char *)slide, LoadFarString(CannotCreateFile),
- FnFilter1(G.filename)));
- return 1;
diff --git a/archivers/unzip/files/patch-inflate.c b/archivers/unzip/files/patch-inflate.c
deleted file mode 100644
index e6d751d20dc7..000000000000
--- a/archivers/unzip/files/patch-inflate.c
+++ /dev/null
@@ -1,50 +0,0 @@
---- unzip-5.52.orig/inflate.c
-+++ inflate.c
-@@ -983,6 +983,7 @@
- unsigned l; /* last length */
- unsigned m; /* mask for bit lengths table */
- unsigned n; /* number of lengths to get */
-+ struct huft *tlp;
- struct huft *tl; /* literal/length code table */
- struct huft *td; /* distance code table */
- unsigned bl; /* lookup bits for tl */
-@@ -996,6 +997,8 @@
- int retval = 0; /* error code returned: initialized to "no error" */
-
-
-+ td = tlp = tl = (struct huft *)NULL;
-+
- /* make local bit buffer */
- Trace((stderr, "\ndynamic block"));
- b = G.bb;
-@@ -1047,9 +1050,9 @@
- while (i < n)
- {
- NEEDBITS(bl)
-- j = (td = tl + ((unsigned)b & m))->b;
-+ j = (tlp = tl + ((unsigned)b & m))->b;
- DUMPBITS(j)
-- j = td->v.n;
-+ j = tlp->v.n;
- if (j < 16) /* length of code in bits (0..15) */
- ll[i++] = l = j; /* save last length in l */
- else if (j == 16) /* repeat last length 3 to 6 times */
-@@ -1141,6 +1144,7 @@
- huft_free(td);
- }
- huft_free(tl);
-+
- return retval;
- }
-
-@@ -1149,8 +1153,8 @@
-
- cleanup_and_exit:
- /* free the decoding tables, return */
-- huft_free(tl);
-- huft_free(td);
-+ if (tl) huft_free(tl);
-+ if (td) huft_free(td);
- return retval;
- }
-
diff --git a/archivers/unzip/files/patch-process.c b/archivers/unzip/files/patch-process.c
index 62e51b6ce9b6..089210d1f4b4 100644
--- a/archivers/unzip/files/patch-process.c
+++ b/archivers/unzip/files/patch-process.c
@@ -1,30 +1,16 @@
---- unzip-5.52.orig/process.c
-+++ process.c
-@@ -74,20 +74,20 @@
+--- process.c.orig 2009-03-06 04:25:10.000000000 +0300
++++ process.c 2009-10-26 16:08:15.000000000 +0300
+@@ -101,10 +101,10 @@
/* do_seekable() strings */
# ifdef UNIX
static ZCONST char Far CannotFindZipfileDirMsg[] =
- "%s: cannot find zipfile directory in one of %s or\n\
- %s%s.zip, and cannot find %s, period.\n";
+ "%s: cannot find zipfile directory in one of %.512s or\n\
-+ %s%.512s.zip, and cannot find %.512s, period.\n";
++ %s%.512s.zip, and cannot find %.512s, period.\n";
static ZCONST char Far CannotFindEitherZipfile[] =
- "%s: cannot find or open %s, %s.zip or %s.\n";
+ "%s: cannot find or open %.512s, %.512s.zip or %.512s.\n";
# else /* !UNIX */
- # ifndef AMIGA
- static ZCONST char Far CannotFindWildcardMatch[] =
-- "%s: cannot find any matches for wildcard specification \"%s\".\n";
-+ "%s: cannot find any matches for wildcard specification \"%.512s\".\n";
- # endif /* !AMIGA */
static ZCONST char Far CannotFindZipfileDirMsg[] =
-- "%s: cannot find zipfile directory in %s,\n\
-- %sand cannot find %s, period.\n";
-+ "%s: cannot find zipfile directory in %.512s,\n\
-+ %sand cannot find %.512s, period.\n";
- static ZCONST char Far CannotFindEitherZipfile[] =
-- "%s: cannot find either %s or %s.\n";
-+ "%s: cannot find either %.512s or %.512s.\n";
- # endif /* ?UNIX */
- extern ZCONST char Far Zipnfo[]; /* in unzip.c */
- #ifndef WINDLL
+ "%s: cannot find zipfile directory in %s,\n\
diff --git a/archivers/unzip/files/patch-unix_unix.c b/archivers/unzip/files/patch-unix_unix.c
deleted file mode 100644
index cf04c3b118e4..000000000000
--- a/archivers/unzip/files/patch-unix_unix.c
+++ /dev/null
@@ -1,114 +0,0 @@
---- unzip-5.52.orig/unix/unix.c
-+++ unix/unix.c
-@@ -1042,8 +1042,6 @@
- ush z_uidgid[2];
- int have_uidgid_flg;
-
-- fclose(G.outfile);
--
- /*---------------------------------------------------------------------------
- If symbolic links are supported, allocate storage for a symlink control
- structure, put the uncompressed "data" and other required info in it, and
-@@ -1063,6 +1061,7 @@
- Info(slide, 0x201, ((char *)slide,
- "warning: symbolic link (%s) failed: mem alloc overflow\n",
- FnFilter1(G.filename)));
-+ fclose(G.outfile);
- return;
- }
-
-@@ -1070,6 +1069,7 @@
- Info(slide, 0x201, ((char *)slide,
- "warning: symbolic link (%s) failed: no mem\n",
- FnFilter1(G.filename)));
-+ fclose(G.outfile);
- return;
- }
- slnk_entry->next = NULL;
-@@ -1079,11 +1079,10 @@
- slnk_entry->fname = slnk_entry->target + ucsize + 1;
- strcpy(slnk_entry->fname, G.filename);
-
-- /* reopen the "link data" file for reading */
-- G.outfile = fopen(G.filename, FOPR);
-+ /* move back to the start of the file to re-read the "link data" */
-+ rewind(G.outfile);
-
-- if (!G.outfile ||
-- fread(slnk_entry->target, 1, ucsize, G.outfile) != (int)ucsize)
-+ if (fread(slnk_entry->target, 1, ucsize, G.outfile) != (int)ucsize)
- {
- Info(slide, 0x201, ((char *)slide,
- "warning: symbolic link (%s) failed\n",
-@@ -1115,12 +1114,20 @@
- }
- #endif
-
-+#if (defined(NO_FCHOWN) || defined(NO_FCHMOD))
-+ fclose(G.outfile);
-+#endif
-+
- have_uidgid_flg = get_extattribs(__G__ &(zt.t3), z_uidgid);
-
- /* if -X option was specified and we have UID/GID info, restore it */
- if (have_uidgid_flg) {
- TTrace((stderr, "close_outfile: restoring Unix UID/GID info\n"));
-+#if (defined(NO_FCHOWN) || defined(NO_FCHMOD))
- if (chown(G.filename, (uid_t)z_uidgid[0], (gid_t)z_uidgid[1]))
-+#else
-+ if (fchown(fileno(G.outfile), (uid_t)z_uidgid[0], (gid_t)z_uidgid[1]))
-+#endif
- {
- if (uO.qflag)
- Info(slide, 0x201, ((char *)slide,
-@@ -1133,6 +1140,18 @@
- }
- }
-
-+#if (!defined(NO_FCHOWN) && !defined(NO_FCHMOD))
-+/*---------------------------------------------------------------------------
-+ Change the file permissions from default ones to those stored in the
-+ zipfile.
-+ ---------------------------------------------------------------------------*/
-+
-+ if (fchmod(fileno(G.outfile), filtattr(__G__ G.pInfo->file_attr)))
-+ perror("chmod (file attributes) error");
-+
-+ fclose(G.outfile);
-+#endif /* !NO_FCHOWN && !NO_FCHMOD */
-+
- /* set the file's access and modification times */
- if (utime(G.filename, &(zt.t2))) {
- #ifdef AOS_VS
-@@ -1151,6 +1170,7 @@
- #endif /* ?AOS_VS */
- }
-
-+#if (defined(NO_FCHOWN) || defined(NO_FCHMOD))
- /*---------------------------------------------------------------------------
- Change the file permissions from default ones to those stored in the
- zipfile.
-@@ -1160,6 +1180,7 @@
- if (chmod(G.filename, filtattr(__G__ G.pInfo->file_attr)))
- perror("chmod (file attributes) error");
- #endif
-+#endif /* NO_FCHOWN || NO_FCHMOD */
-
- } /* end function close_outfile() */
-
-@@ -1640,7 +1661,6 @@
-
- if ((long)LG(dlen) > 0)
- {
-- G.outfile = fopen(G.filename,"r+");
- fseek(G.outfile, -8, SEEK_END);
- fread(&ntc, 8, 1, G.outfile);
- if(ntc.id != *(long *)"XTcc")
-@@ -1650,7 +1670,6 @@
- fwrite (&ntc, 8, 1, G.outfile);
- }
- Info(slide, 0x201, ((char *)slide, "QData = %d", LG(dlen)));
-- fclose(G.outfile);
- }
- return; /* finished, cancel further extra field scanning */
- }
diff --git a/archivers/unzip/files/patch-unzpriv.h b/archivers/unzip/files/patch-unzpriv.h
deleted file mode 100644
index a7902b2aa3f9..000000000000
--- a/archivers/unzip/files/patch-unzpriv.h
+++ /dev/null
@@ -1,30 +0,0 @@
---- unzip-5.52.orig/unzpriv.h
-+++ unzpriv.h
-@@ -1081,6 +1081,7 @@
- # define FOPR "r","ctx=stm"
- # define FOPM "r+","ctx=stm","rfm=fix","mrs=512"
- # define FOPW "w","ctx=stm","rfm=fix","mrs=512"
-+# define FOPWR "w+","ctx=stm","rfm=fix","mrs=512"
- #endif /* VMS */
-
- #ifdef CMS_MVS
-@@ -1117,6 +1118,9 @@
- # ifndef FOPWT
- # define FOPWT "wt"
- # endif
-+# ifndef FOPWR
-+# define FOPWR "w+b"
-+# endif
- #else /* !MODERN */
- # ifndef FOPR
- # define FOPR "r"
-@@ -1130,6 +1134,9 @@
- # ifndef FOPWT
- # define FOPWT "w"
- # endif
-+# ifndef FOPWR
-+# define FOPWR "w+b"
-+# endif
- #endif /* ?MODERN */
-
- /*