summaryrefslogtreecommitdiffstats
path: root/sysutils/cdrdao
diff options
context:
space:
mode:
authornetchild <netchild@FreeBSD.org>2002-11-13 14:05:31 +0000
committernetchild <netchild@FreeBSD.org>2002-11-13 14:05:31 +0000
commit5a4f3619366375de1481a763823268ba8e157274 (patch)
tree9143e7b2eb757cddac9299f554db0d4c1e772695 /sysutils/cdrdao
parenta2e3cc9127b2a9476aac4d22377147ff82726982 (diff)
downloadFreeBSD-ports-5a4f3619366375de1481a763823268ba8e157274.zip
FreeBSD-ports-5a4f3619366375de1481a763823268ba8e157274.tar.gz
- give maintainership from ports to submitter
From submitter: - Remove the devel/pccts BUILD_DEPENDS, there's no need to depend on it as cdrdao ships it's own version (but use the pccts-port if it happens to be installed in order to speed up things). - Add a knob to build toc2mp3 (a tool encode an audio cd-image to a set of mp3 files, see Release-1.1.6), makes this port depend on audio/lame. - Use the FreeBSD INSTALL-macros to install the 4 (5 when building toc2mp3) files that are not yet installed by them, much faster than going through the whole makfile-tree. - Don't install extra documentation when NOPORTDOCS is defined (pkg-plist was already correct). - Remove pkg-message, POSIX scheduling is part of the GENERIC kernel since FreeBSD 4.0-RELEASE and it's options are different for 3-stable, 4-stable and 5.0-current. Therefore it's ugly to explain for what options to check on what FreeBSD-version. Don't install README.FreeBSD for the same reason. - Don't copy a getopt.h to ${WRKSRC}/utils, it's neither required nor gets picked up. - Respect PTHREAD_LIBS, respect CC/CFLAGS when compiling Joerg Schiling's SCSI library (the later is recycled sysutils/cdrtools/files/patch-ad). - Don't build librscg and rscsi (remote-scsi) of the SCSI library, they aren't required by cdrdao and the later fails to link anyway because _somewhere_ in the makefile-tree libcam no longer gets passed forward in $SCSILIB. - Fix compilation on 5.0-current. - Add support for FreeBSD/sparc64. Submitted by: marius@alchemy.franken.de
Diffstat (limited to 'sysutils/cdrdao')
-rw-r--r--sysutils/cdrdao/Makefile66
-rw-r--r--sysutils/cdrdao/files/getopt.h129
-rw-r--r--sysutils/cdrdao/files/patch-configure10
-rw-r--r--sysutils/cdrdao/pkg-comment2
-rw-r--r--sysutils/cdrdao/pkg-descr13
-rw-r--r--sysutils/cdrdao/pkg-message9
-rw-r--r--sysutils/cdrdao/pkg-plist2
7 files changed, 57 insertions, 174 deletions
diff --git a/sysutils/cdrdao/Makefile b/sysutils/cdrdao/Makefile
index 655241a..4ce1362 100644
--- a/sysutils/cdrdao/Makefile
+++ b/sysutils/cdrdao/Makefile
@@ -7,15 +7,17 @@
PORTNAME= cdrdao
PORTVERSION= 1.1.7
-CATEGORIES= audio
+PORTREVISION= 1
+CATEGORIES= sysutils audio
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
EXTRACT_SUFX= .src.tar.gz
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= marius@alchemy.franken.de
-BUILD_DEPENDS= antlr:${PORTSDIR}/devel/pccts \
- dlg:${PORTSDIR}/devel/pccts
+.if defined(WITH_TOC2MP3)
+LIB_DEPENDS= mp3lame.0:${PORTSDIR}/audio/lame
+.endif
USE_REINPLACE= yes
USE_GMAKE= yes
@@ -26,47 +28,67 @@ MAN1= cdrdao.1
.include <bsd.port.pre.mk>
CONFIGURE_TARGET= --build=${ARCH}-portbld-freebsd${OSREL}
-CONFIGURE_ARGS= --with-lame=no \
- --with-gtkmm-prefix=${NONEXISTENT} \
- --with-pcctsbin=${LOCALBASE}/bin \
- --with-pcctsinc=${LOCALBASE}/include/pccts
+CONFIGURE_ARGS= --with-gtkmm-prefix=${NONEXISTENT}
+
+.if exists(${LOCALBASE}/bin/antlr) && exists(${LOCALBASE}/bin/dlg)
+CONFIGURE_ARGS+= --with-pcctsbin=${LOCALBASE}/bin \
+ --with-pcctsinc=${LOCALBASE}/include/pccts
+.endif
.if defined(WITHOUT_SCGLIB) && ${OSVERSION} > 300000
CONFIGURE_ARGS+= --without-scglib
.endif
-.if !defined(WITH_PTHREADS) && ${OSVERSION} > 320000
+.if ${OSVERSION} <= 320000 || ${MACHINE_ARCH} == "sparc64" || \
+ !defined(WITH_PTHREADS)
CONFIGURE_ARGS+= --without-posix-threads
.endif
+.if defined(WITH_TOC2MP3)
+CONFIGURE_ARGS+= --with-lame-include=${LOCALBASE}/include \
+ --with-lame-lib=${LOCALBASE}/lib
+PLIST_SUB= TOC2MP3=""
+.else
+CONFIGURE_ARGS+= --without-lame
+PLIST_SUB= TOC2MP3="@comment "
+.endif
+
pre-everything:
@${ECHO_MSG} ""
- @${ECHO_MSG} "If you don't want to use Joerg Schilling's SCSI library,"
- @${ECHO_MSG} "set WITHOUT_SCGLIB=yes."
+ @${ECHO_MSG} "You may use the following build options:"
@${ECHO_MSG} ""
- @${ECHO_MSG} "If you want to use pthreads, set WITH_PTHREADS=yes."
+ @${ECHO_MSG} "WITHOUT_SCGLIB=yes builds without Joerg Schilling's SCSI library"
+ @${ECHO_MSG} "WITH_PTHREADS=yes enables usage of POSIX threads for the ring buffers"
+ @${ECHO_MSG} "WITH_TOC2MP3=yes builds toc2mp3 (requires audio/lame)"
@${ECHO_MSG} ""
post-extract:
-.if ${MACHINE_ARCH} == "alpha"
+.if ${MACHINE_ARCH} == "alpha" || ${MACHINE_ARCH} == "sparc64"
@(cd ${WRKSRC}/scsilib/RULES; \
- ${LN} -sf i386-freebsd-cc.rul alpha-freebsd-cc.rul)
+ ${LN} -sf i386-freebsd-cc.rul ${MACHINE_ARCH}-freebsd-cc.rul)
.endif
- @${CP} ${FILESDIR}/getopt.h ${WRKSRC}/utils
post-patch:
- @${REINPLACE_CMD} -e 's|-pthread|${PTHREAD_LIBS}|g' ${WRKSRC}/configure
+ @${REINPLACE_CMD} -e 's|-D_THREAD_SAFE|${PTHREAD_CFLAGS}|g; \
+ s|-pthread|${PTHREAD_LIBS}|g' ${WRKSRC}/configure
-post-install:
-.for i in cdrdao toc2cue
- @${STRIP_CMD} ${PREFIX}/bin/${i}
-.endfor
+do-install:
+ @${INSTALL_PROGRAM} ${WRKSRC}/dao/cdrdao ${PREFIX}/bin/cdrdao
+ @${INSTALL_PROGRAM} ${WRKSRC}/utils/toc2cue ${PREFIX}/bin/toc2cue
+.if defined(WITH_TOC2MP3)
+ @${INSTALL_PROGRAM} ${WRKSRC}/utils/toc2mp3 ${PREFIX}/bin/toc2mp3
+.endif
+ @${MKDIR} ${DATADIR}
+ @${INSTALL_DATA} ${WRKSRC}/dao/cdrdao.drivers ${DATADIR}/drivers
+ @${INSTALL_MAN} ${WRKSRC}/dao/cdrdao.man ${PREFIX}/man/man1/cdrdao.1
+
+.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
-.for i in CREDITS INSTALL README README.FreeBSD README.PlexDAE \
+.for i in CREDITS INSTALL README README.PlexDAE \
Release-1.1.0 Release-1.1.2 Release-1.1.3 Release-1.1.4 \
Release-1.1.5 Release-1.1.6 Release-1.1.7
@${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR}
.endfor
- @${CAT} ${PKGMESSAGE}
+.endif
.include <bsd.port.post.mk>
diff --git a/sysutils/cdrdao/files/getopt.h b/sysutils/cdrdao/files/getopt.h
deleted file mode 100644
index 4ac33b7..0000000
--- a/sysutils/cdrdao/files/getopt.h
+++ /dev/null
@@ -1,129 +0,0 @@
-/* Declarations for getopt.
- Copyright (C) 1989, 90, 91, 92, 93, 94 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the
- Free Software Foundation; either version 2, or (at your option) any
- later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
-
-#ifndef _GETOPT_H
-#define _GETOPT_H 1
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* For communication from `getopt' to the caller.
- When `getopt' finds an option that takes an argument,
- the argument value is returned here.
- Also, when `ordering' is RETURN_IN_ORDER,
- each non-option ARGV-element is returned here. */
-
-extern char *optarg;
-
-/* Index in ARGV of the next element to be scanned.
- This is used for communication to and from the caller
- and for communication between successive calls to `getopt'.
-
- On entry to `getopt', zero means this is the first call; initialize.
-
- When `getopt' returns EOF, this is the index of the first of the
- non-option elements that the caller should itself scan.
-
- Otherwise, `optind' communicates from one call to the next
- how much of ARGV has been scanned so far. */
-
-extern int optind;
-
-/* Callers store zero here to inhibit the error message `getopt' prints
- for unrecognized options. */
-
-extern int opterr;
-
-/* Set to an option character which was unrecognized. */
-
-extern int optopt;
-
-/* Describe the long-named options requested by the application.
- The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector
- of `struct option' terminated by an element containing a name which is
- zero.
-
- The field `has_arg' is:
- no_argument (or 0) if the option does not take an argument,
- required_argument (or 1) if the option requires an argument,
- optional_argument (or 2) if the option takes an optional argument.
-
- If the field `flag' is not NULL, it points to a variable that is set
- to the value given in the field `val' when the option is found, but
- left unchanged if the option is not found.
-
- To have a long-named option do something other than set an `int' to
- a compiled-in constant, such as set a value from `optarg', set the
- option's `flag' field to zero and its `val' field to a nonzero
- value (the equivalent single-letter option character, if there is
- one). For long options that have a zero `flag' field, `getopt'
- returns the contents of the `val' field. */
-
-struct option
-{
-#if defined (__STDC__) && __STDC__
- const char *name;
-#else
- char *name;
-#endif
- /* has_arg can't be an enum because some compilers complain about
- type mismatches in all the code that assumes it is an int. */
- int has_arg;
- int *flag;
- int val;
-};
-
-/* Names for the values of the `has_arg' field of `struct option'. */
-
-#define no_argument 0
-#define required_argument 1
-#define optional_argument 2
-
-#if defined (__STDC__) && __STDC__
-#ifdef __GNU_LIBRARY__
-/* Many other libraries have conflicting prototypes for getopt, with
- differences in the consts, in stdlib.h. To avoid compilation
- errors, only prototype getopt for the GNU C library. */
-extern int getopt (int argc, char *const *argv, const char *shortopts);
-#else /* not __GNU_LIBRARY__ */
-extern int getopt ();
-#endif /* __GNU_LIBRARY__ */
-extern int getopt_long (int argc, char *const *argv, const char *shortopts,
- const struct option *longopts, int *longind);
-extern int getopt_long_only (int argc, char *const *argv,
- const char *shortopts,
- const struct option *longopts, int *longind);
-
-/* Internal only. Users should not call this directly. */
-extern int _getopt_internal (int argc, char *const *argv,
- const char *shortopts,
- const struct option *longopts, int *longind,
- int long_only);
-#else /* not __STDC__ */
-extern int getopt ();
-extern int getopt_long ();
-extern int getopt_long_only ();
-
-extern int _getopt_internal ();
-#endif /* __STDC__ */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _GETOPT_H */
diff --git a/sysutils/cdrdao/files/patch-configure b/sysutils/cdrdao/files/patch-configure
index 100da92..15c0ed8 100644
--- a/sysutils/cdrdao/files/patch-configure
+++ b/sysutils/cdrdao/files/patch-configure
@@ -18,7 +18,15 @@
scsi_if_src="ScsiIf-freebsd-cam.cc"
scsilib_libs="-lcam"
;;
-@@ -6164,7 +6164,7 @@
+@@ -6149,7 +6149,6 @@
+ case "$host" in
+ *-freebsd*)
+ if test "$use_pthreads" = yes; then
+- mydefs="-pthread $mydefs"
+ LDFLAGS="-pthread $LDFLAGS"
+ thread_libs=""
+ fi
+@@ -6164,7 +6163,7 @@
esac
case "$host" in
diff --git a/sysutils/cdrdao/pkg-comment b/sysutils/cdrdao/pkg-comment
index 224c01a..51cf494 100644
--- a/sysutils/cdrdao/pkg-comment
+++ b/sysutils/cdrdao/pkg-comment
@@ -1 +1 @@
-Write audio CD-Rs in disk-at-once mode
+Record CD-R[W]s in disk-at-once mode
diff --git a/sysutils/cdrdao/pkg-descr b/sysutils/cdrdao/pkg-descr
index a2d2282..7da1f0f 100644
--- a/sysutils/cdrdao/pkg-descr
+++ b/sysutils/cdrdao/pkg-descr
@@ -1,13 +1,4 @@
-Writes audio CD-Rs in disc-at-once (DAO) mode allowing control over pre-gaps
-(length down to 0, nonzero audio data) and sub-channel information like ISRC
-codes. All data that is written to the disc must be specified with a text
-file. Audio data may be in WAVE or raw format.
-
- Andreas Mueller <mueller@daneb.ping.de>
-
-Note:
-Cdrdao requires kernel with "options SYSVSHM" and "options SYSVMSG".
+Cdrdao records audio or data CD-R[W]s in disc-at-once (DAO) mode based on
+textual description of the CD contents (toc-file).
WWW: http://cdrdao.sourceforge.net/
-
- -- Yasuhito FUTATSUKI <futatuki@debug.gr.jp>
diff --git a/sysutils/cdrdao/pkg-message b/sysutils/cdrdao/pkg-message
deleted file mode 100644
index 2f212ab..0000000
--- a/sysutils/cdrdao/pkg-message
+++ /dev/null
@@ -1,9 +0,0 @@
-Note:
- * If you want to use POSIX schedule mechanism, you must include
-
- options "P1003_1B"
- options "_KPOSIX_PRIORITY_SCHEDULING"
- options "_KPOSIX_VERSION=199309L"
-
- in your kernel configuration. These options are required by POSIX thread
- control functions.
diff --git a/sysutils/cdrdao/pkg-plist b/sysutils/cdrdao/pkg-plist
index 36ddd43..69186bd 100644
--- a/sysutils/cdrdao/pkg-plist
+++ b/sysutils/cdrdao/pkg-plist
@@ -1,10 +1,10 @@
bin/cdrdao
bin/toc2cue
+%%TOC2MP3%%bin/toc2mp3
share/cdrdao/drivers
%%PORTDOCS%%share/doc/cdrdao/CREDITS
%%PORTDOCS%%share/doc/cdrdao/INSTALL
%%PORTDOCS%%share/doc/cdrdao/README
-%%PORTDOCS%%share/doc/cdrdao/README.FreeBSD
%%PORTDOCS%%share/doc/cdrdao/README.PlexDAE
%%PORTDOCS%%share/doc/cdrdao/Release-1.1.0
%%PORTDOCS%%share/doc/cdrdao/Release-1.1.2
OpenPOWER on IntegriCloud