diff options
author | dillo <dillo> | 2002-08-21 16:18:51 +0000 |
---|---|---|
committer | dillo <dillo> | 2002-08-21 16:18:51 +0000 |
commit | ef6a5a4ab0d7ab9b364382f0c6e57d255769d35a (patch) | |
tree | 21e7354fced8e27aaf27bb9f34d79e044957a877 /archivers | |
parent | 20f8491e53425c9c49f26fa73a5932feafff4827 (diff) | |
download | pkgsrc-ef6a5a4ab0d7ab9b364382f0c6e57d255769d35a.tar.gz |
upgrade to 0.6
changes since 0.5:
* pkgsrc fixes for 0.5 integrated
* support for the Quantum compression method reverse-engineered by
Matthew Russotto
* cabextract now exhaustively searches your files for cabinets.
If there's more than one cabinet in the same file, cabextract will
find those too.
* Spanning cabinets sets contain both a 'next' and 'previous' cabinet
name. cabextract now searches backwards through the cabinet chain
to find the start of a cabinet set, before searching in the forwards
direction as usual.
Diffstat (limited to 'archivers')
-rw-r--r-- | archivers/cabextract/Makefile | 4 | ||||
-rw-r--r-- | archivers/cabextract/distinfo | 8 | ||||
-rw-r--r-- | archivers/cabextract/patches/patch-aa | 127 |
3 files changed, 10 insertions, 129 deletions
diff --git a/archivers/cabextract/Makefile b/archivers/cabextract/Makefile index 314be84660e..81009347415 100644 --- a/archivers/cabextract/Makefile +++ b/archivers/cabextract/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.1.1.1 2001/10/18 09:56:13 agc Exp $ +# $NetBSD: Makefile,v 1.2 2002/08/21 16:18:51 dillo Exp $ # -DISTNAME= cabextract-0.5 +DISTNAME= cabextract-0.6 CATEGORIES= archivers MASTER_SITES= http://www.kyz.uklinux.net/downloads/ diff --git a/archivers/cabextract/distinfo b/archivers/cabextract/distinfo index f6e5d60d4f7..12f22303ba8 100644 --- a/archivers/cabextract/distinfo +++ b/archivers/cabextract/distinfo @@ -1,5 +1,5 @@ -$NetBSD: distinfo,v 1.2 2002/05/10 10:01:31 itohy Exp $ +$NetBSD: distinfo,v 1.3 2002/08/21 16:18:51 dillo Exp $ -SHA1 (cabextract-0.5.tar.gz) = 0ae65a6c86d57f13a136986ba3df8aab8d2cfcf9 -Size (cabextract-0.5.tar.gz) = 76097 bytes -SHA1 (patch-aa) = 57ee22a2e3e15e6fc740e76f8bbcf240d183d932 +SHA1 (cabextract-0.6.tar.gz) = e788ad16b93c986f5db792288137bf98de11dd73 +Size (cabextract-0.6.tar.gz) = 92469 bytes +SHA1 (patch-aa) = 26a24f981caedf47d565223d705c1a7f7deaadbe diff --git a/archivers/cabextract/patches/patch-aa b/archivers/cabextract/patches/patch-aa index d4c03a8edbc..db3d48ac653 100644 --- a/archivers/cabextract/patches/patch-aa +++ b/archivers/cabextract/patches/patch-aa @@ -1,8 +1,8 @@ -$NetBSD: patch-aa,v 1.1 2002/05/10 10:01:10 itohy Exp $ +$NetBSD: patch-aa,v 1.2 2002/08/21 16:18:52 dillo Exp $ ---- cabextract.c.orig Mon Aug 20 17:06:11 2001 -+++ cabextract.c Fri May 10 10:19:42 2002 -@@ -50,6 +50,7 @@ +--- cabextract.c.orig Mon Aug 12 03:39:05 2002 ++++ cabextract.c +@@ -51,6 +51,7 @@ #ifdef HAVE_CONFIG_H #include <config.h> @@ -10,122 +10,3 @@ $NetBSD: patch-aa,v 1.1 2002/05/10 10:01:10 itohy Exp $ #include <stdio.h> /* everyone has this! */ #ifdef HAVE_SYS_TYPES_H -@@ -1434,14 +1435,25 @@ - } - - rundest = window + window_posn; -- runsrc = rundest - match_offset; -- window_posn += match_length; - this_run -= match_length; - - /* copy any wrapped around source data */ -- while ((runsrc < window) && (match_length-- > 0)) { -- *rundest++ = *(runsrc + window_size); runsrc++; -+ if (window_posn >= match_offset) { -+ /* no wrap */ -+ runsrc = rundest - match_offset; -+ } else { -+ int copy_length; -+ runsrc = rundest + (window_size - match_offset); -+ copy_length = match_offset - window_posn; -+ if (copy_length < match_length) { -+ match_length -= copy_length; -+ window_posn += copy_length; -+ while (copy_length-- > 0) *rundest++ = *runsrc++; -+ runsrc = window; -+ } - } -+ window_posn += match_length; -+ - /* copy match data - no worries about destination wraps */ - while (match_length-- > 0) *rundest++ = *runsrc++; - -@@ -1514,14 +1526,25 @@ - } - - rundest = window + window_posn; -- runsrc = rundest - match_offset; -- window_posn += match_length; - this_run -= match_length; - - /* copy any wrapped around source data */ -- while ((runsrc < window) && (match_length-- > 0)) { -- *rundest++ = *(runsrc + window_size); runsrc++; -+ if (window_posn >= match_offset) { -+ /* no wrap */ -+ runsrc = rundest - match_offset; -+ } else { -+ int copy_length; -+ runsrc = rundest + (window_size - match_offset); -+ copy_length = match_offset - window_posn; -+ if (copy_length < match_length) { -+ match_length -= copy_length; -+ window_posn += copy_length; -+ while (copy_length-- > 0) *rundest++ = *runsrc++; -+ runsrc = window; -+ } - } -+ window_posn += match_length; -+ - /* copy match data - no worries about destination wraps */ - while (match_length-- > 0) *rundest++ = *runsrc++; - -@@ -1635,7 +1658,7 @@ - d = &name[strlen(name)]; - do { - c = *s++; -- *d++ = (c=='/') ? '\\' : ((c=='\\') ? '/' : (lower ? tolower(c) : c)); -+ *d++ = (c=='/') ? '\\' : ((c=='\\') ? '/' : (lower ? tolower((unsigned char) c) : c)); - } while (c); - - /* create directories if needed, attempt to write file */ -@@ -1655,14 +1678,17 @@ - void file_close(struct file *fi) { - struct utimbuf utb; - struct tm time; -+ mode_t m; - - if (fi->fh) fclose(fi->fh); - fi->fh = NULL; - -+ m = umask(0); -+ (void) umask(m); - chmod(fi->filename, -- (mode_t) 0444 -+ ((mode_t) 0444 - | (fi->attribs & cffile_A_EXEC ? 0111 : 0) -- | (fi->attribs & cffile_A_RDONLY ? 0 : 0222) -+ | (fi->attribs & cffile_A_RDONLY ? 0 : 0222)) & ~m - ); - - -@@ -1670,8 +1696,9 @@ - time.tm_min = (fi->time >> 5) & 0x3f; - time.tm_hour = (fi->time >> 11); - time.tm_mday = fi->date & 0x1f; -- time.tm_mon = (fi->date >> 5) & 0xf; -+ time.tm_mon = ((fi->date >> 5) & 0xf) - 1; - time.tm_year = (fi->date >> 9) + 80; -+ time.tm_isdst = -1; - #ifdef HAVE_UTIME - utb.actime = utb.modtime = mktime(&time); - utime(fi->filename, &utb); -@@ -1726,7 +1753,7 @@ - char *p, c; - p = strrchr(name, '/'); /* only modify the filename, not the path */ - if (!p) p = name; -- while ((c = *p)) *p++ = (char) tolower((int) c); -+ while ((c = *p)) *p++ = (char) tolower((unsigned char) c); - fh = fopen(name, "rb"); - if (!fh) { perror(name); return 0; } - } -@@ -1818,7 +1845,8 @@ - * file, and the 'file offset' header isn't beyond the cabinet - * length, this is a reasonable cabinet header. - */ -- if ((len+offset+i) < cab->filelen && foff < len) { -+ /* XXX 20 for self-extracting cabinet */ -+ if ((len+offset+i) <= cab->filelen+20 && foff < len) { - cabinet_seek(cab, offset+i-20); return 1; - } - } |