summaryrefslogtreecommitdiff
path: root/audio/cdparanoia
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2006-11-05 13:45:37 +0000
committerwiz <wiz@pkgsrc.org>2006-11-05 13:45:37 +0000
commit68e3114771e4ed4366efdd996e0aa997e10dc52b (patch)
treec9717ddffef135dfcfafeaf8473f8db6a2eb7d7c /audio/cdparanoia
parent9fdc7167a8abdaa87b9d05ec9c3e54eaa81b70c6 (diff)
downloadpkgsrc-68e3114771e4ed4366efdd996e0aa997e10dc52b.tar.gz
Add patch for FreeBSD-5.x, from Peter Schuller in PR 33719.
Untested on FreeBSD, still compiles on NetBSD.
Diffstat (limited to 'audio/cdparanoia')
-rw-r--r--audio/cdparanoia/distinfo4
-rw-r--r--audio/cdparanoia/patches/patch-ce30
2 files changed, 24 insertions, 10 deletions
diff --git a/audio/cdparanoia/distinfo b/audio/cdparanoia/distinfo
index bd687346138..05a39fe211f 100644
--- a/audio/cdparanoia/distinfo
+++ b/audio/cdparanoia/distinfo
@@ -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-ca) = 9c35254c09a96b622cac44198443f66f7bc0e428
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 --git a/audio/cdparanoia/patches/patch-ce b/audio/cdparanoia/patches/patch-ce
index 54099737410..ae5820d2f17 100644
--- a/audio/cdparanoia/patches/patch-ce
+++ b/audio/cdparanoia/patches/patch-ce
@@ -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 @@ $NetBSD: patch-ce,v 1.3 2006/03/07 06:29:03 joerg Exp $
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 @@ $NetBSD: patch-ce,v 1.3 2006/03/07 06:29:03 joerg Exp $
+#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 @@ $NetBSD: patch-ce,v 1.3 2006/03/07 06:29:03 joerg Exp $
+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 @@ $NetBSD: patch-ce,v 1.3 2006/03/07 06:29:03 joerg Exp $
+ 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 @@ $NetBSD: patch-ce,v 1.3 2006/03/07 06:29:03 joerg Exp $
+ }
+
+ 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 @@ $NetBSD: patch-ce,v 1.3 2006/03/07 06:29:03 joerg Exp $
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 @@ $NetBSD: patch-ce,v 1.3 2006/03/07 06:29:03 joerg Exp $
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);