pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/audio/cdparanoia Add patch for FreeBSD-5.x, from Peter...
details: https://anonhg.NetBSD.org/pkgsrc/rev/29a92ecad286
branches: trunk
changeset: 521109:29a92ecad286
user: wiz <wiz%pkgsrc.org@localhost>
date: Sun Nov 05 13:45:37 2006 +0000
description:
Add patch for FreeBSD-5.x, from Peter Schuller in PR 33719.
Untested on FreeBSD, still compiles on NetBSD.
diffstat:
audio/cdparanoia/distinfo | 4 ++--
audio/cdparanoia/patches/patch-ce | 30 ++++++++++++++++++++++--------
2 files changed, 24 insertions(+), 10 deletions(-)
diffs (114 lines):
diff -r 4c833376673c -r 29a92ecad286 audio/cdparanoia/distinfo
--- a/audio/cdparanoia/distinfo Sun Nov 05 13:11:39 2006 +0000
+++ b/audio/cdparanoia/distinfo Sun Nov 05 13:45:37 2006 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.17 2006/11/03 12:45:21 joerg Exp $
+$NetBSD: distinfo,v 1.18 2006/11/05 13:45:37 wiz Exp $
SHA1 (cdparanoia-III-alpha9.8.src.tgz) = 04cc33a7d22d6255f6239e3e74195506b3bdde06
RMD160 (cdparanoia-III-alpha9.8.src.tgz) = d9225165f83b5386c58db263d6918a7006df1481
@@ -13,7 +13,7 @@
SHA1 (patch-cb) = c19ee04017b836842bb0f2d2c77e8f35aad0f9bb
SHA1 (patch-cc) = adea4fd9682c0543e5749c6f3fe73697d8663c6c
SHA1 (patch-cd) = 81d31fb55db0f982959395cdecc3da826bf23bfb
-SHA1 (patch-ce) = 282e3169cc26ab11924c66a312d77d7c1f59f242
+SHA1 (patch-ce) = efbdd8b7f8908c9c4916f2356f9ff14658c27c15
SHA1 (patch-cf) = 650de2a80235e42acd5670a06bd1e5bcf346100d
SHA1 (patch-cg) = b9786ee81dcb7bd2f6572a20f424dd5291a8720d
SHA1 (patch-ch) = 8d16dd8c80e8f1ee35ccc299ba927d685adde01c
diff -r 4c833376673c -r 29a92ecad286 audio/cdparanoia/patches/patch-ce
--- a/audio/cdparanoia/patches/patch-ce Sun Nov 05 13:11:39 2006 +0000
+++ b/audio/cdparanoia/patches/patch-ce Sun Nov 05 13:45:37 2006 +0000
@@ -1,6 +1,6 @@
-$NetBSD: patch-ce,v 1.3 2006/03/07 06:29:03 joerg Exp $
+$NetBSD: patch-ce,v 1.4 2006/11/05 13:45:37 wiz Exp $
---- interface/cooked_interface.c.orig 2000-04-20 08:41:04.000000000 +1000
+--- interface/cooked_interface.c.orig Thu Apr 20 00:41:04 2000
+++ interface/cooked_interface.c
@@ -10,9 +10,11 @@
#include "common_interface.h"
@@ -84,7 +84,7 @@
int retry_count,err;
struct cdrom_read_audio arg;
char *buffer=(char *)p;
-@@ -127,7 +174,133 @@ static long cooked_read (cdrom_drive *d,
+@@ -127,7 +174,147 @@ static long cooked_read (cdrom_drive *d,
} while (err);
return(sectors);
@@ -92,7 +92,7 @@
+#ifdef __NetBSD__
+ errx(1, "cooked_read: not implemented");
+#endif
-+}
+ }
+#elif defined(__FreeBSD__) || defined(__DragonFly__)
+static int
+cooked_readtoc(cdrom_drive *d)
@@ -162,6 +162,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)
@@ -170,10 +174,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 (;;) {
++#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;
+
@@ -212,13 +226,13 @@
+ }
+
+ return sectors;
- }
++}
+#endif
+
/* hook */
static int Dummy (cdrom_drive *d,int Switch){
-@@ -191,8 +364,11 @@ static void check_exceptions(cdrom_drive
+@@ -191,8 +378,11 @@ static void check_exceptions(cdrom_drive
/* set function pointers to use the ioctl routines */
int cooked_init_drive (cdrom_drive *d){
@@ -231,7 +245,7 @@
switch(d->drive_type){
case MATSUSHITA_CDROM_MAJOR: /* sbpcd 1 */
case MATSUSHITA_CDROM2_MAJOR: /* sbpcd 2 */
-@@ -243,6 +419,9 @@ int cooked_init_drive (cdrom_drive *d){
+@@ -243,6 +433,9 @@ int cooked_init_drive (cdrom_drive *d){
default:
d->nsectors=40;
}
@@ -241,7 +255,7 @@
d->enable_cdda = Dummy;
d->read_audio = cooked_read;
d->set_speed = cooked_setspeed;
-@@ -255,5 +434,6 @@ int cooked_init_drive (cdrom_drive *d){
+@@ -255,5 +448,6 @@ int cooked_init_drive (cdrom_drive *d){
if((ret=verify_read_command(d)))return(ret);
d->error_retry=1;
return(0);
Home |
Main Index |
Thread Index |
Old Index