diff options
author | dsainty <dsainty@pkgsrc.org> | 2006-08-28 13:56:22 +0000 |
---|---|---|
committer | dsainty <dsainty@pkgsrc.org> | 2006-08-28 13:56:22 +0000 |
commit | f6ab264f7d27a3b9f87a50aaaed28e90900097af (patch) | |
tree | de50250a59d77fc713d0b125038eaaf2edad65a4 /sysutils | |
parent | e141f363dc0a71c12b033736a2daabe2ac68fb28 (diff) | |
download | pkgsrc-f6ab264f7d27a3b9f87a50aaaed28e90900097af.tar.gz |
isoinfo extracts files at the painful rate of 1 sector at a time. This patch
speeds up file extraction significantly by using a much larger buffer.
Also avoid crashing under NetBSD by not making the assumption that
fclose(NULL) is legal.
Bump PKGREVISION to 4.
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/cdrtools/Makefile | 4 | ||||
-rw-r--r-- | sysutils/cdrtools/distinfo | 3 | ||||
-rw-r--r-- | sysutils/cdrtools/patches/patch-cj | 49 |
3 files changed, 53 insertions, 3 deletions
diff --git a/sysutils/cdrtools/Makefile b/sysutils/cdrtools/Makefile index 4367f524110..1aa66c46413 100644 --- a/sysutils/cdrtools/Makefile +++ b/sysutils/cdrtools/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.7 2006/05/27 10:55:52 drochner Exp $ +# $NetBSD: Makefile,v 1.8 2006/08/28 13:56:22 dsainty Exp $ DISTNAME= cdrtools-2.01 -PKGREVISION= 3 +PKGREVISION= 4 CATEGORIES= sysutils MASTER_SITES= ftp://ftp.berlios.de/pub/cdrecord/ EXTRACT_SUFX= .tar.bz2 diff --git a/sysutils/cdrtools/distinfo b/sysutils/cdrtools/distinfo index 4c5464d1aaa..0007da39f55 100644 --- a/sysutils/cdrtools/distinfo +++ b/sysutils/cdrtools/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.3 2006/05/27 10:55:52 drochner Exp $ +$NetBSD: distinfo,v 1.4 2006/08/28 13:56:22 dsainty Exp $ SHA1 (cdrtools-2.01.tar.bz2) = f94cfe51dd512d4e0b9106b986bde12d4f7967ce RMD160 (cdrtools-2.01.tar.bz2) = b34a8b81b21cc8ed1927f34e44130513d2ee0407 @@ -24,3 +24,4 @@ SHA1 (patch-cf) = 021b7979320dbc2fdd7a40e9cef0a3db6844d874 SHA1 (patch-cg) = 945db00ff13460dce1f9ce38e8ff29ab7cbd1f85 SHA1 (patch-ch) = 1060be9a0c7371ad52b23b22f3b5dcf09cb99f7f SHA1 (patch-ci) = 2b6aee7cd9acb06b7190f068e4510ace1d8715a3 +SHA1 (patch-cj) = 209b87149e6660637dc58b561a83f6db56c645d2 diff --git a/sysutils/cdrtools/patches/patch-cj b/sysutils/cdrtools/patches/patch-cj new file mode 100644 index 00000000000..514a19ab94f --- /dev/null +++ b/sysutils/cdrtools/patches/patch-cj @@ -0,0 +1,49 @@ +$NetBSD: patch-cj,v 1.1 2006/08/28 13:56:22 dsainty Exp $ + +isoinfo extracts files at the painful rate of 1 sector at a time. This patch +speeds up file extraction significantly by using a much larger buffer. + +Also avoid crashing under NetBSD by not making the assumption that +fclose(NULL) is legal. + +--- mkisofs/diag/isoinfo.c.orig 2005-05-16 02:21:05.000000000 +1200 ++++ mkisofs/diag/isoinfo.c 2006-07-15 18:33:06.000000000 +1200 +@@ -644,7 +644,7 @@ + struct iso_directory_record *idr; + { + int extent, len, tlen; +- unsigned char buff[2048]; ++ unsigned char buff[204800]; + + #if defined(__CYGWIN32__) || defined(__CYGWIN__) || defined(__EMX__) || defined(__DJGPP__) + setmode(fileno(stdout), O_BINARY); +@@ -654,16 +654,15 @@ + len = isonum_733((unsigned char *)idr->size); + + while (len > 0) { +-#ifdef USE_SCG +- readsecs(extent - sector_offset, buff, ISO_BLOCKS(sizeof (buff))); + tlen = (len > sizeof (buff) ? sizeof (buff) : len); ++#ifdef USE_SCG ++ readsecs(extent - sector_offset, buff, ISO_BLOCKS(tlen)); + #else + lseek(fileno(infile), ((off_t)(extent - sector_offset)) << 11, SEEK_SET); +- tlen = (len > sizeof (buff) ? sizeof (buff) : len); + read(fileno(infile), buff, tlen); + #endif + len -= tlen; +- extent++; ++ extent += ISO_BLOCKS(tlen); + write(STDOUT_FILENO, buff, tlen); + } + } +@@ -1252,7 +1252,8 @@ + td = td->next; + } + +- fclose(infile); ++ if (infile != NULL) ++ fclose(infile); + return (0); + } + |