pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/sysutils/cdrtools-ossdvd Sergevy Svishchev writes (in ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/4b11a7889f10
branches:  trunk
changeset: 529652:4b11a7889f10
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Fri Jun 08 17:30:09 2007 +0000

description:
Sergevy Svishchev writes (in PR 35481):
k3b uses cdrecord for CD-R[W] writing tasks and invokes it with
'dev=<bus>,<target>,<lun>' argument.  The code in scsi-bsd.c attempts
to find a device node (/dev/rcd?d) that matches these <bus>, <target>
and <lun>; this code stops after first failure.  If cd0 does not
exist, but cd1 does, the code will fail to match cd1.

Also, the code doesn't use getrawpartition().

Apply his patches for both problems. Bump PKGREVISION.

diffstat:

 sysutils/cdrtools-ossdvd/Makefile         |  10 ++++----
 sysutils/cdrtools-ossdvd/distinfo         |   6 +++-
 sysutils/cdrtools-ossdvd/patches/patch-ai |  33 ++++++++++++++++--------------
 sysutils/cdrtools-ossdvd/patches/patch-ch |  13 ++++++++++++
 sysutils/cdrtools-ossdvd/patches/patch-ci |  13 ++++++++++++
 5 files changed, 53 insertions(+), 22 deletions(-)

diffs (181 lines):

diff -r 612002073ecb -r 4b11a7889f10 sysutils/cdrtools-ossdvd/Makefile
--- a/sysutils/cdrtools-ossdvd/Makefile Fri Jun 08 17:22:03 2007 +0000
+++ b/sysutils/cdrtools-ossdvd/Makefile Fri Jun 08 17:30:09 2007 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.28 2007/02/22 19:27:10 wiz Exp $
+# $NetBSD: Makefile,v 1.29 2007/06/08 17:30:09 wiz Exp $
 
 DISTNAME=      cdrtools-2.01.01a05
 PKGNAME=       cdrtools-ossdvd-2.01.1.36
-PKGREVISION=   1
+PKGREVISION=   2
 CATEGORIES=    sysutils
 MASTER_SITES=  ftp://ftp.berlios.de/pub/cdrecord/alpha/
 EXTRACT_SUFX=  .tar.bz2
@@ -16,7 +16,7 @@
 HOMEPAGE=      http://crashrecovery.org/oss-dvd.html
 COMMENT=       Software for creating ISO9660 images and writing CDs/CD-RWs/DVDs
 
-CONFLICTS=     mkisofs-[0-9]* cdrecord-[0-9]* cdrtools-*
+CONFLICTS=     mkisofs-[0-9]* cdrecord-[0-9]* cdrtools-[a-z0-9]*
 
 PKG_INSTALLATION_TYPES=        overwrite pkgviews
 
@@ -32,8 +32,8 @@
 # avoid picking up a bad ${ARCH} during the build
 MAKE_ENV+=     ARCH=""
 MAKE_ENV+=     MAKEPROG="gmake"
-MAKE_ENV+=     COPTX=${CFLAGS:M*:Q}
-MAKE_ENV+=     LDOPTX=${LDFLAGS:M*:Q}
+MAKE_ENV+=     COPTX=${CFLAGS:Q}
+MAKE_ENV+=     LDOPTX=${LDFLAGS:Q}
 
 # if we're using a gcc which is named gcc, we need to set CCOM=gcc
 # in MAKE_ENV so the make infrastructure picks the right options.
diff -r 612002073ecb -r 4b11a7889f10 sysutils/cdrtools-ossdvd/distinfo
--- a/sysutils/cdrtools-ossdvd/distinfo Fri Jun 08 17:22:03 2007 +0000
+++ b/sysutils/cdrtools-ossdvd/distinfo Fri Jun 08 17:30:09 2007 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.9 2006/02/04 12:05:17 wiz Exp $
+$NetBSD: distinfo,v 1.10 2007/06/08 17:30:09 wiz Exp $
 
 SHA1 (cdrtools-2.01.01a05.tar.bz2) = a4de142e6bd13c37d4701cf86496d708523976b3
 RMD160 (cdrtools-2.01.01a05.tar.bz2) = 74dd5db073de43f1116f423f40e376808a07fb5c
@@ -8,7 +8,7 @@
 Size (cdrtools-2.01.01a05-ossdvd.patch.bz2) = 15629 bytes
 SHA1 (patch-ac) = 6def0342f51fcb30f81b89a125afdb76e4f913a3
 SHA1 (patch-ah) = 8dc829b923493f1d0f47926fc11af30ceeb4b0db
-SHA1 (patch-ai) = f55c8efa1fd096a373983a2af611170c4e603d5d
+SHA1 (patch-ai) = af53cf30e31459bf16c6f75f54503db4475da08c
 SHA1 (patch-aj) = 6bae62f59745e5dd070ff4a6c93496d88f2ed99a
 SHA1 (patch-ba) = 72d25c371894c0e4ededc5593a78f6b02f35b6de
 SHA1 (patch-bb) = 528abe11c5a01615b4dbcd7304b39374f8d3c255
@@ -19,3 +19,5 @@
 SHA1 (patch-ce) = 04d842a7f78f4d6ab89da652023f4f8d7d6403fa
 SHA1 (patch-cf) = 50855c214fb718594837001e57fa0cdebb9b5cf0
 SHA1 (patch-cg) = 686ac754c463ce37d15be19dcb8048741d8546f2
+SHA1 (patch-ch) = 1b19fd90e79dec9abdda3311cdcf7601b62c52f3
+SHA1 (patch-ci) = 55845889183b28e1b6cd70ee8f24a2803137ad23
diff -r 612002073ecb -r 4b11a7889f10 sysutils/cdrtools-ossdvd/patches/patch-ai
--- a/sysutils/cdrtools-ossdvd/patches/patch-ai Fri Jun 08 17:22:03 2007 +0000
+++ b/sysutils/cdrtools-ossdvd/patches/patch-ai Fri Jun 08 17:30:09 2007 +0000
@@ -1,8 +1,16 @@
-$NetBSD: patch-ai,v 1.3 2006/02/04 12:05:17 wiz Exp $
+$NetBSD: patch-ai,v 1.4 2007/06/08 17:30:09 wiz Exp $
 
 --- libscg/scsi-bsd.c.orig     2004-01-14 23:13:05.000000000 +0000
 +++ libscg/scsi-bsd.c
-@@ -47,7 +47,7 @@ static       char __sccsid[] =
+@@ -39,6 +39,7 @@ static       char __sccsid[] =
+ 
+ #undef        sense
+ #include <sys/scsiio.h>
++#include <util.h>
+ 
+ /*
+  *    Warning: you may change this source, but if you do that
+@@ -47,7 +48,7 @@ static       char __sccsid[] =
   *    Choose your name instead of "schily" and make clear that the version
   *    string is related to a modified source.
   */
@@ -11,7 +19,7 @@
  
  #define       MAX_SCG         16      /* Max # of SCSI controllers */
  #define       MAX_TGT         16
-@@ -107,7 +107,7 @@ scgo_version(scgp, what)
+@@ -107,7 +108,7 @@ scgo_version(scgp, what)
                 * return "schily" for the SCG_AUTHOR request.
                 */
                case SCG_AUTHOR:
@@ -20,23 +28,18 @@
                case SCG_SCCS_ID:
                        return (__sccsid);
                }
-@@ -139,6 +139,15 @@ scgo_open(scgp, device)
+@@ -139,6 +140,10 @@ scgo_open(scgp, device)
        register int    l;
        register int    nopen = 0;
        char            devname[64];
 +#if defined(__NetBSD__)
 +      struct scsi_addr mysaddr;
-+#if defined(__i386__) || defined(__amd64__)
-+      char    slicename[] = "d";      /* i386 is special */
-+#else
-+      char    slicename[] = "c";      /* this is what the rest uses */
-+#endif
-+      char    *myslicename = slicename;
++      int             myslicename = getrawpartition();
 +#endif
  
        if (busno >= MAX_SCG || tgt >= MAX_TGT || tlun >= MAX_LUN) {
                errno = EINVAL;
-@@ -165,6 +174,60 @@ scgo_open(scgp, device)
+@@ -165,6 +170,60 @@ scgo_open(scgp, device)
        if ((device != NULL && *device != '\0') || (busno == -2 && tgt == -2))
                goto openbydev;
  
@@ -58,7 +61,7 @@
 +#if defined(__NetBSD__)
 +      if (busno >= 0 && tgt >= 0 && tlun >= 0) {
 +              for (l=0; l < MAX_LUN ; l++) {
-+                      sprintf(devname, "/dev/rcd%d%s", l, myslicename);
++                      sprintf(devname, "/dev/rcd%d%c", l, 'a' + myslicename);
 +                      f = open(devname, O_RDWR);
 +                      if (f >= 0) {
 +                              if (ioctl(f, SCIOCIDENTIFY, &mysaddr) < 0) {
@@ -70,10 +73,10 @@
 +                                      scglocal(scgp)->scgfiles[busno][tgt][tlun] = f;
 +                                      return(1);
 +                              }
-+                      } else goto openbydev;
++                      }
 +              }
 +      } else for (l=0; l < MAX_LUN ; l++) {
-+                      sprintf(devname, "/dev/rcd%d%s", l, myslicename);
++                      sprintf(devname, "/dev/rcd%d%c", l, 'a' + myslicename);
 +                      f = open(devname, O_RDWR);
 +                      if (f >= 0) {
 +                              if (ioctl(f, SCIOCIDENTIFY, &mysaddr) < 0) {
@@ -97,7 +100,7 @@
        if (busno >= 0 && tgt >= 0 && tlun >= 0) {
  
                js_snprintf(devname, sizeof (devname),
-@@ -201,6 +264,7 @@ scgo_open(scgp, device)
+@@ -201,6 +260,7 @@ scgo_open(scgp, device)
                        }
                }
        }
diff -r 612002073ecb -r 4b11a7889f10 sysutils/cdrtools-ossdvd/patches/patch-ch
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/cdrtools-ossdvd/patches/patch-ch Fri Jun 08 17:30:09 2007 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-ch,v 1.1 2007/06/08 17:30:09 wiz Exp $
+
+--- RULES/i386-netbsd-gcc.rul.orig     2002-10-15 20:43:41.000000000 +0000
++++ RULES/i386-netbsd-gcc.rul
+@@ -42,7 +42,7 @@ LIB_KVM=     
+ LIBS_PATH=    -L$(OLIBSDIR)
+ 
+ LDFLAGS=      $(LDOPTS) $(LDOPTX)
+-LDLIBS=               $(LIBS) $(LIBX)
++LDLIBS=               $(LIBS) $(LIBX) -lutil
+ 
+ #LDOPTS=              $(LIBS_PATH) $(LDPATH) $(RUNPATH)
+ LDOPTS=               $(LIBS_PATH) $(LDPATH)
diff -r 612002073ecb -r 4b11a7889f10 sysutils/cdrtools-ossdvd/patches/patch-ci
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/cdrtools-ossdvd/patches/patch-ci Fri Jun 08 17:30:09 2007 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-ci,v 1.1 2007/06/08 17:30:09 wiz Exp $
+
+--- RULES/i386-netbsd-cc.rul.orig      2002-10-15 20:43:40.000000000 +0000
++++ RULES/i386-netbsd-cc.rul
+@@ -42,7 +42,7 @@ LIB_KVM=     
+ LIBS_PATH=    -L$(OLIBSDIR)
+ 
+ LDFLAGS=      $(LDOPTS) $(LDOPTX)
+-LDLIBS=               $(LIBS) $(LIBX)
++LDLIBS=               $(LIBS) $(LIBX) -lutil
+ 
+ #LDOPTS=              $(LIBS_PATH) $(LDPATH) $(RUNPATH)
+ LDOPTS=               $(LIBS_PATH) $(LDPATH)



Home | Main Index | Thread Index | Old Index