pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/audio/cdparanoia Make the cdrom device probe work prop...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/e9968b13f1a2
branches:  trunk
changeset: 393167:e9968b13f1a2
user:      dholland <dholland%pkgsrc.org@localhost>
date:      Sun May 17 21:29:33 2009 +0000

description:
Make the cdrom device probe work properly under NetBSD, instead of
messily hardwiring it to /dev/rcd0[cd]; the latter apparently breaks
in some circumstances. Uses as a starting point a patch from Kimura
Fuyuki in PR 34008. PKGREVISION++ (to 7).

diffstat:

 audio/cdparanoia/Makefile         |    4 +-
 audio/cdparanoia/distinfo         |   10 +-
 audio/cdparanoia/patches/patch-ab |    8 +-
 audio/cdparanoia/patches/patch-ae |   55 ++++++-------------
 audio/cdparanoia/patches/patch-ca |   15 ++++-
 audio/cdparanoia/patches/patch-cf |  104 +++++++++++++++++++++++--------------
 6 files changed, 105 insertions(+), 91 deletions(-)

diffs (truncated from 554 to 300 lines):

diff -r 4b7b9de642e6 -r e9968b13f1a2 audio/cdparanoia/Makefile
--- a/audio/cdparanoia/Makefile Sun May 17 20:40:46 2009 +0000
+++ b/audio/cdparanoia/Makefile Sun May 17 21:29:33 2009 +0000
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.25 2007/02/22 19:26:05 wiz Exp $
+# $NetBSD: Makefile,v 1.26 2009/05/17 21:29:33 dholland Exp $
 #
 
 DISTNAME=      cdparanoia-III-alpha9.8
 PKGNAME=       cdparanoia-3.0.9.8
-PKGREVISION=   6
+PKGREVISION=   7
 CATEGORIES=    audio
 MASTER_SITES=  http://www.xiph.org/paranoia/download/
 EXTRACT_SUFX=  .src.tgz
diff -r 4b7b9de642e6 -r e9968b13f1a2 audio/cdparanoia/distinfo
--- a/audio/cdparanoia/distinfo Sun May 17 20:40:46 2009 +0000
+++ b/audio/cdparanoia/distinfo Sun May 17 21:29:33 2009 +0000
@@ -1,20 +1,20 @@
-$NetBSD: distinfo,v 1.20 2007/10/09 21:26:11 heinz Exp $
+$NetBSD: distinfo,v 1.21 2009/05/17 21:29:33 dholland Exp $
 
 SHA1 (cdparanoia-III-alpha9.8.src.tgz) = 04cc33a7d22d6255f6239e3e74195506b3bdde06
 RMD160 (cdparanoia-III-alpha9.8.src.tgz) = d9225165f83b5386c58db263d6918a7006df1481
 Size (cdparanoia-III-alpha9.8.src.tgz) = 116591 bytes
 SHA1 (patch-aa) = 29fd5767b37360fe804013bb171fc7e5f4d8311f
-SHA1 (patch-ab) = 7b3d4b325c4095c08425cc28033297f1ffc3ce95
+SHA1 (patch-ab) = fcbeaf7f3e1318ef8bcc8742adec3a3a7efc937e
 SHA1 (patch-ac) = 6bd7ad7a0e8bcd1f8354c73706cafb0e789b8252
 SHA1 (patch-ad) = 9a1ea1b98b5f3810e1ccae57beb8c68b5e189716
-SHA1 (patch-ae) = 6ba166c2ac73b9c03a1944989c6ffbe655d80c71
+SHA1 (patch-ae) = 59d74c0392d5bcc37299326efa8ba700722d5cf4
 SHA1 (patch-ba) = 51151796493c946e5bdafbd22005136ea7f27a09
-SHA1 (patch-ca) = 9c35254c09a96b622cac44198443f66f7bc0e428
+SHA1 (patch-ca) = 433b7ddd7d1cf0123dadfdff8e550381eaf51f22
 SHA1 (patch-cb) = c19ee04017b836842bb0f2d2c77e8f35aad0f9bb
 SHA1 (patch-cc) = adea4fd9682c0543e5749c6f3fe73697d8663c6c
 SHA1 (patch-cd) = 81d31fb55db0f982959395cdecc3da826bf23bfb
 SHA1 (patch-ce) = 3a4e9a83753e2eb6595bcb4e7a47c42b72ef5702
-SHA1 (patch-cf) = d8cde95f9efa9c1941768468c30b1152c083830f
+SHA1 (patch-cf) = ae8c19f7df5dbb97c258ea808834c3e13809b185
 SHA1 (patch-cg) = c962cbc84f021e399b6f210d0e7a140fd7004222
 SHA1 (patch-ch) = 8d16dd8c80e8f1ee35ccc299ba927d685adde01c
 SHA1 (patch-ci) = 60db1d1d2e8ec9c6d446543762218b22c597d986
diff -r 4b7b9de642e6 -r e9968b13f1a2 audio/cdparanoia/patches/patch-ab
--- a/audio/cdparanoia/patches/patch-ab Sun May 17 20:40:46 2009 +0000
+++ b/audio/cdparanoia/patches/patch-ab Sun May 17 21:29:33 2009 +0000
@@ -1,7 +1,7 @@
-$NetBSD: patch-ab,v 1.7 2006/11/03 12:45:21 joerg Exp $
+$NetBSD: patch-ab,v 1.8 2009/05/17 21:29:34 dholland Exp $
 
---- Makefile.in.orig   2001-03-27 22:46:58.000000000 +0000
-+++ Makefile.in
+--- Makefile.in.orig   2001-03-27 17:46:58.000000000 -0500
++++ Makefile.in        2009-05-17 17:21:32.000000000 -0400
 @@ -3,12 +3,12 @@
  # DO NOT EDIT BELOW! ##########################################################
  # (unless, of course, you know what you are doing :) ##########################
@@ -13,7 +13,7 @@
  
  @SET_MAKE@
 -FLAGS=@TYPESIZES@ @CFLAGS@
-+FLAGS=@GETOPT_LONG@ @RAWPART@ @TYPESIZES@ @CFLAGS@
++FLAGS=@GETOPT_LONG@ @TYPESIZES@ @CFLAGS@
  OPT=@OPT@ $(FLAGS)
  DEBUG=@DEBUG@ $(FLAGS)
  CC=@CC@
diff -r 4b7b9de642e6 -r e9968b13f1a2 audio/cdparanoia/patches/patch-ae
--- a/audio/cdparanoia/patches/patch-ae Sun May 17 20:40:46 2009 +0000
+++ b/audio/cdparanoia/patches/patch-ae Sun May 17 21:29:33 2009 +0000
@@ -1,8 +1,8 @@
-$NetBSD: patch-ae,v 1.5 2006/09/03 17:13:30 ben Exp $
+$NetBSD: patch-ae,v 1.6 2009/05/17 21:29:34 dholland Exp $
 
---- main.c.orig        2001-03-25 19:44:50.000000000 -0800
-+++ main.c
-@@ -49,12 +49,18 @@
+--- main.c.orig        2001-03-25 22:44:50.000000000 -0500
++++ main.c     2009-05-17 17:20:20.000000000 -0400
+@@ -49,7 +49,9 @@
  #include <unistd.h>
  #include <string.h>
  #include <fcntl.h>
@@ -12,16 +12,7 @@
  #include <errno.h>
  #include <math.h>
  #include <sys/time.h>
- #include <sys/stat.h>
- 
-+#ifdef HAVE_GETRAWPARTITION
-+#include <util.h>
-+#endif
-+
- #include "interface/cdda_interface.h"
- #include "paranoia/cdda_paranoia.h"
- #include "utils.h"
-@@ -231,6 +237,7 @@ VERSION"\n"
+@@ -231,6 +233,7 @@ VERSION"\n"
  "  cdparanoia [options] <span> [outfile]\n\n"
  
  "OPTIONS:\n"
@@ -29,7 +20,7 @@
  "  -v --verbose                    : extra verbose operation\n"
  "  -q --quiet                      : quiet operation\n"
  "  -e --stderr-progress            : force output of progress information to\n"
-@@ -256,9 +263,11 @@ VERSION"\n"
+@@ -256,9 +259,11 @@ VERSION"\n"
  "                                    to n sectors\n"
  "  -o --force-search-overlap  <n>  : force minimum overlap search during\n"
  "                                    verification to n sectors\n"
@@ -41,7 +32,7 @@
  "  -S --force-read-speed <n>       : read from device at specified speed\n"
  "  -t --toc-offset <n>             : Add <n> sectors to the values reported\n"
  "                                    when addressing tracks. May be negative\n"
-@@ -276,6 +285,52 @@ VERSION"\n"
+@@ -276,6 +281,52 @@ VERSION"\n"
  "  -Z --disable-paranoia           : disable all paranoia checking\n"
  "  -Y --disable-extra-paranoia     : only do cdda2wav-style overlap checking\n"
  "  -X --abort-on-skip              : abort on imperfect reads/skips\n\n"
@@ -94,7 +85,7 @@
  
  "OUTPUT SMILIES:\n"
  "  :-)   Normal operation, low/no jitter\n"
-@@ -376,7 +431,7 @@ static void callback(long inpos, int fun
+@@ -376,7 +427,7 @@ static void callback(long inpos, int fun
    int graph=30;
    char buffer[256];
    static long c_sector=0,v_sector=0;
@@ -103,7 +94,7 @@
    static int last=0;
    static long lasttime=0;
    long sector,osector=0;
-@@ -587,6 +642,7 @@ static void callback(long inpos, int fun
+@@ -587,6 +638,7 @@ static void callback(long inpos, int fun
  
  const char *optstring = "escCn:o:O:d:g:S:prRwafvqVQhZz::YXWBi:Tt:";
  
@@ -111,7 +102,7 @@
  struct option options [] = {
        {"stderr-progress",no_argument,NULL,'e'},
        {"search-for-drive",no_argument,NULL,'s'},
-@@ -621,6 +677,7 @@ struct option options [] = {
+@@ -621,6 +673,7 @@ struct option options [] = {
  
        {NULL,0,NULL,0}
  };
@@ -119,7 +110,7 @@
  
  long blocking_write(int outf, char *buffer, long num){
    long words=0,temp;
-@@ -673,7 +730,12 @@ int main(int argc,char *argv[]){
+@@ -673,7 +726,12 @@ int main(int argc,char *argv[]){
  
    atexit(cleanup);
  
@@ -133,7 +124,7 @@
      switch(c){
      case 'B':
        batch=1;
-@@ -690,6 +752,7 @@ int main(int argc,char *argv[]){
+@@ -690,6 +748,7 @@ int main(int argc,char *argv[]){
      case 'o':
        force_cdrom_overlap=atoi(optarg);
        break;
@@ -141,7 +132,7 @@
      case 'd':
        if(force_cdrom_device)free(force_cdrom_device);
        force_cdrom_device=copystring(optarg);
-@@ -698,6 +761,7 @@ int main(int argc,char *argv[]){
+@@ -698,6 +757,7 @@ int main(int argc,char *argv[]){
        if(force_generic_device)free(force_generic_device);
        force_generic_device=copystring(optarg);
        break;
@@ -149,7 +140,7 @@
      case 'S':
        force_cdrom_speed=atoi(optarg);
        break;
-@@ -811,6 +875,30 @@ int main(int argc,char *argv[]){
+@@ -811,6 +871,18 @@ int main(int argc,char *argv[]){
  
    /* Query the cdrom/disc; we may need to override some settings */
  
@@ -157,19 +148,7 @@
 +  d=cdda_find_a_cdrom(verbose,NULL);
 +#else
 +#ifndef __linux__     /* XXX */
-+#ifdef __NetBSD__
-+  if (!force_generic_device) {
-+    int raw;
-+    static char devstring[16];
-+#ifdef HAVE_GETRAWPARTITION
-+    raw = getrawpartition();
-+#else
-+    raw = 'c' - 'a';
-+#endif
-+    snprintf(devstring, sizeof(devstring) - 1, "/dev/rcd0%c", raw + 'a');
-+    force_generic_device=devstring;
-+  }
-+#else
++#ifndef __NetBSD__ /* XXX: is this needed? */
 +  if (!force_generic_device)
 +    errx(1, "-g option is currently required by the NetBSD pkg version");
 +#endif
@@ -180,7 +159,7 @@
    if(force_generic_device)
      d=cdda_identify_scsi(force_generic_device,force_cdrom_device,verbose,NULL);
    else
-@@ -841,6 +929,7 @@ int main(int argc,char *argv[]){
+@@ -841,6 +913,7 @@ int main(int argc,char *argv[]){
            report("");
        }
        }
@@ -188,7 +167,7 @@
  
    if(!d){
      if(!verbose)
-@@ -878,7 +967,9 @@ int main(int argc,char *argv[]){
+@@ -878,7 +951,9 @@ int main(int argc,char *argv[]){
              "ignoring preset and autosense",force_cdrom_sectors);
        report(buffer);
        d->nsectors=force_cdrom_sectors;
diff -r 4b7b9de642e6 -r e9968b13f1a2 audio/cdparanoia/patches/patch-ca
--- a/audio/cdparanoia/patches/patch-ca Sun May 17 20:40:46 2009 +0000
+++ b/audio/cdparanoia/patches/patch-ca Sun May 17 21:29:33 2009 +0000
@@ -1,7 +1,16 @@
-$NetBSD: patch-ca,v 1.5 2006/09/03 17:13:30 ben Exp $
+$NetBSD: patch-ca,v 1.6 2009/05/17 21:29:34 dholland Exp $
 
---- interface/Makefile.in.orig 1999-12-13 20:27:59.000000000 -0800
-+++ interface/Makefile.in
+--- 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@
 @@ -18,12 +18,10 @@ RANLIB=@RANLIB@
  LIBS = -lm
  CPPFLAGS+=-D_REENTRANT
diff -r 4b7b9de642e6 -r e9968b13f1a2 audio/cdparanoia/patches/patch-cf
--- a/audio/cdparanoia/patches/patch-cf Sun May 17 20:40:46 2009 +0000
+++ b/audio/cdparanoia/patches/patch-cf Sun May 17 21:29:33 2009 +0000
@@ -1,7 +1,7 @@
-$NetBSD: patch-cf,v 1.8 2007/10/09 21:26:11 heinz Exp $
+$NetBSD: patch-cf,v 1.9 2009/05/17 21:29:34 dholland Exp $
 
---- interface/scan_devices.c.orig      2001-03-26 07:44:01.000000000 +0200
-+++ interface/scan_devices.c
+--- 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
 @@ -1,6 +1,8 @@
  /******************************************************************
   * CopyPolicy: GNU Public License 2 applies
@@ -11,7 +11,17 @@
   * 
   * Autoscan for or verify presence of a cdrom device
   * 
-@@ -19,6 +21,8 @@
+@@ -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"
  #include "common_interface.h"
  #include "utils.h"
  
@@ -20,7 +30,7 @@
  #define MAX_DEV_LEN 20 /* Safe because strings only come from below */
  /* must be absolute paths! */
  static char *scsi_cdrom_prefixes[]={
-@@ -49,11 +53,24 @@ static char *cdrom_devices[]={
+@@ -49,15 +58,43 @@ static char *cdrom_devices[]={
    "/dev/cm206cd",
    "/dev/gscd",
    "/dev/optcd",NULL};
@@ -30,12 +40,16 @@
 +      "/dev/acd?c",
 +      "/dev/wcd?c",
 +      "/dev/mcd?c", NULL};
++#elif defined(__NetBSD__)
++static char *cdrom_devices[] = {
++      "/dev/rcd?c",
++      "/dev/cd?c", NULL};
 +#endif
  
  /* Functions here look for a cdrom drive; full init of a drive type
     happens in interface.c */
  
-+#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__) || (defined(__APPLE__) && defined(__MACH__))



Home | Main Index | Thread Index | Old Index