summaryrefslogtreecommitdiff
path: root/sysutils/cdrtools
diff options
context:
space:
mode:
authordsainty <dsainty>2006-08-28 13:56:22 +0000
committerdsainty <dsainty>2006-08-28 13:56:22 +0000
commit962122a465acab8b3c21dd6f82aa8c473c0acab3 (patch)
treede50250a59d77fc713d0b125038eaaf2edad65a4 /sysutils/cdrtools
parent948183543ec91d3cfc386993042cce63174eaaa6 (diff)
downloadpkgsrc-962122a465acab8b3c21dd6f82aa8c473c0acab3.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/cdrtools')
-rw-r--r--sysutils/cdrtools/Makefile4
-rw-r--r--sysutils/cdrtools/distinfo3
-rw-r--r--sysutils/cdrtools/patches/patch-cj49
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);
+ }
+