diff options
author | wiz <wiz@pkgsrc.org> | 2005-07-13 09:07:10 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2005-07-13 09:07:10 +0000 |
commit | 5797c3086ba1e16dfdced258547d431ba21533b4 (patch) | |
tree | 3ca59b33fb87e844f32f8737b30779f733a9c988 /audio/cdparanoia | |
parent | 8fd2d05eec7d2d01f82c5572f1072016b3e920c0 (diff) | |
download | pkgsrc-5797c3086ba1e16dfdced258547d431ba21533b4.tar.gz |
Add DragonFlyBSD support, from Joerg Sonnenberger in private mail.
Diffstat (limited to 'audio/cdparanoia')
-rw-r--r-- | audio/cdparanoia/distinfo | 10 | ||||
-rw-r--r-- | audio/cdparanoia/patches/patch-da | 31 | ||||
-rw-r--r-- | audio/cdparanoia/patches/patch-db | 22 | ||||
-rw-r--r-- | audio/cdparanoia/patches/patch-dc | 31 | ||||
-rw-r--r-- | audio/cdparanoia/patches/patch-dd | 13 | ||||
-rw-r--r-- | audio/cdparanoia/patches/patch-de | 31 | ||||
-rw-r--r-- | audio/cdparanoia/patches/patch-df | 58 | ||||
-rw-r--r-- | audio/cdparanoia/patches/patch-dg | 103 | ||||
-rw-r--r-- | audio/cdparanoia/patches/patch-dh | 13 |
9 files changed, 311 insertions, 1 deletions
diff --git a/audio/cdparanoia/distinfo b/audio/cdparanoia/distinfo index 9954952ab10..14919eeb8b3 100644 --- a/audio/cdparanoia/distinfo +++ b/audio/cdparanoia/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.10 2005/02/23 20:39:43 agc Exp $ +$NetBSD: distinfo,v 1.11 2005/07/13 09:07:10 wiz Exp $ SHA1 (cdparanoia-III-alpha9.8.src.tgz) = 04cc33a7d22d6255f6239e3e74195506b3bdde06 RMD160 (cdparanoia-III-alpha9.8.src.tgz) = d9225165f83b5386c58db263d6918a7006df1481 @@ -18,3 +18,11 @@ SHA1 (patch-cf) = dd96eddefca6a6cd5794a483efa94005fdf8b9f8 SHA1 (patch-cg) = d57b8019fd14baf0701a9a9f824a4f4bd64ab3ad SHA1 (patch-ch) = 73c38418cd7ab5fa5a072abfc78479fdd1d87787 SHA1 (patch-ci) = cff3eaff31ea324d7bde5d0d840df57453085bec +SHA1 (patch-da) = 41636b882727e101980915a59382f2dc07ce2250 +SHA1 (patch-db) = ae806ddbc2fc8cfc6c2a911ea187715991ae2ea3 +SHA1 (patch-dc) = f1538a89f93fad029f2285370f74fa6899568452 +SHA1 (patch-dd) = 227a9092cf4896ce3f4fe0aa19460f4769bec033 +SHA1 (patch-de) = 7ef3e0a2286ee8a35794667b4123235382afe7a0 +SHA1 (patch-df) = 9312bf37493cfd3a1d67c94f495089f832514df3 +SHA1 (patch-dg) = 1dd22bf1b3525a43fa029e11e807088a877f236e +SHA1 (patch-dh) = 979db75fc97e3403eca01f524bfad14e22f6f6dc diff --git a/audio/cdparanoia/patches/patch-da b/audio/cdparanoia/patches/patch-da new file mode 100644 index 00000000000..f1c389c7967 --- /dev/null +++ b/audio/cdparanoia/patches/patch-da @@ -0,0 +1,31 @@ +$NetBSD: patch-da,v 1.1 2005/07/13 09:07:10 wiz Exp $ + +--- interface/cdda_interface.h.orig 2005-05-31 16:03:04.000000000 +0200 ++++ interface/cdda_interface.h +@@ -21,7 +21,7 @@ + #include <sys/types.h> + #include <signal.h> + +-#ifdef __FreeBSD__ ++#if defined(__FreeBSD__) || defined(__DragonFly__) + #include <stdio.h> + #include <camlib.h> + #endif +@@ -51,7 +51,7 @@ typedef struct cdrom_drive{ + + int opened; /* This struct may just represent a candidate for opening */ + +-#ifndef __FreeBSD__ ++#if !defined(__FreeBSD__) && !defined(__DragonFly__) + char *cdda_device_name; + char *ioctl_device_name; + +@@ -94,7 +94,7 @@ typedef struct cdrom_drive{ + int is_mmc; + + /* SCSI command buffer and offset pointers */ +-#ifndef __FreeBSD__ ++#if !defined(__FreeBSD__) && !defined(__DragonFly__) + unsigned char *sg; + unsigned char *sg_buffer; + unsigned char inqbytes[4]; diff --git a/audio/cdparanoia/patches/patch-db b/audio/cdparanoia/patches/patch-db new file mode 100644 index 00000000000..9440741077f --- /dev/null +++ b/audio/cdparanoia/patches/patch-db @@ -0,0 +1,22 @@ +$NetBSD: patch-db,v 1.1 2005/07/13 09:07:10 wiz Exp $ + +--- interface/common_interface.c.orig 2005-05-31 16:03:00.000000000 +0200 ++++ interface/common_interface.c +@@ -23,7 +23,7 @@ int ioctl_ping_cdrom(int fd){ + struct cdrom_volctrl volctl; + if (ioctl(fd, CDROMVOLREAD, &volctl)) + return(1); /* failure */ +-#elif defined(__FreeBSD__) || defined(__NetBSD__) ++#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__) + struct ioc_vol volctl; + if (ioctl(fd, CDIOCGETVOL, &volctl)) + return(1); /* failure */ +@@ -220,7 +220,7 @@ int FixupTOC(cdrom_drive *d,int tracks){ + /* For a scsi device, the ioctl must go to the specialized SCSI + CDROM device, not the generic device. */ + +-#ifndef __FreeBSD__ ++#if !defined(__FreeBSD__) && !defined(__DragonFly__) + if (d->ioctl_fd != -1) { + #ifdef __linux__ + int result; diff --git a/audio/cdparanoia/patches/patch-dc b/audio/cdparanoia/patches/patch-dc new file mode 100644 index 00000000000..e3e27f4a9e4 --- /dev/null +++ b/audio/cdparanoia/patches/patch-dc @@ -0,0 +1,31 @@ +$NetBSD: patch-dc,v 1.1 2005/07/13 09:07:10 wiz Exp $ + +--- interface/cooked_interface.c.orig 2005-05-31 16:02:58.000000000 +0200 ++++ interface/cooked_interface.c +@@ -10,7 +10,7 @@ + #include "common_interface.h" + #include "utils.h" + +-#ifndef __FreeBSD__ ++#if !defined(__FreeBSD__) && !defined(__DragonFly__) + static int cooked_readtoc (cdrom_drive *d){ + int i; + int tracks; +@@ -179,7 +179,7 @@ static long cooked_read (cdrom_drive *d, + errx(1, "cooked_read: not implemented"); + #endif + } +-#elif defined(__FreeBSD__) ++#elif defined(__FreeBSD__) || defined(__DragonFly__) + static int + cooked_readtoc(cdrom_drive *d) + { +@@ -419,7 +419,7 @@ int cooked_init_drive (cdrom_drive *d){ + default: + d->nsectors=40; + } +-#elif defined(__FreeBSD__) ++#elif defined(__FreeBSD__) || defined(__DragonFly__) + d->nsectors = 26; /* FreeBSD only supports 64K I/O transfer size */ + #endif + d->enable_cdda = Dummy; diff --git a/audio/cdparanoia/patches/patch-dd b/audio/cdparanoia/patches/patch-dd new file mode 100644 index 00000000000..c2b05189eff --- /dev/null +++ b/audio/cdparanoia/patches/patch-dd @@ -0,0 +1,13 @@ +$NetBSD: patch-dd,v 1.1 2005/07/13 09:07:10 wiz Exp $ + +--- interface/interface.c.orig 2005-05-31 16:02:55.000000000 +0200 ++++ interface/interface.c +@@ -29,7 +29,7 @@ int cdda_close(cdrom_drive *d){ + d->enable_cdda(d,0); + + _clean_messages(d); +-#ifndef __FreeBSD__ ++#if !defined(__FreeBSD__) && !defined(__DragonFly__) + if(d->cdda_device_name)free(d->cdda_device_name); + if(d->ioctl_device_name)free(d->ioctl_device_name); + if(d->drive_model)free(d->drive_model); diff --git a/audio/cdparanoia/patches/patch-de b/audio/cdparanoia/patches/patch-de new file mode 100644 index 00000000000..1957b0fddcc --- /dev/null +++ b/audio/cdparanoia/patches/patch-de @@ -0,0 +1,31 @@ +$NetBSD: patch-de,v 1.1 2005/07/13 09:07:10 wiz Exp $ + +--- interface/low_interface.h.orig 2005-05-31 16:02:53.000000000 +0200 ++++ interface/low_interface.h +@@ -49,7 +49,7 @@ + #include <linux/cdrom.h> + #include <linux/major.h> + +-#elif defined(__FreeBSD__) ++#elif defined(__FreeBSD__) || defined(__DragonFly__) + + #include <sys/cdio.h> + #include <sys/cdrio.h> +@@ -70,7 +70,7 @@ + #define MIN_BIG_BUFF_SIZE 4096 + #ifdef __linux__ + #define SG_OFF sizeof(struct sg_header) +-#elif defined(__FreeBSD__) ++#elif defined(__FreeBSD__) || defined(__DragonFly__) + #define SG_OFF (0) + #elif defined(__NetBSD__) + #define SG_OFF sizeof(scsireq_t) +@@ -85,7 +85,7 @@ + #endif + + extern int cooked_init_drive (cdrom_drive *d); +-#ifndef __FreeBSD__ ++#if !defined(__FreeBSD__) && !defined(__DragonFly__) + extern unsigned char *scsi_inquiry (cdrom_drive *d); + #endif + extern int scsi_init_drive (cdrom_drive *d); diff --git a/audio/cdparanoia/patches/patch-df b/audio/cdparanoia/patches/patch-df new file mode 100644 index 00000000000..519ca1a0529 --- /dev/null +++ b/audio/cdparanoia/patches/patch-df @@ -0,0 +1,58 @@ +$NetBSD: patch-df,v 1.1 2005/07/13 09:07:10 wiz Exp $ + +--- interface/scan_devices.c.orig 2005-05-31 16:02:48.000000000 +0200 ++++ interface/scan_devices.c +@@ -51,7 +51,7 @@ static char *cdrom_devices[]={ + "/dev/cm206cd", + "/dev/gscd", + "/dev/optcd",NULL}; +-#elif defined(__FreeBSD__) ++#elif defined(__FreeBSD__) || defined(__DragonFly__) + static char *cdrom_devices[] = { + "/dev/cd?c", + "/dev/acd?c", +@@ -62,7 +62,7 @@ static char *cdrom_devices[] = { + /* Functions here look for a cdrom drive; full init of a drive type + happens in interface.c */ + +-#if defined(__linux__) || defined(__FreeBSD__) ++#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__) + cdrom_drive *cdda_find_a_cdrom(int messagedest,char **messages){ + /* Brute force... */ + +@@ -142,7 +142,7 @@ cdrom_drive *cdda_identify(const char *d + #if defined(__linux__) || defined(__NetBSD__) + d=cdda_identify_cooked(device,messagedest,messages); + if(!d)d=cdda_identify_scsi(device,NULL,messagedest,messages); +-#elif defined(__FreeBSD__) ++#elif defined(__FreeBSD__) || defined(__DragonFly__) + d = cdda_identify_scsi(device, NULL, messagedest, messages); + if (d == NULL) + d = cdda_identify_cooked(device, messagedest, messages); +@@ -305,7 +305,7 @@ cdrom_drive *cdda_identify_cooked(const + #elif defined(__NetBSD__) + /* no kernel support for CD-DA */ + return NULL; +-#elif defined(__FreeBSD__) ++#elif defined(__FreeBSD__) || defined(__DragonFly__) + cdrom_drive *d; + struct stat st; + +@@ -354,7 +354,7 @@ cdda_identify_cooked_fail: + #endif + } + +-#ifndef __FreeBSD__ ++#if !defined(__FreeBSD__) && !defined(__DragonFly__) + struct sg_id { + long l1; /* target | lun << 8 | channel << 16 | low_ino << 24 */ + long l2; /* Unique id */ +@@ -778,7 +778,7 @@ cdda_identify_scsi_fail: + if(g_fd!=-1)close(g_fd); + return(NULL); + } +-#elif defined(__FreeBSD__) ++#elif defined(__FreeBSD__) || defined(__DragonFly__) + cdrom_drive *cdda_identify_scsi(const char *device, + const char *dummy, + int messagedest, diff --git a/audio/cdparanoia/patches/patch-dg b/audio/cdparanoia/patches/patch-dg new file mode 100644 index 00000000000..d2663090286 --- /dev/null +++ b/audio/cdparanoia/patches/patch-dg @@ -0,0 +1,103 @@ +$NetBSD: patch-dg,v 1.1 2005/07/13 09:07:10 wiz Exp $ + +--- interface/scsi_interface.c.orig 2005-05-31 16:02:45.000000000 +0200 ++++ interface/scsi_interface.c +@@ -23,7 +23,7 @@ static void tweak_SG_buffer(cdrom_drive + int table,reserved; + char buffer[256]; + +-#ifndef __FreeBSD__ ++#if !defined(__FreeBSD__) && !defined(__DragonFly__) + #ifdef __linux__ + /* maximum transfer size? */ + if(ioctl(d->cdda_fd,SG_GET_RESERVED_SIZE,&reserved)){ +@@ -66,7 +66,7 @@ static void tweak_SG_buffer(cdrom_drive + cdmessage(d,"\tCouldn't disable command queue! Continuing anyway...\n"); + } + #endif +-#else /* FreeBSD */ ++#else /* FreeBSD || DragonFly */ + d->nsectors = 26; /* FreeBSD only supports 64K I/O transfer size */ + d->bigbuff = d->nsectors * CD_FRAMESIZE_RAW; + +@@ -104,7 +104,7 @@ static void reset_scsi(cdrom_drive *d){ + d->enable_cdda(d,1); + } + +-#elif defined(__FreeBSD__) ++#elif defined(__FreeBSD__) || defined(__DragonFly__) + static void reset_scsi(cdrom_drive *d) { + d->enable_cdda(d,0); + +@@ -161,7 +161,7 @@ static void clear_garbage(cdrom_drive *d + #endif + + /* process a complete scsi command. */ +-#ifndef __FreeBSD__ ++#if !defined(__FreeBSD__) && !defined(__DragonFly__) + static int handle_scsi_cmd(cdrom_drive *d, + unsigned int cmd_len, + unsigned int in_size, +@@ -400,7 +400,7 @@ static int handle_scsi_cmd(cdrom_drive * + return(0); + } + +-#elif defined(__FreeBSD__) ++#elif defined(__FreeBSD__) || defined(__DragonFly__) + static int handle_scsi_cmd(cdrom_drive *d, + unsigned int cmd_len, + unsigned int out_size, +@@ -1060,7 +1060,7 @@ static long scsi_read_map (cdrom_drive * + (int)(sg_hd->sense_buffer[2]&0xf), + (int)(sg_hd->sense_buffer[12]), + (int)(sg_hd->sense_buffer[13])); +-#elif defined(__FreeBSD__) ++#elif defined(__FreeBSD__) || defined(__DragonFly__) + d->ccb->csio.sense_data.flags & SSD_KEY, + d->ccb->csio.sense_data.add_sense_code, + d->ccb->csio.sense_data.add_sense_code_qual); +@@ -1078,7 +1078,7 @@ static long scsi_read_map (cdrom_drive * + fputs(b, stderr); + cdmessage(d,b); + +-#ifndef __FreeBSD__ ++#if !defined(__FreeBSD__) && !defined(__DragonFly__) + fprintf(stderr,"scsi_read error: sector=%ld length=%ld retry=%d\n", + begin,sectors,retry_count); + fprintf(stderr," Sense key: %x ASC: %x ASCQ: %x\n", +@@ -1546,7 +1546,7 @@ static void check_fua_bit(cdrom_drive *d + return; + } + +-#ifndef __FreeBSD__ ++#if !defined(__FreeBSD__) && !defined(__DragonFly__) + static int check_atapi(cdrom_drive *d){ + #ifdef __linux__ + int atapiret=-1; +@@ -1594,7 +1594,7 @@ static int check_atapi(cdrom_drive *d){ + return(d->is_atapi); + } + } +-#elif defined(__FreeBSD__) ++#elif defined(__FreeBSD__) || defined(__DragonFly__) + static int + check_atapi(cdrom_drive *d) + { +@@ -1681,7 +1681,7 @@ static void check_exceptions(cdrom_drive + } + } + +-#ifndef __FreeBSD__ ++#if !defined(__FreeBSD__) && !defined(__DragonFly__) + /* request vendor brand and model */ + unsigned char *scsi_inquiry(cdrom_drive *d){ + memcpy(d->sg_buffer,(char[]){ 0x12,0,0,0,56,0},6); +@@ -1762,7 +1762,7 @@ int scsi_init_drive(cdrom_drive *d){ + check_fua_bit(d); + + d->error_retry=1; +-#ifndef __FreeBSD__ ++#if !defined(__FreeBSD__) && !defined(__DragonFly__) + d->sg=realloc(d->sg,d->nsectors*CD_FRAMESIZE_RAW + SG_OFF + 128); + d->sg_buffer=d->sg+SG_OFF; + #else diff --git a/audio/cdparanoia/patches/patch-dh b/audio/cdparanoia/patches/patch-dh new file mode 100644 index 00000000000..4bd3c94ed2b --- /dev/null +++ b/audio/cdparanoia/patches/patch-dh @@ -0,0 +1,13 @@ +$NetBSD: patch-dh,v 1.1 2005/07/13 09:07:10 wiz Exp $ + +--- interface/utils.h.orig 2005-05-31 16:00:56.000000000 +0200 ++++ interface/utils.h +@@ -10,7 +10,7 @@ + #include <machine/bswap.h> + #endif + #include <err.h> /* XXX */ +-#elif defined(__FreeBSD__) ++#elif defined(__FreeBSD__) || defined(__DragonFly__) + #include <machine/endian.h> + #endif + #include <stdio.h> |