aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/cdrtools-devel
diff options
context:
space:
mode:
authornetchild <netchild@FreeBSD.org>2003-08-20 00:25:47 +0800
committernetchild <netchild@FreeBSD.org>2003-08-20 00:25:47 +0800
commit83611ed5be2f3a2886c4ab731007ededeef71c5b (patch)
tree97e5775af2cf92e030b98629092367633725afd2 /sysutils/cdrtools-devel
parent1bf5d3d9abbc017401255e3c0048df9352b4ccca (diff)
downloadfreebsd-ports-gnome-83611ed5be2f3a2886c4ab731007ededeef71c5b.tar.gz
freebsd-ports-gnome-83611ed5be2f3a2886c4ab731007ededeef71c5b.tar.zst
freebsd-ports-gnome-83611ed5be2f3a2886c4ab731007ededeef71c5b.zip
Add sysutils/cdrtools-devel (currently at version 2.01a18) and
sysutils/mkisofs-devel (currently at version 2.01a17) after repo-copy from sysutils/cdrtools respectively sysutils/mkisofs. The cdrtools-devel and mkisofs-devel ports are for the alpha versions, for further information on changes since cdrtools 2.00 see ftp://ftp.berlios.de/pub/cdrecord/alpha/AN-2.01a01 up to AN-2.01a18. Further changes to the cdrtools-devel and mkisofs-devel ports to relative to the existing ports of cdrtools and mkisofs are: Changes common to cdrtools-devel and mkisofs-devel: - Delete targets for mkisofs and friends when building cdrtools and vice versa to speed up the build of the respective port. - Respect CC already at the configure-stage (Patch taken from the OpenBSD port of cdrtools). - Add patches to prefer seteuid(2) over setreuid(2), this s inconsistend with the cdrtools package (Mostly based on patches from the NetBSD port/pkgsrc of cdrtools). - Manually replace included copies of config.guess and config.sub with versions from ${PORTSDIR}/Templates. This is necessary as the cdrtools package doesn't have a valid configure script in it's root directory but several in sub-directories that are executed by the SING (Schily Is Not Gnu) makefile system further down the road. Therefor the port can't set GNU_CONFIGURE which would automatically copy the relevant files. - Install some relevant READMEs in DOCSDIR (unless NOPORTDOCS is set), some manual pages also reference these. Changes to cdrtools-devel: - Fix COMMENT, this port doesn't install mkisofs. Honor that some tools of the cdrtools package (namely cdda2wav and readcd) are for extracting CDs/CD-R[W]s. - Install scgcheck, a tool to check and validate the ABI of libscg. - Patch cdrecord to use ${PREFIX}/etc as the location of the global configuration file, rather than using /etc/default. The installed documentaion also gets patched accordingly and a PKGMESSAGE reflecting this change as required by the license of cdrtools is added (The idea for this and some wording in the PKGMESSAGE are taken from the NetBSD port/pkgsrc of cdrtools). See also PR ports/50835. - Install a sample configuration file for cdrecord, also install a configuration file if it doesn't already exist (the file doesn't cause problems if one doesn't edit it to suit local needs). - Patch manpages to better correspond to files and locations on FreeBSD. - Add a knob to optionally build and install rcsi, a tool that allows using SCSI-devices over the network. The required rscsi user gets added automatically and templates for the configuration file also get installed. PKGINSTALL points to for further information on how to configure remote access to SCSI-devices. Everything using lib(r)scg can act as a client to rscsi, e.g. sysutils/sformat (requires a bit of patching, however doesn't make much sense to use this over the network) and sysutils/cdrdao (requires a bit of patching). - Remove BSD_SCSI_SENSE_BUG from COPTX (CFLAGS) to libscg. It is a workaround for a (probably alumnus) bug in a SCSI-driver of NetBSD and the affected code doesn't get compiled on neither pre-CAM nor CAM versions of FreeBSD. Changes to mkisofs-devel: - Add MLINKS for devdump.8, isodump.8, isovfy.8 to isoinfo.8. - Install isodebug, a simple tool to display the creation date and the commandline options used to create a certain ISO-image with mkisofs. - Remove apple_driver.8, this tool doesn't get installed. - Replace mkhybrid.8 (just includes mkisofs.8, broken without patching) with a MLINKS to mkisofs.8. - Quiet portlint (3 errors/1 warning -> 0 errors/1 warning). None of these changes is bound to the alpha versions of the cdrtools package and may be "back-ported" to sysutils/cdrtools (apart from a security issue with rscsi of cdrtools 2.00.3). PR: ports/52849 Submitted by (including this commit message): Marius Strobl <marius@alchemy.franken.de>
Diffstat (limited to 'sysutils/cdrtools-devel')
-rw-r--r--sysutils/cdrtools-devel/Makefile167
-rw-r--r--sysutils/cdrtools-devel/distinfo2
-rw-r--r--sysutils/cdrtools-devel/files/patch-README.rscsi45
-rw-r--r--sysutils/cdrtools-devel/files/patch-RULES::rules.cnf12
-rw-r--r--sysutils/cdrtools-devel/files/patch-ad6
-rw-r--r--sysutils/cdrtools-devel/files/patch-cdda2wav::setuid.c38
-rw-r--r--sysutils/cdrtools-devel/files/patch-cdrecord::cdrecord.c17
-rw-r--r--sysutils/cdrtools-devel/files/patch-cdrecord::cdrecord.dfl36
-rw-r--r--sysutils/cdrtools-devel/files/patch-mkisofs::mkisofs.c17
-rw-r--r--sysutils/cdrtools-devel/files/patch-readcd::readcd.c17
-rw-r--r--sysutils/cdrtools-devel/files/patch-rscsi::rscsi.dfl29
-rw-r--r--sysutils/cdrtools-devel/pkg-descr4
-rw-r--r--sysutils/cdrtools-devel/pkg-descr.mkisofs23
-rw-r--r--sysutils/cdrtools-devel/pkg-install.rscsi61
-rw-r--r--sysutils/cdrtools-devel/pkg-plist27
-rw-r--r--sysutils/cdrtools-devel/pkg-plist.mkisofs17
16 files changed, 478 insertions, 40 deletions
diff --git a/sysutils/cdrtools-devel/Makefile b/sysutils/cdrtools-devel/Makefile
index e13ffc537e4b..0f0ee7f7dacf 100644
--- a/sysutils/cdrtools-devel/Makefile
+++ b/sysutils/cdrtools-devel/Makefile
@@ -1,66 +1,169 @@
-# New ports collection makefile for: cdrtools
-# Date created: Wed Jul 25 23:30:19 CEST 2001
-# Whom: Dirk Froemberg <dirk@FreeBSD.org>
+# New ports collection makefile for: cdrtools-devel
+# Date created: 28 May 2003
+# Whom: marius@alchemy.franken.de
#
# $FreeBSD$
#
PORTNAME?= cdrtools
-PORTVERSION?= 2.0.3
+PORTVERSION?= 2.01a18
PORTREVISION?= 0
CATEGORIES?= sysutils audio
-MASTER_SITES= ftp://ftp.berlios.de/pub/cdrecord/ \
- ftp://ftp.cs.tu-berlin.de/pub/misc/cdrecord/ \
- ftp://ftp.gwdg.de/pub/linux/misc/cdrecord/
-DISTNAME= cdrtools-2.00.3
+MASTER_SITES= ftp://ftp.berlios.de/pub/cdrecord/alpha/ \
+ ftp://ftp.cs.tu-berlin.de/pub/misc/cdrecord/alpha/ \
+ ftp://ftp.gwdg.de/pub/linux/misc/cdrecord/alpha/
+PKGNAMESUFFIX= -devel
+DISTNAME= cdrtools-2.01a18
-MAINTAINER= dirk@FreeBSD.org
-COMMENT?= Cdrecord, mkisofs and several other programs to record CD-R[W]
+MAINTAINER= marius@alchemy.franken.de
+COMMENT?= Cdrecord and other programs to extract and record CDs/CD-R[W]s
+
+CONFLICTS?= cdrtools-[0-9]*
+
+NO_LATEST_LINK= yes
.if defined(MKISOFS)
-MAN8= apple_driver.8 isoinfo.8 mkhybrid.8 mkisofs.8
+MAN8= isoinfo.8 mkisofs.8
+MLINKS= isoinfo.8 devdump.8 isoinfo.8 isodump.8 isoinfo.8 isovfy.8 \
+ mkisofs.8 mkhybrid.8
+DOCS= README README.compression README.eltorito README.graft_dirs \
+ README.hfs_boot README.hfs_magic README.hide README.joliet \
+ README.macosx README.mkhybrid README.prep_boot README.rootinfo \
+ README.session README.sort README.sparcboot
.else
-MAN1= cdda2wav.1 cdrecord.1 readcd.1
+MAN1= cdda2wav.1 cdrecord.1 readcd.1 scgcheck.1
+DOCS= README README.DiskT@2 README.FreeBSD README.WORM README.cdplus \
+ README.cdrw README.cdtext README.clone README.copy \
+ README.mkisofs README.multi README.raw README.rscsi \
+ README.sony README.verify
.endif
+USE_BZIP2= yes
USE_GMAKE= yes
-MAKE_ENV= COPTX="-DBSD_SCSI_SENSE_BUG"
-SLAVEDIRS= sysutils/mkisofs
+USE_REINPLACE= yes
+MAKE_ENV= CCOM=${CC}
+WRKSRC= ${WRKDIR}/${DISTNAME:C/a(.+)$//}
+
+.if !defined(MKISOFS)
+.if !defined(WITH_RSCSI)
+PLIST_SUB= RSCSI="@comment "
+.else
+PKGINSTALL= ${PKGDIR}/pkg-install.rscsi
+PLIST_SUB= RSCSI=""
+.endif
+PKGMESSAGE= ${WRKDIR}/pkg-message
+.else
+PKGMESSAGE= ""
+.endif
+
+pre-everything::
+.if !defined(MKISOFS)
+ @${ECHO_MSG} ""
+ @${ECHO_MSG} "You may use the following build option(s):"
+ @${ECHO_MSG} ""
+ @${ECHO_MSG} "WITH_RSCSI=yes builds with rscsi which allows using SCSI-devices over the"
+ @${ECHO_MSG} " network."
+ @${ECHO_MSG} " BEWARE: The rscsi binary gets installed suid root as this is"
+ @${ECHO_MSG} " the preferred method to set it up."
+ @${ECHO_MSG} ""
+.endif
-.if ${MACHINE_ARCH} != "i386"
post-extract:
- ${LN} -sf ${WRKSRC}/RULES/i386-freebsd-cc.rul \
- ${WRKSRC}/RULES/${MACHINE_ARCH}-freebsd-cc.rul
+.for i in config.guess config.sub
+ @${CP} ${PORTSDIR}/Templates/${i} ${WRKSRC}/conf
+ @${CP} ${PORTSDIR}/Templates/${i} ${WRKSRC}/cdda2wav
+.endfor
+.if ${MACHINE_ARCH} != "i386" || ${CC} != "cc"
+ @${LN} -sf ${WRKSRC}/RULES/i386-freebsd-cc.rul \
+ ${WRKSRC}/RULES/${MACHINE_ARCH}-freebsd-${CC}.rul
+.endif
+
+post-patch:
+.if defined(MKISOFS)
+.for i in 45libdeflt 45libedc 45libparanoia 55cdda2wav 55cdrecord 55readcd \
+ 55rscsi 55scgcheck
+ @${RM} ${WRKSRC}/TARGETS/${i}
+.endfor
+.else
+.for i in 45libfile 45libhfs_iso 45libunls 55mkisofs 55mkisofs!@!diag
+ @${RM} ${WRKSRC}/TARGETS/${i}
+.endfor
+.if !defined(WITH_RSCSI)
+ @${RM} ${WRKSRC}/TARGETS/55rscsi
+.endif
+.for i in README.rscsi include/deflts.h cdrecord/cdrecord.1 \
+ cdrecord/cdrecord.dfl cdrecord/defaults.c readcd/readcd.1 \
+ rscsi/rscsi.c rscsi/rscsi.dfl scgcheck/scgcheck.1
+ @${REINPLACE_CMD} -e 's|\/opt\/schily|${PREFIX}|g; \
+ s|\/usr\/local|${PREFIX}|g; s|\/etc\/default|${PREFIX}\/etc|g; \
+ s|\/var\/adm\/messages|\/var\/run\/dmesg.boot|g' ${WRKSRC}/${i}
+.endfor
+ @${SED} 's|%%PREFIX%%|${PREFIX}|g' ${PKGDIR}/pkg-message > \
+ ${WRKDIR}/pkg-message
.endif
do-install:
.if defined(MKISOFS)
@${INSTALL_PROGRAM} ${WRKSRC}/mkisofs/OBJ/${ARCH}-freebsd-cc/mkisofs \
- ${PREFIX}/bin
+ ${PREFIX}/bin
@${LN} -sf mkisofs ${PREFIX}/bin/mkhybrid
- @${INSTALL_PROGRAM} ${WRKSRC}/mkisofs/diag/OBJ/${ARCH}-freebsd-cc/devdump \
- ${PREFIX}/bin
- @${INSTALL_PROGRAM} ${WRKSRC}/mkisofs/diag/OBJ/${ARCH}-freebsd-cc/isodump \
- ${PREFIX}/bin
- @${INSTALL_PROGRAM} ${WRKSRC}/mkisofs/diag/OBJ/${ARCH}-freebsd-cc/isoinfo \
- ${PREFIX}/bin
- @${INSTALL_PROGRAM} ${WRKSRC}/mkisofs/diag/OBJ/${ARCH}-freebsd-cc/isovfy \
- ${PREFIX}/bin
- @${INSTALL_MAN} ${WRKSRC}/mkisofs/apple_driver.8 ${PREFIX}/man/man8
- @${INSTALL_MAN} ${WRKSRC}/mkisofs/diag/isoinfo.8 ${PREFIX}/man/man8
- @${INSTALL_MAN} ${WRKSRC}/mkisofs/mkhybrid.8 ${PREFIX}/man/man8
+.for i in devdump isodebug isodump isoinfo isovfy
+ @${INSTALL_PROGRAM} ${WRKSRC}/mkisofs/diag/OBJ/${ARCH}-freebsd-cc/${i} \
+ ${PREFIX}/bin
+.endfor
@${INSTALL_MAN} ${WRKSRC}/mkisofs/mkisofs.8 ${PREFIX}/man/man8
+ @${INSTALL_MAN} ${WRKSRC}/mkisofs/diag/isoinfo.8 ${PREFIX}/man/man8
+.if !defined(NOPORTDOCS)
+ @${MKDIR} ${DOCSDIR}
+.for i in ${DOCS}
+ @${INSTALL_DATA} ${WRKSRC}/mkisofs/${i} ${DOCSDIR}
+.endfor
+.endif
.else
@${INSTALL_PROGRAM} ${WRKSRC}/cdrecord/OBJ/${ARCH}-freebsd-cc/cdrecord \
- ${PREFIX}/bin
+ ${PREFIX}/bin
@${INSTALL_PROGRAM} ${WRKSRC}/cdda2wav/OBJ/${ARCH}-freebsd-cc/cdda2wav \
- ${PREFIX}/bin
+ ${PREFIX}/bin
@${LN} -sf cdda2wav ${PREFIX}/bin/list_audio_tracks
@${INSTALL_PROGRAM} ${WRKSRC}/readcd/OBJ/${ARCH}-freebsd-cc/readcd \
- ${PREFIX}/bin
+ ${PREFIX}/bin
+.if defined(WITH_RSCSI)
+ @${INSTALL_PROGRAM} ${WRKSRC}/rscsi/OBJ/${ARCH}-freebsd-cc/rscsi \
+ ${PREFIX}/sbin
+ @${CHMOD} u+s ${PREFIX}/sbin/rscsi
+.endif
+ @${INSTALL_PROGRAM} ${WRKSRC}/scgcheck/OBJ/${ARCH}-freebsd-cc/scgcheck \
+ ${PREFIX}/bin
@${INSTALL_MAN} ${WRKSRC}/cdda2wav/cdda2wav.1 ${PREFIX}/man/man1
@${INSTALL_MAN} ${WRKSRC}/cdrecord/cdrecord.1 ${PREFIX}/man/man1
@${INSTALL_MAN} ${WRKSRC}/readcd/readcd.1 ${PREFIX}/man/man1
+ @${INSTALL_MAN} ${WRKSRC}/scgcheck/scgcheck.1 ${PREFIX}/man/man1
+ @${INSTALL_DATA} ${WRKSRC}/cdrecord/cdrecord.dfl \
+ ${PREFIX}/etc/cdrecord.sample
+#.if !exists(${PREFIX}/etc/cdrecord)
+# @${INSTALL_DATA} ${WRKSRC}/cdrecord/cdrecord.dfl ${PREFIX}/etc/cdrecord
+#.endif
+ @if ! [ -f ${PREFIX}/etc/cdrecord ]; then ${INSTALL_DATA} \
+ ${WRKSRC}/cdrecord/cdrecord.dfl ${PREFIX}/etc/cdrecord; fi
+.if defined(WITH_RSCSI)
+ @${INSTALL_DATA} ${WRKSRC}/rscsi/rscsi.dfl ${PREFIX}/etc/rscsi.sample
+#.if !exists(${PREFIX}/etc/rscsi)
+# @${INSTALL_DATA} ${WRKSRC}/rscsi/rscsi.dfl ${PREFIX}/etc/rscsi
+#.endif
+ @if ! [ -f ${PREFIX}/etc/rscsi ]; then ${INSTALL_DATA} \
+ ${WRKSRC}/rscsi/rscsi.dfl ${PREFIX}/etc/rscsi; fi
+.endif
+.if !defined(NOPORTDOCS)
+ @${MKDIR} ${DOCSDIR}
+.for i in ${DOCS}
+ @${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR}
+.endfor
.endif
+.endif
+
+post-install:
+ -@if [ -f ${PKGINSTALL} ]; then ${SETENV} PKG_PREFIX=${PREFIX} \
+ ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL; fi
+ @if [ -f ${WRKDIR}/pkg-message ]; then ${CAT} ${WRKDIR}/pkg-message; fi
.include <bsd.port.mk>
diff --git a/sysutils/cdrtools-devel/distinfo b/sysutils/cdrtools-devel/distinfo
index efd971f6b296..8f93748122a2 100644
--- a/sysutils/cdrtools-devel/distinfo
+++ b/sysutils/cdrtools-devel/distinfo
@@ -1 +1 @@
-MD5 (cdrtools-2.00.3.tar.gz) = c0cdfa2dbe9f4c977b0a71fb08ddff0e
+MD5 (cdrtools-2.01a18.tar.bz2) = 0c6bb3399a2e2b93cfd4c3a777a6d84c
diff --git a/sysutils/cdrtools-devel/files/patch-README.rscsi b/sysutils/cdrtools-devel/files/patch-README.rscsi
new file mode 100644
index 000000000000..abad7914c1f4
--- /dev/null
+++ b/sysutils/cdrtools-devel/files/patch-README.rscsi
@@ -0,0 +1,45 @@
+--- README.rscsi.orig Sun Aug 17 11:31:39 2003
++++ README.rscsi Sun Aug 17 14:38:57 2003
+@@ -18,24 +18,21 @@
+ NOTE: In this case, rscsi must be installed suid root.
+ **** This is the preferred method ****
+
+-To enable remote SCSI via the login shell method you should do the following:
+-
+- - Add an entry to /etc/passwd in the form:
++ The FreeBSD port automatically installs the rscsi binary suid
++ root and creates the user "rscsi".
+
+- rscsi:x:1999:1000:Tape:/export/home/rscsi:/opt/schily/sbin/rscsi
+-
+- (modify this according to your OS). And don't forget to
+- modify /etc/shadow the way it needs to be on your OS.
++To enable remote SCSI via the login shell method you should do the following:
+
+- - Create a home directory for this user and add a .rhosts file
+- to allow access to all users you like.
++ - Make sure that there is an entry for rshd(8) in /etc/inetd.conf
++ and inetd(8) is running.
+
+- - Install rscsi suid root into /opt/schily/sbin
++ - Edit /usr/local/rscsi/.rhosts to allow access to all users you
++ like.
+
+- - Install a file /etc/default/rscsi and define access rights.
++ - Edit /usr/local/etc/rscsi and define access rights.
+ Without this file, rscsi will not work at all.
+
+- The template for this file is: rscsi/rscsi.dfl
++ The template for this file is: /usr/local/etc/rscsi.sample
+
+ RSCSI Security:
+
+@@ -96,7 +93,7 @@
+ information about the remote libscg version used for the connection.
+
+ - To be able to use the remote SCSI client code from win32 you need to create
+- a file /etc/passwd with a corect entry for the user you are on win32.
++ a file /etc/passwd with a correct entry for the user you are on win32.
+ Call 'id' to get the right user id.
+ Note that remote SCSI has not yet been tested on Win32.
+
diff --git a/sysutils/cdrtools-devel/files/patch-RULES::rules.cnf b/sysutils/cdrtools-devel/files/patch-RULES::rules.cnf
new file mode 100644
index 000000000000..f7148061bd95
--- /dev/null
+++ b/sysutils/cdrtools-devel/files/patch-RULES::rules.cnf
@@ -0,0 +1,12 @@
+--- RULES/rules.cnf.orig Sun Jan 27 16:11:31 2002
++++ RULES/rules.cnf Sun Jun 1 18:58:37 2003
+@@ -33,8 +33,7 @@
+ #
+ # Hack until the <mach>-<os>-*cc.rul files are updated
+ #
+-_HCCCOM= $(OARCH:%-gcc=gcc)
+-HCCCOM= $(_HCCCOM:%-cc=cc)
++HCCCOM= $(C_ARCH)
+
+ _CCCOM= $(_UNIQ)$(CCCOM)
+ __CCCOM= $(_CCCOM:$(_UNIQ)=$(HCCCOM))
diff --git a/sysutils/cdrtools-devel/files/patch-ad b/sysutils/cdrtools-devel/files/patch-ad
index da1f89816180..8e7ac09a0fcb 100644
--- a/sysutils/cdrtools-devel/files/patch-ad
+++ b/sysutils/cdrtools-devel/files/patch-ad
@@ -18,8 +18,8 @@
-LDCC= @echo " ==> LINKING \"$@\""; gcc
-DYNLD= @echo " ==> LINKING dynamic library \"$@\""; gcc
-RANLIB= @echo " ==> RANDOMIZING ARCHIVE \"$@\""; ranlib
-+LDCC= $(CC)
-+DYNLD= $(CC)
++LDCC= $(CCOM)
++DYNLD= $(CCOM)
+RANLIB= ranlib
ARFLAGS= cr
LORDER= lorder
@@ -27,5 +27,5 @@
RMDEP= :
-MKDEP= @echo " ==> MAKING DEPENDENCIES \"$@\""; $(RMDEP); gcc -M
-+MKDEP= $(CC) -M
++MKDEP= $(CCOM) -M
MKDEP_OUT=
diff --git a/sysutils/cdrtools-devel/files/patch-cdda2wav::setuid.c b/sysutils/cdrtools-devel/files/patch-cdda2wav::setuid.c
new file mode 100644
index 000000000000..10a95294e55a
--- /dev/null
+++ b/sysutils/cdrtools-devel/files/patch-cdda2wav::setuid.c
@@ -0,0 +1,38 @@
+--- 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/cdrtools-devel/files/patch-cdrecord::cdrecord.c b/sysutils/cdrtools-devel/files/patch-cdrecord::cdrecord.c
new file mode 100644
index 000000000000..123d814e938a
--- /dev/null
+++ b/sysutils/cdrtools-devel/files/patch-cdrecord::cdrecord.c
@@ -0,0 +1,17 @@
+--- cdrecord/cdrecord.c.orig Sat May 31 17:34:37 2003
++++ cdrecord/cdrecord.c Sun Jun 1 16:09:02 2003
+@@ -429,11 +429,11 @@
+ */
+ if (geteuid() != getuid()) { /* AIX does not like to do this */
+ /* If we are not root */
+-#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/cdrtools-devel/files/patch-cdrecord::cdrecord.dfl b/sysutils/cdrtools-devel/files/patch-cdrecord::cdrecord.dfl
new file mode 100644
index 000000000000..3eebcb7bab92
--- /dev/null
+++ b/sysutils/cdrtools-devel/files/patch-cdrecord::cdrecord.dfl
@@ -0,0 +1,36 @@
+--- cdrecord/cdrecord.dfl.orig Mon Aug 18 19:45:45 2003
++++ cdrecord/cdrecord.dfl Mon Aug 18 19:46:32 2003
+@@ -6,7 +6,7 @@
+ #
+ # The default device, if not specified elswhere
+ #
+-CDR_DEVICE=yamaha
++#CDR_DEVICE=yamaha
+
+ #
+ # The default speed, if not specified elswhere
+@@ -21,7 +21,7 @@
+ #
+ # The default FIFO size if, not specified elswhere
+ #
+-CDR_FIFOSIZE=4m
++#CDR_FIFOSIZE=4m
+
+ #
+ # The following definitions allow abstract device names.
+@@ -33,9 +33,9 @@
+ #
+ # drive name device speed fifosize driveropts
+ #
+-teac= 1,3,0 -1 -1 ""
+-panasonic= 1,4,0 -1 -1 ""
+-plextor= 1,4,0 -1 -1 ""
+-sanyo= 1,4,0 -1 -1 burnfree
+-yamaha= 1,5,0 -1 -1 ""
+-cdrom= 0,6,0 2 1m ""
++#teac= 1,3,0 -1 -1 ""
++#panasonic= 1,4,0 -1 -1 ""
++#plextor= 1,4,0 -1 -1 ""
++#sanyo= 1,4,0 -1 -1 burnfree
++#yamaha= 1,5,0 -1 -1 ""
++#cdrom= 0,6,0 2 1m ""
diff --git a/sysutils/cdrtools-devel/files/patch-mkisofs::mkisofs.c b/sysutils/cdrtools-devel/files/patch-mkisofs::mkisofs.c
new file mode 100644
index 000000000000..8e5746748550
--- /dev/null
+++ b/sysutils/cdrtools-devel/files/patch-mkisofs::mkisofs.c
@@ -0,0 +1,17 @@
+--- mkisofs/mkisofs.c.orig Fri Apr 20 17:45:50 2001
++++ mkisofs/mkisofs.c Mon Aug 6 10:46:21 2001
+@@ -2279,11 +2279,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
diff --git a/sysutils/cdrtools-devel/files/patch-readcd::readcd.c b/sysutils/cdrtools-devel/files/patch-readcd::readcd.c
new file mode 100644
index 000000000000..10d9817171c1
--- /dev/null
+++ b/sysutils/cdrtools-devel/files/patch-readcd::readcd.c
@@ -0,0 +1,17 @@
+--- readcd/readcd.c.orig Fri Sep 20 09:00:12 2002
++++ readcd/readcd.c
+@@ -356,11 +356,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
diff --git a/sysutils/cdrtools-devel/files/patch-rscsi::rscsi.dfl b/sysutils/cdrtools-devel/files/patch-rscsi::rscsi.dfl
new file mode 100644
index 000000000000..85eab6940d08
--- /dev/null
+++ b/sysutils/cdrtools-devel/files/patch-rscsi::rscsi.dfl
@@ -0,0 +1,29 @@
+--- rscsi/rscsi.dfl.orig Sun Aug 17 11:50:57 2003
++++ rscsi/rscsi.dfl Sun Aug 17 12:28:46 2003
+@@ -18,14 +18,13 @@
+ # Each USER= entry adds the listed user to the users who may run rscsi
+ #
+ # A typical passwd entry looks like this:
+-# rscsi:x:1999:1000:Remote SCSI:/export/home/rscsi:/opt/schily/sbin/rscsi
++# rscsi:*:99:99::0:0:Remote SCSI:/usr/local/rscsi:/opt/schily/sbin/rscsi
+ #
+-# Add entries for all valid remote users to /export/home/rscsi/.rhosts
++# Add entries for all valid remote users to /usr/local/rscsi/.rhosts
+ #
+ # USER= entries are checked with a pattern matcher. USER=* matches all users.
+ #
+ USER=rscsi
+-USER=joerg
+
+ #
+ # Each ACCESS= entry adds a target or group of targets to the list of visible
+@@ -52,6 +51,6 @@
+ # name name
+ #
+ #ACCESS=rscsi sparky -1 -1 -1 -1
+-ACCESS=rscsi sparky 0 -1 6 -1
+-ACCESS=rscsi sparky 1 -1 3 -1
+-ACCESS=rscsi sparky 1 -1 4 -1
++#ACCESS=rscsi sparky 0 -1 6 -1
++#ACCESS=rscsi sparky 1 -1 3 -1
++#ACCESS=rscsi sparky 1 -1 4 -1
diff --git a/sysutils/cdrtools-devel/pkg-descr b/sysutils/cdrtools-devel/pkg-descr
index 0db4377d8da7..56f8c35183e0 100644
--- a/sysutils/cdrtools-devel/pkg-descr
+++ b/sysutils/cdrtools-devel/pkg-descr
@@ -8,4 +8,8 @@ This package contains the following software:
may be used to read data CD's, to write to DVD-RAM
and to copy Solaris boot CD's
+- scgcheck (checks and validates the ABI of libscg)
+
+- rscsi (allows using SCSI-devices over the network)
+
WWW: http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/cdrecord.html
diff --git a/sysutils/cdrtools-devel/pkg-descr.mkisofs b/sysutils/cdrtools-devel/pkg-descr.mkisofs
index d95bc8559469..97230608b6ee 100644
--- a/sysutils/cdrtools-devel/pkg-descr.mkisofs
+++ b/sysutils/cdrtools-devel/pkg-descr.mkisofs
@@ -1,6 +1,21 @@
-mkisofs is effectively a pre-mastering program to generate the iso9660
-filesystem - it takes a snapshot of a given directory tree, and generates
-a binary image which will correspond to an iso9660 filesystem when written
-to a block device.
+This package contains the following software:
+
+- mkisofs (an ISO-9660 filesystem image creator)
+ It takes a snapshot of a given directory tree, and generates a binary
+ image which will correspond to an iso9660 filesystem when written to
+ a block device.
+
+- mkhybrid (an ISO-9660/HFS filesystem image creator)
+ Link to mkisofs
+
+- several diagnostic programs for ISO-9660
+
+ - devdump dump a device or file in hex
+
+ - isodump dump a device or file based on ISO-9660
+
+ - isoinfo analyze or list an ISO-9660 image
+
+ - isovrfy verify an ISO-9660 image
WWW: http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/cdrecord.html
diff --git a/sysutils/cdrtools-devel/pkg-install.rscsi b/sysutils/cdrtools-devel/pkg-install.rscsi
new file mode 100644
index 000000000000..fe91941c71ae
--- /dev/null
+++ b/sysutils/cdrtools-devel/pkg-install.rscsi
@@ -0,0 +1,61 @@
+#!/bin/sh
+
+PATH=/bin:/usr/sbin:/usr/bin
+
+PKG_PREFIX=${PKG_PREFIX:=/usr/local}
+
+case $2 in
+ PRE-INSTALL)
+ ;;
+
+ POST-INSTALL)
+ USER=rscsi
+ UID=99
+ GROUP=${USER}
+ GID=${UID}
+ UCOMMENT="Remote SCSI"
+ UHOME=${PKG_PREFIX}/rscsi
+ USHELL=${PKG_PREFIX}/sbin/rscsi
+
+ echo "==========================================================================="
+ echo
+
+ if ! pw groupshow "${GROUP}" >/dev/null 2>&1; then
+ if ! pw groupadd ${GROUP} -g ${GID}; then
+ echo "Adding group \"${GROUP}\" failed."
+ exit 1
+ fi
+ fi
+
+ if ! pw usershow "${USER}" >/dev/null 2>&1; then
+ if ! pw useradd ${USER} -u ${UID} -c "${UCOMMENT}" \
+ -d ${UHOME} -g ${GROUP} -s ${USHELL}; then
+ echo "Adding user \"${USER}\" failed."
+ exit 1
+ fi
+ fi
+
+ if ! [ -d ${UHOME} ] ; then
+ mkdir -p ${UHOME}
+ chown ${UID}:${GID} ${UHOME}
+ fi
+
+ if ! [ -f ${UHOME}/.rhosts ] ; then
+ cp /usr/share/skel/dot.rhosts ${UHOME}/.rhosts
+ chown ${UID}:${GID} ${UHOME}/.rhosts
+ chmod 0600 ${UHOME}/.rhosts
+ fi
+
+ echo "See ${PKG_PREFIX}/share/doc/cdrtools/README.rscsi and ${PKG_PREFIX}/etc/rscsi"
+ echo "for further information on how to configure remote access to SCSI-devices"
+ echo "via rscsi."
+
+ if ! grep '^shell' /etc/inetd.conf >/dev/null 2>&1; then
+ echo "Don't forget to add an entry for rshd(8) to /etc/inetd.conf in order to"
+ echo "be able to use the remote SCSI daemon."
+ fi
+
+ echo
+
+ ;;
+esac
diff --git a/sysutils/cdrtools-devel/pkg-plist b/sysutils/cdrtools-devel/pkg-plist
index 208f38dc4336..2550cf5c9397 100644
--- a/sysutils/cdrtools-devel/pkg-plist
+++ b/sysutils/cdrtools-devel/pkg-plist
@@ -2,3 +2,30 @@ bin/cdda2wav
bin/cdrecord
bin/list_audio_tracks
bin/readcd
+bin/scgcheck
+%%RSCSI%%sbin/rscsi
+%%RSCSI%%@exec chmod u+s %B/%f
+@unexec if cmp -s %D/etc/cdrecord %D/etc/cdrecord.sample; then rm -f %D/etc/cdrecord; else echo "If permanently deleting this package, %D/etc/cdrecord must be removed manually."; fi
+etc/cdrecord.sample
+@exec [ -f %B/cdrecord ] || cp %B/%f %B/cdrecord
+%%RSCSI%%@unexec if cmp -s %D/etc/rscsi %D/etc/rscsi.sample; then rm -f %D/etc/rscsi; else echo "If permanently deleting this package, %D/etc/rscsi must be removed manually."; fi
+%%RSCSI%%etc/rscsi.sample
+%%RSCSI%%@exec [ -f %B/rscsi ] || cp %B/%f %B/rscsi
+%%RSCSI%%@unexec if pw usershow rscsi >/dev/null 2>&1; then echo "If permanently deleting this package, user \"rscsi\" and its homedirectory must be removed manually."; fi
+%%RSCSI%%@unexec if pw groupshow rscsi >/dev/null 2>&1; then echo "If permanently deleting this package, group \"rscsi\" must be removed manually."; fi
+%%PORTDOCS%%%%DOCSDIR%%/README
+%%PORTDOCS%%%%DOCSDIR%%/README.DiskT@2
+%%PORTDOCS%%%%DOCSDIR%%/README.FreeBSD
+%%PORTDOCS%%%%DOCSDIR%%/README.WORM
+%%PORTDOCS%%%%DOCSDIR%%/README.cdplus
+%%PORTDOCS%%%%DOCSDIR%%/README.cdrw
+%%PORTDOCS%%%%DOCSDIR%%/README.cdtext
+%%PORTDOCS%%%%DOCSDIR%%/README.clone
+%%PORTDOCS%%%%DOCSDIR%%/README.copy
+%%PORTDOCS%%%%DOCSDIR%%/README.mkisofs
+%%PORTDOCS%%%%DOCSDIR%%/README.multi
+%%PORTDOCS%%%%DOCSDIR%%/README.raw
+%%PORTDOCS%%%%DOCSDIR%%/README.rscsi
+%%PORTDOCS%%%%DOCSDIR%%/README.sony
+%%PORTDOCS%%%%DOCSDIR%%/README.verify
+%%PORTDOCS%%@dirrm %%DOCSDIR%%
diff --git a/sysutils/cdrtools-devel/pkg-plist.mkisofs b/sysutils/cdrtools-devel/pkg-plist.mkisofs
index c3fd0359d9e9..6ceb748b1bb9 100644
--- a/sysutils/cdrtools-devel/pkg-plist.mkisofs
+++ b/sysutils/cdrtools-devel/pkg-plist.mkisofs
@@ -1,6 +1,23 @@
bin/devdump
+bin/isodebug
bin/isodump
bin/isoinfo
bin/isovfy
bin/mkhybrid
bin/mkisofs
+%%PORTDOCS%%%%DOCSDIR%%/README
+%%PORTDOCS%%%%DOCSDIR%%/README.compression
+%%PORTDOCS%%%%DOCSDIR%%/README.eltorito
+%%PORTDOCS%%%%DOCSDIR%%/README.graft_dirs
+%%PORTDOCS%%%%DOCSDIR%%/README.hfs_boot
+%%PORTDOCS%%%%DOCSDIR%%/README.hfs_magic
+%%PORTDOCS%%%%DOCSDIR%%/README.hide
+%%PORTDOCS%%%%DOCSDIR%%/README.joliet
+%%PORTDOCS%%%%DOCSDIR%%/README.macosx
+%%PORTDOCS%%%%DOCSDIR%%/README.mkhybrid
+%%PORTDOCS%%%%DOCSDIR%%/README.prep_boot
+%%PORTDOCS%%%%DOCSDIR%%/README.rootinfo
+%%PORTDOCS%%%%DOCSDIR%%/README.session
+%%PORTDOCS%%%%DOCSDIR%%/README.sort
+%%PORTDOCS%%%%DOCSDIR%%/README.sparcboot
+%%PORTDOCS%%@dirrm %%DOCSDIR%%