Index: Makefile =================================================================== RCS file: /home/ncvs/ports/audio/cdparanoia/Makefile,v retrieving revision 1.8 diff -u -r1.8 Makefile --- Makefile 14 Jul 2003 02:52:55 -0000 1.8 +++ Makefile 8 Nov 2003 01:26:44 -0000 @@ -7,7 +7,7 @@ PORTNAME= cdparanoia PORTVERSION= 3.9.8 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= audio sysutils MASTER_SITES= http://www.xiph.org/paranoia/download/ DISTNAME= ${PORTNAME}-${PORTVERSION:C/^3\./III-alpha/} Index: files/patch-interface-cooked_interface.c =================================================================== RCS file: /home/ncvs/ports/audio/cdparanoia/files/patch-interface-cooked_interface.c,v retrieving revision 1.2 diff -u -r1.2 patch-interface-cooked_interface.c --- files/patch-interface-cooked_interface.c 11 Jan 2003 09:15:00 -0000 1.2 +++ files/patch-interface-cooked_interface.c 8 Nov 2003 01:17:45 -0000 @@ -1,11 +1,5 @@ -Index: interface/cooked_interface.c -=================================================================== -RCS file: /home/cvs/cdparanoia/interface/cooked_interface.c,v -retrieving revision 1.1.1.1 -retrieving revision 1.8 -diff -u -r1.1.1.1 -r1.8 ---- interface/cooked_interface.c 2003/01/05 09:46:26 1.1.1.1 -+++ interface/cooked_interface.c 2003/01/11 08:58:45 1.8 +--- interface/cooked_interface.c.orig Wed Apr 19 15:41:04 2000 ++++ interface/cooked_interface.c Fri Nov 7 17:16:03 2003 @@ -1,6 +1,8 @@ /****************************************************************** * CopyPolicy: GNU Public License 2 applies @@ -23,7 +17,7 @@ static int cooked_readtoc (cdrom_drive *d){ int i; int tracks; -@@ -129,6 +132,128 @@ +@@ -129,6 +132,142 @@ return(sectors); } @@ -96,6 +90,10 @@ +cooked_read(cdrom_drive *d, void *p, long begin, long sectors) +{ + int retry_count = 0; ++/* CDIOCREADAUDIO has been removed in FreeBSD 5.1-CURRENT */ ++#if __FreeBSD_version >= 501106 ++ int bsize = CD_FRAMESIZE_RAW; ++#else + struct ioc_read_audio arg; + + if (sectors > d->nsectors) @@ -104,10 +102,20 @@ + arg.address_format = CD_LBA_FORMAT; + arg.address.lba = begin; + arg.buffer = p; ++#endif + ++#if __FreeBSD_version >= 501106 ++ if (ioctl(d->ioctl_fd, CDRIOCSETBLOCKSIZE, &bsize) == -1) ++ return -7; ++#endif + for (;;) { ++/* CDIOCREADAUDIO has been removed in FreeBSD 5.1-CURRENT */ ++#if __FreeBSD_version >= 501106 ++ if (pread(d->ioctl_fd, p, sectors*bsize, begin*bsize) != sectors*bsize) { ++#else + arg.nframes = sectors; + if (ioctl(d->ioctl_fd, CDIOCREADAUDIO, &arg) == -1) { ++#endif + if (!d->error_retry) + return -7; + @@ -152,7 +160,7 @@ /* hook */ static int Dummy (cdrom_drive *d,int Switch){ return(0); -@@ -193,6 +318,7 @@ +@@ -193,6 +332,7 @@ int cooked_init_drive (cdrom_drive *d){ int ret; @@ -160,7 +168,7 @@ switch(d->drive_type){ case MATSUSHITA_CDROM_MAJOR: /* sbpcd 1 */ case MATSUSHITA_CDROM2_MAJOR: /* sbpcd 2 */ -@@ -243,6 +369,9 @@ +@@ -243,6 +383,9 @@ default: d->nsectors=40; } Index: files/patch-interface-scan_devices.c =================================================================== RCS file: /home/ncvs/ports/audio/cdparanoia/files/patch-interface-scan_devices.c,v retrieving revision 1.1 diff -u -r1.1 patch-interface-scan_devices.c --- files/patch-interface-scan_devices.c 10 Jan 2003 01:06:33 -0000 1.1 +++ files/patch-interface-scan_devices.c 8 Nov 2003 01:47:49 -0000 @@ -1,11 +1,5 @@ -Index: interface/scan_devices.c -=================================================================== -RCS file: /home/cvs/cdparanoia/interface/scan_devices.c,v -retrieving revision 1.1.1.1 -retrieving revision 1.10 -diff -u -r1.1.1.1 -r1.10 ---- interface/scan_devices.c 2003/01/05 09:46:26 1.1.1.1 -+++ interface/scan_devices.c 2003/01/07 00:49:01 1.10 +--- interface/scan_devices.c.orig Sun Mar 25 21:44:01 2001 ++++ interface/scan_devices.c Fri Nov 7 17:47:38 2003 @@ -1,6 +1,8 @@ /****************************************************************** * CopyPolicy: GNU Public License 2 applies @@ -24,12 +18,16 @@ static char *scsi_cdrom_prefixes[]={ "/dev/scd", "/dev/sr", -@@ -49,6 +53,13 @@ +@@ -49,6 +53,17 @@ "/dev/cm206cd", "/dev/gscd", "/dev/optcd",NULL}; +#elif defined(__FreeBSD__) +static char *cdrom_devices[] = { ++ "/dev/cd?", ++ "/dev/acd?", ++ "/dev/wcd?", ++ "/dev/mcd?", + "/dev/cd?c", + "/dev/acd?c", + "/dev/wcd?c", @@ -38,7 +36,7 @@ /* Functions here look for a cdrom drive; full init of a drive type happens in interface.c */ -@@ -75,10 +86,12 @@ +@@ -75,10 +90,12 @@ if((d=cdda_identify(buffer,messagedest,messages))) return(d); idmessage(messagedest,messages,"",NULL); @@ -51,7 +49,7 @@ } }else{ /* Name. Go for it. */ -@@ -117,8 +130,14 @@ +@@ -117,8 +134,14 @@ } #endif @@ -66,7 +64,7 @@ #ifdef CDDA_TEST if(!d)d=cdda_identify_test(device,messagedest,messages); -@@ -143,6 +162,7 @@ +@@ -143,6 +166,7 @@ } @@ -74,7 +72,7 @@ cdrom_drive *cdda_identify_cooked(const char *dev, int messagedest, char **messages){ -@@ -275,6 +295,60 @@ +@@ -275,6 +299,60 @@ return(d); } @@ -135,7 +133,7 @@ struct sg_id { long l1; /* target | lun << 8 | channel << 16 | low_ino << 24 */ long l2; /* Unique id */ -@@ -390,6 +464,7 @@ +@@ -390,6 +468,7 @@ if(dev!=-1)close(dev); return(NULL); } @@ -143,7 +141,7 @@ void strscat(char *a,char *b,int n){ int i; -@@ -401,6 +476,7 @@ +@@ -401,6 +480,7 @@ strcat(a," "); } @@ -151,7 +149,7 @@ /* At this point, we're going to punt compatability before SG2, and allow only SG2 and SG3 */ static int verify_SG_version(cdrom_drive *d,int messagedest, -@@ -653,6 +729,88 @@ +@@ -653,6 +733,88 @@ if(g_fd!=-1)close(g_fd); return(NULL); }