summaryrefslogtreecommitdiff
path: root/sysutils/cdrecord-xcdroast
diff options
context:
space:
mode:
authordrochner <drochner@pkgsrc.org>2002-12-02 18:41:20 +0000
committerdrochner <drochner@pkgsrc.org>2002-12-02 18:41:20 +0000
commitbec2bf2f5a4953689eeb2aa2a93e044560cc8d3c (patch)
treefa44e45757706f8dc6ade84397a6998c22d0b717 /sysutils/cdrecord-xcdroast
parente2fd5b3295c074adf7e60cbcbbd1b18ce9ebda48 (diff)
downloadpkgsrc-bec2bf2f5a4953689eeb2aa2a93e044560cc8d3c.tar.gz
Provide a cdrecord (aka cdrtools) pkg exclusively for use by xcdroast.
xcdroast is quite picky about cdrecord versions, so we are decoupled. (for the upcoming xcdroast-0.98alpha11 pkg)
Diffstat (limited to 'sysutils/cdrecord-xcdroast')
-rw-r--r--sysutils/cdrecord-xcdroast/DESCR9
-rw-r--r--sysutils/cdrecord-xcdroast/Makefile49
-rw-r--r--sysutils/cdrecord-xcdroast/PLIST7
-rw-r--r--sysutils/cdrecord-xcdroast/distinfo10
-rw-r--r--sysutils/cdrecord-xcdroast/patches/patch-ac21
-rw-r--r--sysutils/cdrecord-xcdroast/patches/patch-ah40
-rw-r--r--sysutils/cdrecord-xcdroast/patches/patch-ai107
-rw-r--r--sysutils/cdrecord-xcdroast/patches/patch-aj25
-rw-r--r--sysutils/cdrecord-xcdroast/patches/patch-ba19
-rw-r--r--sysutils/cdrecord-xcdroast/patches/patch-bb19
10 files changed, 306 insertions, 0 deletions
diff --git a/sysutils/cdrecord-xcdroast/DESCR b/sysutils/cdrecord-xcdroast/DESCR
new file mode 100644
index 00000000000..48cbdc9893a
--- /dev/null
+++ b/sysutils/cdrecord-xcdroast/DESCR
@@ -0,0 +1,9 @@
+Cdrecord allows you to burn CDs with a CD-R/CD-RW recorder. It
+works as a burn engine for several applications. Cdrecord supports
+CD recorders from many different vendors; all SCSI-3/mmc and
+ATAPI/mmc compliant drives should also work. Supported features
+include: IDE/ATAPI, parallel-port, and SCSI drives; audio CDs, data
+CDs, and mixed CDs; full multi-session support, CD-RWs (rewritable),
+TAO, DAO and human-readable error messages.
+
+This is a development release of the software.
diff --git a/sysutils/cdrecord-xcdroast/Makefile b/sysutils/cdrecord-xcdroast/Makefile
new file mode 100644
index 00000000000..2ab4a079e62
--- /dev/null
+++ b/sysutils/cdrecord-xcdroast/Makefile
@@ -0,0 +1,49 @@
+# $NetBSD: Makefile,v 1.1.1.1 2002/12/02 18:41:20 drochner Exp $
+
+DISTNAME= cdrtools-1.11a40
+PKGNAME= cdrecord-xcdroast098a11-1.10.40
+WRKSRC= ${WRKDIR}/${DISTNAME:C/a.*//}
+CATEGORIES= sysutils
+MASTER_SITES= ftp://ftp.fokus.gmd.de/pub/unix/cdrecord/alpha/
+
+MAINTAINER= lukem@netbsd.org
+HOMEPAGE= http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/cdrecord.html
+COMMENT= cdrecord bits for xcdroast
+
+.include "../../mk/bsd.prefs.mk"
+
+USE_BUILDLINK2= # defined
+USE_GMAKE= # defined
+
+.if ${LOCALBASE} != "/opt/schily"
+BUILDLINK_TRANSFORM= r:-I/opt/schily
+BUILDLINK_TRANSFORM+= r:-L/opt/schily
+.endif
+
+# avoid picking up a bad ${ARCH} during the build
+MAKE_ENV+= ARCH=""
+MAKE_ENV+= MAKEPROG="gmake"
+
+do-configure:
+ cd ${WRKSRC}/RULES; \
+ for suffix in netbsd-cc.rul netbsd-gcc.rul; do \
+ if [ ! -f ${MACHINE}-$$suffix ]; then \
+ ${LN} -sf i386-$$suffix ${MACHINE}-$$suffix; \
+ fi; \
+ done
+
+XCDRTOOLDIR= ${PREFIX}/lib/xcdroast-0.98/bin
+
+do-install:
+ ${INSTALL_DATA_DIR} ${XCDRTOOLDIR}
+ cd ${WRKSRC}/cdda2wav; \
+ ${INSTALL_PROGRAM} OBJ/*/cdda2wav ${XCDRTOOLDIR}
+ cd ${WRKSRC}/cdrecord; \
+ ${INSTALL_PROGRAM} OBJ/*/cdrecord ${XCDRTOOLDIR}
+ cd ${WRKSRC}/mkisofs; \
+ ${INSTALL_PROGRAM} OBJ/*/mkisofs ${XCDRTOOLDIR}
+ cd ${WRKSRC}/readcd; \
+ ${INSTALL_PROGRAM} OBJ/*/readcd ${XCDRTOOLDIR}
+
+.include "../../mk/ossaudio.buildlink2.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/sysutils/cdrecord-xcdroast/PLIST b/sysutils/cdrecord-xcdroast/PLIST
new file mode 100644
index 00000000000..d2eba0ab993
--- /dev/null
+++ b/sysutils/cdrecord-xcdroast/PLIST
@@ -0,0 +1,7 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2002/12/02 18:41:20 drochner Exp $
+lib/xcdroast-0.98/bin/cdda2wav
+lib/xcdroast-0.98/bin/cdrecord
+lib/xcdroast-0.98/bin/mkisofs
+lib/xcdroast-0.98/bin/readcd
+@dirrm lib/xcdroast-0.98/bin
+@dirrm lib/xcdroast-0.98
diff --git a/sysutils/cdrecord-xcdroast/distinfo b/sysutils/cdrecord-xcdroast/distinfo
new file mode 100644
index 00000000000..ab04f822cea
--- /dev/null
+++ b/sysutils/cdrecord-xcdroast/distinfo
@@ -0,0 +1,10 @@
+$NetBSD: distinfo,v 1.1.1.1 2002/12/02 18:41:20 drochner Exp $
+
+SHA1 (cdrtools-1.11a40.tar.gz) = 94f49e3c9f37fbb0c45e3c6eecd02a0e4ba23013
+Size (cdrtools-1.11a40.tar.gz) = 1607133 bytes
+SHA1 (patch-ac) = 52622d8fc4170a9c0310c810badc74bb3b9c9df8
+SHA1 (patch-ah) = 34ecab01125bcac2a28e295b198edce0de8b8777
+SHA1 (patch-ai) = 38f6bc8a9deee6861d5589dcf65dcd4968614457
+SHA1 (patch-aj) = 7e8328ad3478a43cc9311158c30b0acfe48fbb7b
+SHA1 (patch-ba) = 8d7038282ba5a6b133544cc8e440f6e12a475990
+SHA1 (patch-bb) = c5ee1e00e1f8723fe28d4d360bcede7680a7e4b9
diff --git a/sysutils/cdrecord-xcdroast/patches/patch-ac b/sysutils/cdrecord-xcdroast/patches/patch-ac
new file mode 100644
index 00000000000..5d93e493d8f
--- /dev/null
+++ b/sysutils/cdrecord-xcdroast/patches/patch-ac
@@ -0,0 +1,21 @@
+$NetBSD: patch-ac,v 1.1.1.1 2002/12/02 18:41:20 drochner Exp $
+
+--- include/btorder.h.orig Mon Dec 10 10:54:27 2001
++++ include/btorder.h
+@@ -28,6 +28,7 @@
+ #include <sys/types.h> /* try to load isa_defs.h on Solaris */
+ #define _INCL_SYS_TYPES_H
+ #endif
++#include <machine/endian.h>
+
+ #ifndef _MCONFIG_H
+ #include <mconfig.h> /* load bit/byte-oder from xmconfig.h*/
+@@ -108,7 +109,7 @@ error Only one of _BIT_FIELDS_LTOH or _
+ # if defined(__ppc__) || defined(ppc) || defined(__ppc) || \
+ defined(__PPC) || defined(powerpc) || defined(__powerpc__)
+
+-# if defined(__BIG_ENDIAN__)
++# if defined(__BIG_ENDIAN__) || BYTE_ORDER == BIG_ENDIAN
+ # define _BIT_FIELDS_HTOL
+ # else
+ # define _BIT_FIELDS_LTOH
diff --git a/sysutils/cdrecord-xcdroast/patches/patch-ah b/sysutils/cdrecord-xcdroast/patches/patch-ah
new file mode 100644
index 00000000000..ea4a60f955e
--- /dev/null
+++ b/sysutils/cdrecord-xcdroast/patches/patch-ah
@@ -0,0 +1,40 @@
+$NetBSD: patch-ah,v 1.1.1.1 2002/12/02 18:41:20 drochner Exp $
+
+--- cdda2wav/setuid.c.orig Thu Nov 21 16:12:35 2002
++++ cdda2wav/setuid.c Sat Nov 30 18:17:51 2002
+@@ -92,7 +92,7 @@
+
+ if (geteuid() == 0) return; /* nothing to do */
+
+-#if defined _POSIX_SAVED_IDS && defined (HAVE_SETEUID)
++#if defined (HAVE_SETEUID)
+ if (seteuid(effective_uid)) {
+ perror("seteuid in needroot()");
+ exit(PERM_ERROR);
+@@ -126,7 +126,7 @@
+ return;
+ if (geteuid() != 0) return; /* nothing to do */
+
+-#if defined _POSIX_SAVED_IDS && defined (HAVE_SETEUID)
++#if defined (HAVE_SETEUID)
+ if (seteuid(real_uid)) {
+ perror("seteuid in dontneedroot()");
+ exit(PERM_ERROR);
+@@ -186,7 +186,7 @@
+
+ if (getegid() == effective_gid) return; /* nothing to do */
+
+-#if defined _POSIX_SAVED_IDS && defined (HAVE_SETEGID)
++#if defined (HAVE_SETEGID)
+ if (setegid(effective_gid)) {
+ perror("setegid in needgroup()");
+ exit(PERM_ERROR);
+@@ -217,7 +217,7 @@
+ exit(INTERNAL_ERROR);
+ }
+ if (getegid() != effective_gid) return; /* nothing to do */
+-#if defined _POSIX_SAVED_IDS && defined (HAVE_SETEGID)
++#if defined (HAVE_SETEGID)
+ if (setegid(real_gid)) {
+ perror("setegid in dontneedgroup()");
+ exit(PERM_ERROR);
diff --git a/sysutils/cdrecord-xcdroast/patches/patch-ai b/sysutils/cdrecord-xcdroast/patches/patch-ai
new file mode 100644
index 00000000000..a3c6cdcd27a
--- /dev/null
+++ b/sysutils/cdrecord-xcdroast/patches/patch-ai
@@ -0,0 +1,107 @@
+$NetBSD: patch-ai,v 1.1.1.1 2002/12/02 18:41:20 drochner Exp $
+
+--- libscg/scsi-bsd.c.orig Mon Oct 21 15:57:07 2002
++++ libscg/scsi-bsd.c Sat Nov 30 18:20:19 2002
+@@ -48,7 +48,7 @@
+ * Choose your name instead of "schily" and make clear that the version
+ * string is related to a modified source.
+ */
+-LOCAL char _scg_trans_version[] = "scsi-bsd.c-1.41"; /* The version for this transport*/
++LOCAL char _scg_trans_version[] = "scsi-bsd.c-1.41nb1"; /* The version for this transport*/
+
+ #define MAX_SCG 16 /* Max # of SCSI controllers */
+ #define MAX_TGT 16
+@@ -108,7 +108,7 @@
+ * return "schily" for the SCG_AUTHOR request.
+ */
+ case SCG_AUTHOR:
+- return (_scg_auth_schily);
++ return ("frueauf");
+ case SCG_SCCS_ID:
+ return (__sccsid);
+ }
+@@ -140,6 +140,15 @@
+ register int l;
+ register int nopen = 0;
+ char devname[64];
++#if defined(__NetBSD__)
++ struct scsi_addr mysaddr;
++#if defined(__i386__)
++ char slicename[] = "d"; /* i386 is special */
++#else
++ char slicename[] = "c"; /* this is what the rest uses */
++#endif
++ char *myslicename = slicename;
++#endif
+
+ if (busno >= MAX_SCG || tgt >= MAX_TGT || tlun >= MAX_LUN) {
+ errno = EINVAL;
+@@ -166,6 +175,60 @@
+ if ((device != NULL && *device != '\0') || (busno == -2 && tgt == -2))
+ goto openbydev;
+
++
++/*
++ * I know of no method in NetBSD to probe the scsibus and get the mapping
++ * busnumber,target,lun --> devicename.
++ *
++ * Because of this implement a true bruteforce hack to find
++ * out what cdroms there are.
++ *
++ * Note that this method only finds cd0-cd7. Anything higher
++ * than this needs additional tweaks.
++ *
++ * Feel free to implement this cleanly if you have better knowledge.
++ * Until then this helps to get -scanbus und thus xcdroast working :-)
++ *
++ */
++#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);
++ f = open(devname, O_RDWR);
++ if (f >= 0) {
++ if (ioctl(f, SCIOCIDENTIFY, &mysaddr) < 0) {
++ close(f);
++ errno = EINVAL;
++ return (0);
++ }
++ if (busno == SADDR_BUS(mysaddr) && tgt == SADDR_TARGET(mysaddr) && tlun == SADDR_LUN(mysaddr)) {
++ 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);
++ f = open(devname, O_RDWR);
++ if (f >= 0) {
++ if (ioctl(f, SCIOCIDENTIFY, &mysaddr) < 0) {
++ close(f);
++ errno = EINVAL;
++ return (0);
++ }
++ scg_scsibus(scgp) = busno = SADDR_BUS(mysaddr);
++ scg_target(scgp) = tgt = SADDR_TARGET(mysaddr);
++ if ((tlun >= 0) && (tlun != SADDR_LUN(mysaddr))) {
++ close(f);
++ errno = EINVAL;
++ return (0);
++ }
++ scg_lun(scgp) = tlun = SADDR_LUN(mysaddr);
++ if (scg_setup(scgp, f, busno, tgt, tlun))
++ nopen++;
++ }
++ }
++#else /* not __NetBSD__ */
+ if (busno >= 0 && tgt >= 0 && tlun >= 0) {
+
+ js_snprintf(devname, sizeof(devname),
+@@ -202,6 +265,7 @@
+ }
+ }
+ }
++#endif /* end of not __NetBSD__ */
+ /*
+ * Could not open /dev/su-* or got dev=devname:b,l,l / dev=devname:@,l
+ * We do the apropriate tests and try our best.
diff --git a/sysutils/cdrecord-xcdroast/patches/patch-aj b/sysutils/cdrecord-xcdroast/patches/patch-aj
new file mode 100644
index 00000000000..0aaf9363f52
--- /dev/null
+++ b/sysutils/cdrecord-xcdroast/patches/patch-aj
@@ -0,0 +1,25 @@
+$NetBSD: patch-aj,v 1.1.1.1 2002/12/02 18:41:20 drochner Exp $
+
+--- cdrecord/scsi_cdr.c.orig Thu Sep 12 22:39:35 2002
++++ cdrecord/scsi_cdr.c
+@@ -282,6 +282,12 @@ EXPORT int
+ request_sense(scgp)
+ SCSI *scgp;
+ {
++
++#ifdef __NetBSD__
++ /* request sense already done by kernel */
++ scg_prsense((Uchar *)scgp->scmd->u_sense.cmd_sense,
++ scgp->scmd->sense_count);
++#else
+ char sensebuf[CCS_SENSE_LEN];
+ register struct scg_cmd *scmd = scgp->scmd;
+
+@@ -301,6 +307,7 @@ request_sense(scgp)
+ if (scg_cmd(scgp) < 0)
+ return (-1);
+ scg_prsense((Uchar *)sensebuf, CCS_SENSE_LEN - scg_getresid(scgp));
++#endif
+ return (0);
+ }
+
diff --git a/sysutils/cdrecord-xcdroast/patches/patch-ba b/sysutils/cdrecord-xcdroast/patches/patch-ba
new file mode 100644
index 00000000000..619235ca1a5
--- /dev/null
+++ b/sysutils/cdrecord-xcdroast/patches/patch-ba
@@ -0,0 +1,19 @@
+$NetBSD: patch-ba,v 1.1.1.1 2002/12/02 18:41:20 drochner Exp $
+
+--- readcd/readcd.c.orig Fri Sep 20 09:00:12 2002
++++ readcd/readcd.c
+@@ -341,11 +341,11 @@ main(ac, av)
+ /*
+ * We don't need root privilleges anymore.
+ */
+-#ifdef HAVE_SETREUID
+- if (setreuid(-1, getuid()) < 0)
+-#else
+ #ifdef HAVE_SETEUID
+ if (seteuid(getuid()) < 0)
++#else
++#ifdef HAVE_SETREUID
++ if (setreuid(-1, getuid()) < 0)
+ #else
+ if (setuid(getuid()) < 0)
+ #endif
diff --git a/sysutils/cdrecord-xcdroast/patches/patch-bb b/sysutils/cdrecord-xcdroast/patches/patch-bb
new file mode 100644
index 00000000000..c0a74b7344e
--- /dev/null
+++ b/sysutils/cdrecord-xcdroast/patches/patch-bb
@@ -0,0 +1,19 @@
+$NetBSD: patch-bb,v 1.1.1.1 2002/12/02 18:41:20 drochner Exp $
+
+--- mkisofs/mkisofs.c.orig Fri Apr 20 17:45:50 2001
++++ mkisofs/mkisofs.c Mon Aug 6 10:46:21 2001
+@@ -2072,11 +2072,11 @@
+ }
+ }
+ /* We don't need root privilleges anymore. */
+-#ifdef HAVE_SETREUID
+- if (setreuid(-1, getuid()) < 0)
+-#else
+ #ifdef HAVE_SETEUID
+ if (seteuid(getuid()) < 0)
++#else
++#ifdef HAVE_SETREUID
++ if (setreuid(-1, getuid()) < 0)
+ #else
+ if (setuid(getuid()) < 0)
+ #endif