Update to 2.01a36 which replaces the workaround of the FreeBSD port for

non page aligned transfers in libparanoia with a better one that adaptes
to the pagesize.
For other changes since 2.01a34 see:
ftp://ftp.berlios.de/pub/cdrecord/alpha/AN-2.01a35
and
ftp://ftp.berlios.de/pub/cdrecord/alpha/AN-2.01a36

Approved by:	netchild
This commit is contained in:
Marius Strobl 2004-08-11 20:38:53 +00:00
parent 513d472f4b
commit e0b61cd0ff
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=115961
5 changed files with 14 additions and 59 deletions

View file

@ -6,7 +6,7 @@
#
PORTNAME= cdrtools
PORTVERSION= 2.01a34
PORTVERSION= 2.01a36
CATEGORIES= sysutils audio
MASTER_SITES= ftp://ftp.berlios.de/pub/cdrecord/alpha/ \
ftp://ftp.cs.tu-berlin.de/pub/misc/cdrecord/alpha/

View file

@ -1,2 +1,2 @@
MD5 (cdrtools-2.01a34.tar.bz2) = e6591871e0c6e91ffa0eb23158189743
SIZE (cdrtools-2.01a34.tar.bz2) = 1396922
MD5 (cdrtools-2.01a36.tar.bz2) = bae98192bf486c74b793bcff5a8c5d57
SIZE (cdrtools-2.01a36.tar.bz2) = 1405467

View file

@ -1,12 +0,0 @@
--- RULES/rules.cnf.orig Sun Jan 27 16:11:31 2002
+++ RULES/rules.cnf Sun Jun 1 18:58:37 2003
@@ -33,8 +33,7 @@
#
# Hack until the <mach>-<os>-*cc.rul files are updated
#
-_HCCCOM= $(OARCH:%-gcc=gcc)
-HCCCOM= $(_HCCCOM:%-cc=cc)
+HCCCOM= $(C_ARCH)
_CCCOM= $(_UNIQ)$(CCCOM)
__CCCOM= $(_CCCOM:$(_UNIQ)=$(HCCCOM))

View file

@ -17,47 +17,3 @@
if (!S_ISCHR(statstruct->st_mode)) {
fprintf(stderr, "%s is not a char device\n",pdev_name);
exit(SYNTAX_ERROR);
@@ -555,8 +563,25 @@
}
dontneedgroup();
dontneedroot();
+#if defined (__FreeBSD__)
+ /*
+ * i_read_c_block(), used by paranoia_read_limited() for reading the
+ * data from the CD, doesn't use a page aligned buffer as required by
+ * FreeBSD for SCSI transfers (well, most OS do). Probably this should
+ * be dealt with in cdda_read() (called by i_read_c_block() with the
+ * unaligned buffer and in turn calls ReadCdRom() to do the actual read)
+ * but it seems like overkill to add yet another buffer (would make it
+ * 3 or so from do_read() to ReadCdRom() alone). Instead, limit the
+ * transfer size via the maximum for the sectors to read at once to a
+ * value that lets the data fit into a page (for FreeBSD the code below
+ * would set the maximum sectors to 27).
+ */
+ if (global.nsectors > 26)
+ global.nsectors = 26;
+#else
if (global.nsectors > (unsigned) scg_bufsize(scgp, 3*1024*1024)/CD_FRAMESIZE_RAW)
global.nsectors = scg_bufsize(scgp, 3*1024*1024)/CD_FRAMESIZE_RAW;
+#endif
if (global.overlap >= global.nsectors)
global.overlap = global.nsectors-1;
@@ -593,9 +618,6 @@
exit(RACE_ERROR);
}
#endif
- if (scgp != NULL && global.scsi_verbose) {
- scgp->verbose = global.scsi_verbose;
- }
}
return retval;
}
@@ -888,6 +910,7 @@
FatalError("No memory for SCSI structure.\n");
}
scgp->silent = 0;
+ scgp->verbose = global.scsi_verbose;
SetupCookedIoctl( global.dev_name );
#else
FatalError("Sorry, there is no known method to access the device.\n");

View file

@ -0,0 +1,11 @@
--- libparanoia/paranoia.c.orig Sun Aug 8 13:47:31 2004
+++ libparanoia/paranoia.c Mon Aug 9 17:19:43 2004
@@ -1481,7 +1481,7 @@
long sofar;
long dynoverlap = (p->dynoverlap + CD_FRAMEWORDS - 1) / CD_FRAMEWORDS;
long anyflag = 0;
- int reduce = 0;
+static int reduce = 0;
static int pagesize = -1;
#define valign(x, a) (((char *)(x)) + ((a) - 1 - ((((UIntptr_t)(x))-1)%(a))))