Upgrade to 6.0
PR: 139971
This commit is contained in:
parent
1e51939ce3
commit
d2c74b6734
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=243327
@ -6,16 +6,15 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
PORTNAME= unzip
|
PORTNAME= unzip
|
||||||
PORTVERSION= 5.52
|
PORTVERSION= 6.0
|
||||||
PORTREVISION= 5
|
|
||||||
CATEGORIES?= archivers
|
CATEGORIES?= archivers
|
||||||
MASTER_SITES= SF/infozip/UnZip%205.x%20and%20earlier/${PORTVERSION}
|
MASTER_SITES= SF/infozip/UnZip%206.x%20(latest)/UnZip%20${PORTVERSION} \
|
||||||
DISTNAME= ${PORTNAME}552
|
SF/infozip/UnZip%205.x%20and%20earlier/5.51:unreduce
|
||||||
|
DISTNAME= ${PORTNAME}60
|
||||||
|
|
||||||
MAINTAINER?= ache@FreeBSD.org
|
MAINTAINER?= ache@FreeBSD.org
|
||||||
COMMENT?= List, test and extract compressed files in a ZIP archive
|
COMMENT?= List, test and extract compressed files in a ZIP archive
|
||||||
|
|
||||||
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
|
|
||||||
MAKEFILE= unix/Makefile
|
MAKEFILE= unix/Makefile
|
||||||
.if defined(INSTALL_AS_INFOUNZIP)
|
.if defined(INSTALL_AS_INFOUNZIP)
|
||||||
UNZIP_NAME= info-unzip
|
UNZIP_NAME= info-unzip
|
||||||
@ -26,16 +25,18 @@ PLIST_FILES= bin/${UNZIP_NAME} bin/funzip bin/unzipsfx bin/zipgrep bin/zipinfo
|
|||||||
PORTDOCS= README WHERE
|
PORTDOCS= README WHERE
|
||||||
MAN1= ${UNZIP_NAME}.1 funzip.1 unzipsfx.1 zipgrep.1 zipinfo.1
|
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)
|
.if defined(WITH_UNZIP_UNREDUCE)
|
||||||
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} unreduce_full.zip
|
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} unreduce_full.zip:unreduce
|
||||||
EXTRACT_ONLY= ${PORTNAME}552.tar.gz
|
EXTRACT_ONLY= ${PORTNAME}60.tar.gz
|
||||||
LOCAL_UNZIP+= -DUSE_SMITH_CODE
|
LOCAL_UNZIP+= -DUSE_SMITH_CODE
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
MAKE_ENV= LOCAL_UNZIP="${LOCAL_UNZIP}"
|
MAKE_ENV= LOCAL_UNZIP="${LOCAL_UNZIP}" \
|
||||||
|
D_USE_BZ2=-DUSE_BZIP2 L_BZ2=-lbz2
|
||||||
|
|
||||||
.ifdef USE_UNZIP
|
.ifdef USE_UNZIP
|
||||||
.error You have `USE_UNZIP' variable defined either in environment or in make(1) arguments. Please undefine and try again.
|
.error You have `USE_UNZIP' variable defined either in environment or in make(1) arguments. Please undefine and try again.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
MD5 (unzip552.tar.gz) = 9d23919999d6eac9217d1f41472034a9
|
MD5 (unzip60.tar.gz) = 62b490407489521db863b523a7f86375
|
||||||
SHA256 (unzip552.tar.gz) = 145d95e2ef1ef9add2e3c97d1340907e33ab8749eb1235372e7f0b7af600a8e9
|
SHA256 (unzip60.tar.gz) = 036d96991646d0449ed0aa952e4fbe21b476ce994abc276e49d30e686708bd37
|
||||||
SIZE (unzip552.tar.gz) = 1140291
|
SIZE (unzip60.tar.gz) = 1376845
|
||||||
MD5 (unreduce_full.zip) = b7cde206d69b403e7551b9b0c25bd345
|
MD5 (unreduce_full.zip) = b7cde206d69b403e7551b9b0c25bd345
|
||||||
SHA256 (unreduce_full.zip) = 1f4d93d2250dc1a1d1d2b8aac09d9989d4f9dd2cb0967373bf41fdf5f108cec1
|
SHA256 (unreduce_full.zip) = 1f4d93d2250dc1a1d1d2b8aac09d9989d4f9dd2cb0967373bf41fdf5f108cec1
|
||||||
SIZE (unreduce_full.zip) = 2849
|
SIZE (unreduce_full.zip) = 2849
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- unix/Makefile.orig Mon Mar 1 20:37:24 2004
|
--- unix/Makefile.orig 2009-01-19 01:41:18.000000000 +0300
|
||||||
+++ unix/Makefile Wed May 26 21:43:04 2004
|
+++ unix/Makefile 2009-10-26 13:15:47.000000000 +0300
|
||||||
@@ -42,7 +42,7 @@
|
@@ -42,12 +42,12 @@
|
||||||
# such as -DDOSWILD).
|
# such as -DDOSWILD).
|
||||||
|
|
||||||
# UnZip flags
|
# UnZip flags
|
||||||
@ -8,15 +8,21 @@
|
|||||||
+CC ?= cc# try using "gcc" target rather than changing this (CC and LD
|
+CC ?= cc# try using "gcc" target rather than changing this (CC and LD
|
||||||
LD = $(CC)# must match, else "unresolved symbol: ___main" is possible)
|
LD = $(CC)# must match, else "unresolved symbol: ___main" is possible)
|
||||||
AS = as
|
AS = as
|
||||||
LOC = $(LOCAL_UNZIP)
|
LOC = $(D_USE_BZ2) $(LOCAL_UNZIP)
|
||||||
@@ -727,8 +727,8 @@
|
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 on Intel:
|
||||||
freebsd: unix_make
|
freebsd: unix_make
|
||||||
@echo 'NOTE: use bsd target for non-Intel FreeBSD compiles (if any).'
|
@echo 'NOTE: use bsd target for non-Intel FreeBSD compiles (if any).'
|
||||||
- $(MAKE) unzips CC=gcc LD=gcc AS=gcc\
|
- $(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)"\
|
+ $(MAKE) unzips CC="$(CC)" LD="$(CC)" AS="$(CC)"\
|
||||||
+ CF="-Wall -I. -DASM_CRC -DUNIX -DBSD $(LOC)"\
|
+ CF="$(CF) -Wall -DASM_CRC -DBSD"\
|
||||||
AF="-Di386 $(AF)" CRC32=crc_gcc
|
AF="-Di386 $(AF)" CRCA_O=crc_gcc$O
|
||||||
|
|
||||||
# Generic BSDish Unix gcc. ``The -O3 only works with later versions of gcc;
|
# Generic BSDish Unix gcc. ``The -O3 only works with later versions of gcc;
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
--- unix/unix.c.bak Wed May 26 21:40:00 2004
|
--- unix/unix.c.orig 2009-01-24 02:31:26.000000000 +0300
|
||||||
+++ unix/unix.c Wed May 26 21:40:09 2004
|
+++ unix/unix.c 2009-10-26 13:22:08.000000000 +0300
|
||||||
@@ -533,7 +533,7 @@
|
@@ -610,7 +610,7 @@
|
||||||
|
* else allow 8-bit characters (e.g. UTF-8) in filenames:
|
||||||
default:
|
*/
|
||||||
/* allow European characters in filenames: */
|
if (uO.cflxflag ||
|
||||||
- if (isprint(workch) || (128 <= workch && workch <= 254))
|
- (isprint(workch) || (128 <= workch && workch <= 254)))
|
||||||
+ if (isprint(workch) || (128 <= workch && workch <= 255))
|
+ (isprint(workch) || (128 <= workch && workch <= 255)))
|
||||||
*pp++ = (char)workch;
|
*pp++ = (char)workch;
|
||||||
} /* end switch */
|
} /* end switch */
|
||||||
|
|
||||||
|
@ -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;
|
|
@ -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;
|
|
||||||
}
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
--- unzip-5.52.orig/process.c
|
--- process.c.orig 2009-03-06 04:25:10.000000000 +0300
|
||||||
+++ process.c
|
+++ process.c 2009-10-26 16:08:15.000000000 +0300
|
||||||
@@ -74,20 +74,20 @@
|
@@ -101,10 +101,10 @@
|
||||||
/* do_seekable() strings */
|
/* do_seekable() strings */
|
||||||
# ifdef UNIX
|
# ifdef UNIX
|
||||||
static ZCONST char Far CannotFindZipfileDirMsg[] =
|
static ZCONST char Far CannotFindZipfileDirMsg[] =
|
||||||
@ -12,19 +12,5 @@
|
|||||||
- "%s: cannot find or open %s, %s.zip or %s.\n";
|
- "%s: cannot find or open %s, %s.zip or %s.\n";
|
||||||
+ "%s: cannot find or open %.512s, %.512s.zip or %.512s.\n";
|
+ "%s: cannot find or open %.512s, %.512s.zip or %.512s.\n";
|
||||||
# else /* !UNIX */
|
# 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[] =
|
static ZCONST char Far CannotFindZipfileDirMsg[] =
|
||||||
- "%s: cannot find zipfile directory in %s,\n\
|
"%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
|
|
||||||
|
@ -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 */
|
|
||||||
}
|
|
@ -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 */
|
|
||||||
|
|
||||||
/*
|
|
Loading…
Reference in New Issue
Block a user