summaryrefslogtreecommitdiff
path: root/audio/cdparanoia/patches
diff options
context:
space:
mode:
authordholland <dholland>2009-05-19 00:36:06 +0000
committerdholland <dholland>2009-05-19 00:36:06 +0000
commit7e836fd40bb70fdedf494418657d07ed10d757db (patch)
tree1f68f635e81e9e0df1e0f119df2c206ee911a16d /audio/cdparanoia/patches
parenta83e418135d6969190e08f0c75de49d54f72e97e (diff)
downloadpkgsrc-7e836fd40bb70fdedf494418657d07ed10d757db.tar.gz
Simplify previous. We don't need to call getrawpartition() to find out
whether to use /dev/rcd0c or /dev/rcd0d; we can just try both. This avoids needing libutil in libcdda_interface.so. Fixes broken build of mplayer (and others?) without needing a recursive revbump as adding libutil would have. PKGREVISION++ (now 8).
Diffstat (limited to 'audio/cdparanoia/patches')
-rw-r--r--audio/cdparanoia/patches/patch-ab6
-rw-r--r--audio/cdparanoia/patches/patch-ca15
-rw-r--r--audio/cdparanoia/patches/patch-cf91
3 files changed, 37 insertions, 75 deletions
diff --git a/audio/cdparanoia/patches/patch-ab b/audio/cdparanoia/patches/patch-ab
index 512c4f60110..5a6943dda60 100644
--- a/audio/cdparanoia/patches/patch-ab
+++ b/audio/cdparanoia/patches/patch-ab
@@ -1,4 +1,4 @@
-$NetBSD: patch-ab,v 1.8 2009/05/17 21:29:34 dholland Exp $
+$NetBSD: patch-ab,v 1.9 2009/05/19 00:36:06 dholland Exp $
--- Makefile.in.orig 2001-03-27 17:46:58.000000000 -0500
+++ Makefile.in 2009-05-17 17:21:32.000000000 -0400
@@ -32,11 +32,11 @@ $NetBSD: patch-ab,v 1.8 2009/05/17 21:29:34 dholland Exp $
- LIBS = -lcdda_interface -lcdda_paranoia -lm
- LIBDEP = interface/libcdda_interface.so paranoia/libcdda_paranoia.so
-endif
-+STLIBS = interface/libcdda_interface.a paranoia/libcdda_paranoia.a @LIBUTIL@ -lm
++STLIBS = interface/libcdda_interface.a paranoia/libcdda_paranoia.a -lm
+STLIBDEP = interface/libcdda_interface.a paranoia/libcdda_paranoia.a
+SHLIBDEP = interface/libcdda_interface.la paranoia/libcdda_paranoia.la
-+SHLIBS = $(SHLIBDEP) @LIBUTIL@ @EXTRA_LIBS@ -lm
++SHLIBS = $(SHLIBDEP) @EXTRA_LIBS@ -lm
-all:
+
diff --git a/audio/cdparanoia/patches/patch-ca b/audio/cdparanoia/patches/patch-ca
index ff9ed5f3d9a..59fbe242bf1 100644
--- a/audio/cdparanoia/patches/patch-ca
+++ b/audio/cdparanoia/patches/patch-ca
@@ -1,16 +1,7 @@
-$NetBSD: patch-ca,v 1.6 2009/05/17 21:29:34 dholland Exp $
+$NetBSD: patch-ca,v 1.7 2009/05/19 00:36:06 dholland Exp $
---- interface/Makefile.in.orig 1999-12-13 23:27:59.000000000 -0500
-+++ interface/Makefile.in 2009-05-17 17:16:52.000000000 -0400
-@@ -7,7 +7,7 @@ VPATH=@srcdir@
- srcdir=@srcdir@
-
- @SET_MAKE@
--FLAGS=@SBPCD_H@ @UCDROM_H@ @TYPESIZES@ @CFLAGS@
-+FLAGS=@SBPCD_H@ @UCDROM_H@ @RAWPART@ @TYPESIZES@ @CFLAGS@
- OPT=@OPT@ $(FLAGS)
- DEBUG=@DEBUG@ $(FLAGS) -DCDDA_TEST
- CC=@CC@
+--- interface/Makefile.in.orig 1999-12-13 20:27:59.000000000 -0800
++++ interface/Makefile.in
@@ -18,12 +18,10 @@ RANLIB=@RANLIB@
LIBS = -lm
CPPFLAGS+=-D_REENTRANT
diff --git a/audio/cdparanoia/patches/patch-cf b/audio/cdparanoia/patches/patch-cf
index 2fa31e9b3c5..772208d1839 100644
--- a/audio/cdparanoia/patches/patch-cf
+++ b/audio/cdparanoia/patches/patch-cf
@@ -1,7 +1,7 @@
-$NetBSD: patch-cf,v 1.9 2009/05/17 21:29:34 dholland Exp $
+$NetBSD: patch-cf,v 1.10 2009/05/19 00:36:06 dholland Exp $
--- interface/scan_devices.c.orig 2001-03-26 00:44:01.000000000 -0500
-+++ interface/scan_devices.c 2009-05-17 16:47:49.000000000 -0400
++++ interface/scan_devices.c 2009-05-18 20:11:24.000000000 -0400
@@ -1,6 +1,8 @@
/******************************************************************
* CopyPolicy: GNU Public License 2 applies
@@ -11,17 +11,7 @@ $NetBSD: patch-cf,v 1.9 2009/05/17 21:29:34 dholland Exp $
*
* Autoscan for or verify presence of a cdrom device
*
-@@ -14,11 +16,18 @@
- #include <pwd.h>
- #include <sys/stat.h>
- #include <sys/types.h>
-+
-+#ifdef HAVE_GETRAWPARTITION
-+#include <util.h>
-+#endif
-+
- #include "cdda_interface.h"
- #include "low_interface.h"
+@@ -19,6 +21,8 @@
#include "common_interface.h"
#include "utils.h"
@@ -30,7 +20,7 @@ $NetBSD: patch-cf,v 1.9 2009/05/17 21:29:34 dholland Exp $
#define MAX_DEV_LEN 20 /* Safe because strings only come from below */
/* must be absolute paths! */
static char *scsi_cdrom_prefixes[]={
-@@ -49,15 +58,43 @@ static char *cdrom_devices[]={
+@@ -49,11 +53,30 @@ static char *cdrom_devices[]={
"/dev/cm206cd",
"/dev/gscd",
"/dev/optcd",NULL};
@@ -43,7 +33,9 @@ $NetBSD: patch-cf,v 1.9 2009/05/17 21:29:34 dholland Exp $
+#elif defined(__NetBSD__)
+static char *cdrom_devices[] = {
+ "/dev/rcd?c",
-+ "/dev/cd?c", NULL};
++ "/dev/rcd?d",
++ "/dev/cd?c",
++ "/dev/cd?d", NULL};
+#endif
/* Functions here look for a cdrom drive; full init of a drive type
@@ -59,28 +51,7 @@ $NetBSD: patch-cf,v 1.9 2009/05/17 21:29:34 dholland Exp $
/* Brute force... */
int i=0;
- cdrom_drive *d;
-+#ifdef __NetBSD__
-+ int rawpartition;
-+#endif
-+
-+#ifdef __NetBSD__
-+#ifdef HAVE_GETRAWPARTITION
-+ rawpartition = getrawpartition();
-+#else
-+ rawpartition = 'c' - 'a';
-+#endif
-+#endif
-
- while(cdrom_devices[i]!=NULL){
-
-@@ -72,13 +109,18 @@ cdrom_drive *cdda_find_a_cdrom(int messa
- /* number, then letter */
-
- buffer[pos-(cdrom_devices[i])]=j+48;
-+#ifdef __NetBSD__
-+ buffer[(pos+1)-(cdrom_devices[i])]='a'+rawpartition;
-+#endif
+@@ -75,10 +98,12 @@ cdrom_drive *cdda_find_a_cdrom(int messa
if((d=cdda_identify(buffer,messagedest,messages)))
return(d);
idmessage(messagedest,messages,"",NULL);
@@ -93,7 +64,7 @@ $NetBSD: patch-cf,v 1.9 2009/05/17 21:29:34 dholland Exp $
}
}else{
/* Name. Go for it. */
-@@ -97,8 +139,11 @@ cdrom_drive *cdda_find_a_cdrom(int messa
+@@ -97,8 +122,11 @@ cdrom_drive *cdda_find_a_cdrom(int messa
temp->pw_name);
}
return(NULL);
@@ -105,7 +76,7 @@ $NetBSD: patch-cf,v 1.9 2009/05/17 21:29:34 dholland Exp $
cdrom_drive *cdda_identify(const char *device, int messagedest,char **messages){
struct stat st;
cdrom_drive *d=NULL;
-@@ -117,8 +162,14 @@ cdrom_drive *cdda_identify(const char *d
+@@ -117,8 +145,14 @@ cdrom_drive *cdda_identify(const char *d
}
#endif
@@ -120,7 +91,7 @@ $NetBSD: patch-cf,v 1.9 2009/05/17 21:29:34 dholland Exp $
#ifdef CDDA_TEST
if(!d)d=cdda_identify_test(device,messagedest,messages);
-@@ -146,6 +197,7 @@ char *test_resolve_symlink(const char *f
+@@ -146,6 +180,7 @@ char *test_resolve_symlink(const char *f
cdrom_drive *cdda_identify_cooked(const char *dev, int messagedest,
char **messages){
@@ -128,7 +99,7 @@ $NetBSD: patch-cf,v 1.9 2009/05/17 21:29:34 dholland Exp $
cdrom_drive *d=NULL;
struct stat st;
int fd=-1;
-@@ -273,8 +325,60 @@ cdrom_drive *cdda_identify_cooked(const
+@@ -273,8 +308,60 @@ cdrom_drive *cdda_identify_cooked(const
idmessage(messagedest,messages,"\t\tCDROM sensed: %s\n",description);
return(d);
@@ -189,7 +160,7 @@ $NetBSD: patch-cf,v 1.9 2009/05/17 21:29:34 dholland Exp $
struct sg_id {
long l1; /* target | lun << 8 | channel << 16 | low_ino << 24 */
long l2; /* Unique id */
-@@ -289,12 +393,18 @@ typedef struct scsiid{
+@@ -289,12 +376,18 @@ typedef struct scsiid{
/* Even *this* isn't as simple as it bloody well should be :-P */
/* SG has an easy interface, but SCSI overall does not */
static int get_scsi_id(int fd, scsiid *id){
@@ -208,7 +179,7 @@ $NetBSD: patch-cf,v 1.9 2009/05/17 21:29:34 dholland Exp $
if(ioctl(fd,SCSI_IOCTL_GET_IDLUN,&argid))return(-1);
id->bus=argid.l2; /* for now */
id->id=argid.l1&0xff;
-@@ -302,6 +412,13 @@ static int get_scsi_id(int fd, scsiid *i
+@@ -302,6 +395,13 @@ static int get_scsi_id(int fd, scsiid *i
if(ioctl(fd,SCSI_IOCTL_GET_BUS_NUMBER,&busarg)==0)
id->bus=busarg;
@@ -222,7 +193,7 @@ $NetBSD: patch-cf,v 1.9 2009/05/17 21:29:34 dholland Exp $
return(0);
}
-@@ -390,6 +507,7 @@ matchfail:
+@@ -390,6 +490,7 @@ matchfail:
if(dev!=-1)close(dev);
return(NULL);
}
@@ -230,7 +201,7 @@ $NetBSD: patch-cf,v 1.9 2009/05/17 21:29:34 dholland Exp $
void strscat(char *a,char *b,int n){
int i;
-@@ -401,6 +519,7 @@ void strscat(char *a,char *b,int n){
+@@ -401,6 +502,7 @@ void strscat(char *a,char *b,int n){
strcat(a," ");
}
@@ -238,7 +209,7 @@ $NetBSD: patch-cf,v 1.9 2009/05/17 21:29:34 dholland Exp $
/* 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,
-@@ -430,7 +549,9 @@ static int verify_SG_version(cdrom_drive
+@@ -430,7 +532,9 @@ static int verify_SG_version(cdrom_drive
idmessage(messagedest,messages,buffer,"");
return(major);
}
@@ -248,7 +219,7 @@ $NetBSD: patch-cf,v 1.9 2009/05/17 21:29:34 dholland Exp $
cdrom_drive *cdda_identify_scsi(const char *generic_device,
const char *ioctl_device, int messagedest,
char **messages){
-@@ -460,6 +581,7 @@ cdrom_drive *cdda_identify_scsi(const ch
+@@ -460,6 +564,7 @@ cdrom_drive *cdda_identify_scsi(const ch
generic_device);
return(NULL);
}
@@ -256,7 +227,7 @@ $NetBSD: patch-cf,v 1.9 2009/05/17 21:29:34 dholland Exp $
if((int)(g_st.st_rdev>>8)!=SCSI_GENERIC_MAJOR){
if((int)(g_st.st_rdev>>8)!=SCSI_CDROM_MAJOR){
idmessage(messagedest,messages,"\t\t%s is not a SCSI device",
-@@ -471,6 +593,7 @@ cdrom_drive *cdda_identify_scsi(const ch
+@@ -471,6 +576,7 @@ cdrom_drive *cdda_identify_scsi(const ch
ioctl_device=temp;
}
}
@@ -264,7 +235,7 @@ $NetBSD: patch-cf,v 1.9 2009/05/17 21:29:34 dholland Exp $
}
if(ioctl_device){
if(stat(ioctl_device,&i_st)){
-@@ -478,6 +601,7 @@ cdrom_drive *cdda_identify_scsi(const ch
+@@ -478,6 +584,7 @@ cdrom_drive *cdda_identify_scsi(const ch
ioctl_device);
return(NULL);
}
@@ -272,7 +243,7 @@ $NetBSD: patch-cf,v 1.9 2009/05/17 21:29:34 dholland Exp $
if((int)(i_st.st_rdev>>8)!=SCSI_CDROM_MAJOR){
if((int)(i_st.st_rdev>>8)!=SCSI_GENERIC_MAJOR){
idmessage(messagedest,messages,"\t\t%s is not a SCSI device",
-@@ -489,6 +613,7 @@ cdrom_drive *cdda_identify_scsi(const ch
+@@ -489,6 +596,7 @@ cdrom_drive *cdda_identify_scsi(const ch
ioctl_device=temp;
}
}
@@ -280,7 +251,7 @@ $NetBSD: patch-cf,v 1.9 2009/05/17 21:29:34 dholland Exp $
}
/* we need to resolve any symlinks for the lookup code to work */
-@@ -505,6 +630,7 @@ cdrom_drive *cdda_identify_scsi(const ch
+@@ -505,6 +613,7 @@ cdrom_drive *cdda_identify_scsi(const ch
}
if(!generic_device || !ioctl_device){
@@ -288,7 +259,7 @@ $NetBSD: patch-cf,v 1.9 2009/05/17 21:29:34 dholland Exp $
if(generic_device){
ioctl_device=
scsi_match(generic_device,scsi_cdrom_prefixes,
-@@ -520,6 +646,12 @@ cdrom_drive *cdda_identify_scsi(const ch
+@@ -520,6 +629,12 @@ cdrom_drive *cdda_identify_scsi(const ch
if(!generic_device)
goto cdda_identify_scsi_fail;
}
@@ -301,7 +272,7 @@ $NetBSD: patch-cf,v 1.9 2009/05/17 21:29:34 dholland Exp $
}
idmessage(messagedest,messages,"\t\tgeneric device: %s",generic_device);
-@@ -556,6 +688,7 @@ cdrom_drive *cdda_identify_scsi(const ch
+@@ -556,6 +671,7 @@ cdrom_drive *cdda_identify_scsi(const ch
type=(int)(i_st.st_rdev>>8);
@@ -309,7 +280,7 @@ $NetBSD: patch-cf,v 1.9 2009/05/17 21:29:34 dholland Exp $
if(type==SCSI_CDROM_MAJOR){
if (!S_ISBLK(i_st.st_mode)) {
idmessage(messagedest,messages,"\t\tSCSI CDROM device %s not a "
-@@ -567,8 +700,10 @@ cdrom_drive *cdda_identify_scsi(const ch
+@@ -567,8 +683,10 @@ cdrom_drive *cdda_identify_scsi(const ch
"major number",ioctl_device);
goto cdda_identify_scsi_fail;
}
@@ -320,7 +291,7 @@ $NetBSD: patch-cf,v 1.9 2009/05/17 21:29:34 dholland Exp $
if((int)(g_st.st_rdev>>8)==SCSI_GENERIC_MAJOR){
if (!S_ISCHR(g_st.st_mode)) {
idmessage(messagedest,messages,"\t\tGeneric SCSI device %s not a "
-@@ -580,6 +715,7 @@ cdrom_drive *cdda_identify_scsi(const ch
+@@ -580,6 +698,7 @@ cdrom_drive *cdda_identify_scsi(const ch
"major number",generic_device);
goto cdda_identify_scsi_fail;
}
@@ -328,7 +299,7 @@ $NetBSD: patch-cf,v 1.9 2009/05/17 21:29:34 dholland Exp $
d=calloc(1,sizeof(cdrom_drive));
-@@ -590,6 +726,7 @@ cdrom_drive *cdda_identify_scsi(const ch
+@@ -590,6 +709,7 @@ cdrom_drive *cdda_identify_scsi(const ch
d->bigendianp=-1; /* We don't know yet... */
d->nsectors=-1;
@@ -336,7 +307,7 @@ $NetBSD: patch-cf,v 1.9 2009/05/17 21:29:34 dholland Exp $
version=verify_SG_version(d,messagedest,messages);
switch(version){
case -1:case 0:case 1:
-@@ -599,6 +736,9 @@ cdrom_drive *cdda_identify_scsi(const ch
+@@ -599,6 +719,9 @@ cdrom_drive *cdda_identify_scsi(const ch
d->interface=GENERIC_SCSI;
break;
}
@@ -346,7 +317,7 @@ $NetBSD: patch-cf,v 1.9 2009/05/17 21:29:34 dholland Exp $
/* malloc our big buffer for scsi commands */
d->sg=malloc(MAX_BIG_BUFF_SIZE);
-@@ -617,7 +757,16 @@ cdrom_drive *cdda_identify_scsi(const ch
+@@ -617,7 +740,16 @@ cdrom_drive *cdda_identify_scsi(const ch
/* It would seem some TOSHIBA CDROMs gets things wrong */
@@ -364,7 +335,7 @@ $NetBSD: patch-cf,v 1.9 2009/05/17 21:29:34 dholland Exp $
!strncmp (p + 16, "CD-ROM", 6) &&
p[0] == TYPE_DISK) {
p[0] = TYPE_ROM;
-@@ -653,6 +802,88 @@ cdda_identify_scsi_fail:
+@@ -653,6 +785,88 @@ cdda_identify_scsi_fail:
if(g_fd!=-1)close(g_fd);
return(NULL);
}
@@ -453,7 +424,7 @@ $NetBSD: patch-cf,v 1.9 2009/05/17 21:29:34 dholland Exp $
#ifdef CDDA_TEST
-@@ -702,3 +933,4 @@ cdrom_drive *cdda_identify_test(const ch
+@@ -702,3 +916,4 @@ cdrom_drive *cdda_identify_test(const ch
}
#endif