summaryrefslogtreecommitdiff
path: root/audio/abcde
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2003-06-10 06:29:06 +0000
committerwiz <wiz@pkgsrc.org>2003-06-10 06:29:06 +0000
commit10f7a5f58346529c1858ddbda378874f2617c216 (patch)
treec4f3d150943a3f4bf8af141c6011bd451bcec521 /audio/abcde
parentd60c936e59b67149a9f90ede4627f64be6c20d35 (diff)
downloadpkgsrc-10f7a5f58346529c1858ddbda378874f2617c216.tar.gz
Update to 2.1.4, from Juan RP in PR 21671:
abcde 2.1.4: * Small bug fixes: + COMMENT should work now. + Aesthetic padding on the total amount of tracks. + CDROM typo + CDROM is now checked after reading the user defined entries. * Remove trailing args from $EDITOR when checking -x: Closes #179222. abcde 2.1.3 * Makefile was missing cddb-tool.1. * Introduced dagrab as CD ripping utility. * cddb-tool seq calls converted to functions. No more distro dependencies. * WGET* variables converted to HTTPGET* variables. FreeBSD can safelly use fetch. * More FreeBSD specific bits: CDROM and EJECT changes. * Typo in abcde.conf * Added CDDBPROTO for specifying the protocol level of the cddb query. * CDDB protocol upgraded to 5. CDYEAR and CDGENRE are now used for CD tagging. * COMMENT is now used for inline tagging with oggenc (my mistake it was missing): Closes: #191475. abcde 2.1.2 * Documentation updates: Closes: #186230. * Usual set of bug fixes and corrections. * Default behaviour of VAOUTPUTFORMAT output changed to avoid multiple directories for a same album. I think the format is more logical, and you can always split the files once they are created. * Padding track wavs with 0 so if you want to burn those wavs just cdrecord *.wav will do it. Use "-p" to force it when encoding a small (<9) number of files (Closes: #111627). * Added "KEEPWAVS" as a variable to keep those wavs. Default is "no". Can use also "-k" in the command line. (Closes: #160372). This probably should be changed with an option to move the wav files to another directory instead of just keep de abcde.<cdid> directory. * Added documentation comments about OUTPUTTYPE (Closes: #184963). * abcde.conf cleanup: (Closes: #186230, #187400). abcde 2.1.0-3 * Since abcde does not depend on eject, an execution test ([-x]) was added, but that means abcde needs a test for eject in the patch if -x is passed: Closes: #184151. * Merged some more bits from Marc 'HE' Brockschmidt: Closes: #126289. * A bit of more info in abcde.conf: Closes: #184963. * cddb-tool version updated to 0.4.2 abcde 2.1.0-2 * Old version string left behind. Updated. * Few more doc update bits. * Patches from Marc 'HE' Brockschmidt: Closes: #149499. * Small patch from Norbert Preining to support multiple output in the output directory. * cddb-tool parses CDYEAR with the help of awk: Closes: #114848. * cddb-tool does not globe "*" characters anymore: Closes: #157448. abcde 2.1.0 * The infamous "Works for me(TM)" and "Time to release" release. + We preppend track number now: Closes: #128966. + Itegrate flac: Closes: #126311. + Multi-format encode: Closes: #148934. + Gapless lame encoding: Closes: #172696. + CDROM documented: Closes: #182403. * Applied OpenBSD patches to make the script more portable. Thanks to Han Boetes. * Documentation fixes: closes: #100844, #136741. * NetBSD patches applied: - EXPERIMENTAL Normalize and Batch support. - EXPERIMENTAL FLAC support. * EXPERIMENTAL multiple output support: + multiple output and error checking + multiple lists support * Default output file changed to have the $track_number in the begining. * abcde takeover.
Diffstat (limited to 'audio/abcde')
-rw-r--r--audio/abcde/Makefile9
-rw-r--r--audio/abcde/distinfo11
-rw-r--r--audio/abcde/patches/patch-aa164
-rw-r--r--audio/abcde/patches/patch-ac528
-rw-r--r--audio/abcde/patches/patch-ad36
5 files changed, 38 insertions, 710 deletions
diff --git a/audio/abcde/Makefile b/audio/abcde/Makefile
index a84c2d18cbf..a9c07c4f877 100644
--- a/audio/abcde/Makefile
+++ b/audio/abcde/Makefile
@@ -1,9 +1,8 @@
-# $NetBSD: Makefile,v 1.10 2003/01/01 19:06:01 kim Exp $
+# $NetBSD: Makefile,v 1.11 2003/06/10 06:29:06 wiz Exp $
-DISTNAME= abcde-2.0.3
-PKGREVISION= 3
+DISTNAME= abcde-2.1.4
CATEGORIES= audio
-MASTER_SITES= http://frantica.lly.org/~rcw/abcde/
+MASTER_SITES= http://www.hispalinux.es/~data/files/
DISTFILES= ${DISTNAME:S/-/_/}.orig.tar.gz
MAINTAINER= lukem@netbsd.org
@@ -24,7 +23,7 @@ MESSAGE_SUBST+= EGDIR=${EGDIR}
MESSAGE_SUBST+= PKG_SYSCONFDIR=${PKG_SYSCONFDIR}
pre-configure:
- @cd ${WRKSRC} && for f in abcde abcde.1; do \
+ @cd ${WRKSRC} && for f in abcde; do \
${SED} "s,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR}," \
$$f > $$f.tmp && \
${MV} $$f.tmp $$f; \
diff --git a/audio/abcde/distinfo b/audio/abcde/distinfo
index 6a2f0216ad1..a7a3cee65f4 100644
--- a/audio/abcde/distinfo
+++ b/audio/abcde/distinfo
@@ -1,8 +1,7 @@
-$NetBSD: distinfo,v 1.13 2003/01/01 19:06:01 kim Exp $
+$NetBSD: distinfo,v 1.14 2003/06/10 06:29:06 wiz Exp $
-SHA1 (abcde_2.0.3.orig.tar.gz) = 66a7620a835baee29296f4d5e9322bb1679baa49
-Size (abcde_2.0.3.orig.tar.gz) = 35655 bytes
-SHA1 (patch-aa) = 262ab12dfe094f1fc50c5fa4ca19ab73a8b6541a
+SHA1 (abcde_2.1.4.orig.tar.gz) = 0d00d1ab462f38c449b575b17828bdc20c35ca65
+Size (abcde_2.1.4.orig.tar.gz) = 42945 bytes
SHA1 (patch-ab) = 524452b3930c25351deee7a508f98bcd0f51a872
-SHA1 (patch-ac) = 59eccd903d65fe3834d9d728d69dca3c238a7f9e
-SHA1 (patch-ad) = b37aebe39a003da917d7b192e9169af4c2d17115
+SHA1 (patch-ac) = 101e3af34fbc293adb3b488135c492c581f5b1c8
+SHA1 (patch-ad) = ba67c560aa493658a106e4c2a0356739054c8888
diff --git a/audio/abcde/patches/patch-aa b/audio/abcde/patches/patch-aa
deleted file mode 100644
index 1265e61a5e3..00000000000
--- a/audio/abcde/patches/patch-aa
+++ /dev/null
@@ -1,164 +0,0 @@
-$NetBSD: patch-aa,v 1.7 2003/01/01 19:06:02 kim Exp $
-
---- abcde.1.orig Mon Aug 20 21:22:33 2001
-+++ abcde.1 Wed Jan 1 14:00:54 2003
-@@ -1,6 +1,6 @@
- .TH ABCDE 1
- .SH NAME
--abcde \- Grab an entire CD and compress it to Ogg or MP3 format.
-+abcde \- Grab an entire CD and compress it to Ogg, MP3 or FLAC format.
- .SH SYNOPSIS
- .B abcde
- .I [options] [tracks]
-@@ -19,7 +19,7 @@
- Grab a track from your CD
- .TP
- .B *
--Compress it to Ogg or MP3 format
-+Compress it to Ogg, MP3 or FLAC format
- .TP
- .B *
- Comment or ID3 tag it
-@@ -36,13 +36,17 @@
- .TP
- .B \-a [actions]
- Comma-delimited list of actions to perform. Can be one or more of:
--cddb, read, encode, tag, move, playlist, clean. Encode implies read. Tag implies
--cddb, read, encode. Move implies cddb, read, encode, tag. Playlist implies
--cddb. The default is to do all actions except playlist.
-+cddb, read, normalize, encode, tag, move, playlist, clean. Normalize
-+and encode imply read. Tag implies cddb, read, encode. Move implies
-+cddb, read, encode, tag. Playlist implies cddb. The default is to
-+do all actions except normalize and playlist.
-+.TP
-+.B \-b
-+Enable batch mode normalization. See the BATCH configuration variable.
- .TP
- .B \-c [filename]
- Specifies an additional configuration file to parse. Configuration options
--in this file override those in /etc/abcde.conf or $HOME/.abcde.conf.
-+in this file override those in @PKG_SYSCONFDIR@/abcde.conf or $HOME/.abcde.conf.
- .TP
- .B \-C [discid]
- Allows you to resume a session for
-@@ -66,7 +70,7 @@
- Use the low-diskspace algorithm. See the LOWDISK configuration variable.
- .TP
- .B \-o [filetype]
--Select output type. Can be either "ogg" or "mp3". See the OUTPUTTYPE
-+Select output type. Can be "ogg", "mp3" or "flac". See the OUTPUTTYPE
- configuration variable.
- .TP
- .B \-r [hosts...]
-@@ -87,11 +91,12 @@
- .SH OUTPUT
- Each track is, by default, placed in a separate file named after the track
- in a subdirectory named after the artist under the current directory. Each
--file is given an extension identifying its compression format, '.ogg'
--or '.mp3'. This can be modified using the OUTPUTFORMAT and VAOUTPUTFORMAT
-+file is given an extension identifying its compression format, '.ogg',
-+'.mp3', or '.flac'.
-+This can be modified using the OUTPUTFORMAT and VAOUTPUTFORMAT
- variables in your abcde.conf.
- .SH CONFIGURATION
--abcde sources two configuration files on startup - /etc/abcde.conf and
-+abcde sources two configuration files on startup - @PKG_SYSCONFDIR@/abcde.conf and
- $HOME/.abcde.conf, in that order. Here is a list of options abcde recognizes:
- .TP
- .B CDDBURL
-@@ -100,10 +105,15 @@
- .B ENCODERSYNTAX
- Specifies the style of encoder to use. Valid options are \'oggenc\' (default
- for Ogg Vorbis), \'vorbize\', \'lame\' (default for MP3), \'gogo\', \'bladeenc\',
--\'l3enc\', and \'mp3enc\'. This affects the default location of the binary,
-+\'l3enc\', \'mp3enc\' and \'flac\' (default for FLAC).
-+This affects the default location of the binary,
- the variable to pick encoder command-line options from, and where the options
- are given.
- .TP
-+.B NORMALIZERSYNTAX
-+Specifies the style of normalizer to use. Valid options are \'default\'
-+and \'normalize'\ (and both run \'normalize\').
-+.TP
- .B HELLOINFO
- Specifies the Hello information to send to the CDDB server. The CDDB
- protocol requires you to send a valid username and hostname each time you
-@@ -118,7 +128,8 @@
- over 100MB for a machine that can encode music as fast as it can read it).
- .TP
- .B OUTPUTFORMAT
--Specifies the format for completed Ogg or MP3 filenames. Variables are included
-+Specifies the format for completed Ogg, MP3 or FLAC filenames.
-+Variables are included
- using standard shell syntax. Allowed variables are ALBUMFILE, ARTISTFILE,
- TRACKFILE, and TRACKNUM. Default is
- \'${ARTISTFILE}/${TRACKFILE}.${OUTPUTTYPE}\'.
-@@ -127,8 +138,8 @@
- .TP
- .B OUTPUTTYPE
- Specifies the encoding format to output as well as the default extension and
--encoder. Defaults to "ogg". Valid settings are "ogg" (Ogg Vorbis) and "mp3"
--(MPEG-1 Audio Layer 3).
-+encoder. Defaults to "ogg". Valid settings are "ogg" (Ogg Vorbis), "mp3"
-+(MPEG-1 Audio Layer 3) and "flac" (FLAC).
- .TP
- .B VAOUTPUTFORMAT
- Just like OUTPUTFORMAT but for Various Artists discs. Default is whatever
-@@ -137,15 +148,15 @@
- .B PATHNAMES
- The following configuration file options specify the pathnames of their
- respective utilities: LAME, GOGO, BLADEENC, L3ENC, XINGMP3ENC, MP3ENC,
--VORBIZE, OGGENC, ID3, ID3V2, CDPARANOIA, CDDA2WAV, WGET, CDDISCID,
--CDDBTOOL, EJECT, DISTMP3, and VORBISCOMMENT.
-+VORBIZE, OGGENC, FLAC, ID3, ID3V2, CDPARANOIA, CDDA2WAV, WGET, CDDISCID,
-+CDDBTOOL, EJECT, NORMALIZE, DISTMP3, and VORBISCOMMENT.
- .TP
- .B COMMAND-LINE OPTIONS
- If you wish to specify command-line options to any of the programs abcde
- uses, set the following configuration file options: LAMEOPTS, GOGOOPTS,
- BLADEENCOPTS, L3ENCOPTS, XINGMP3ENCOPTS, MP3ENCOPTS, VORBIZEOPTS,
--OGGENCOPTS, ID3OPTS, ID3V2OPTS, CDPARANOIAOPTS, CDDA2WAVOPTS, WGETOPTS,
--CDDBTOOLOPTS, EJECTOPTS, and DISTMP3OPTS.
-+OGGENCOPTS, FLACOPTS, ID3OPTS, ID3V2OPTS, CDPARANOIAOPTS, CDDA2WAVOPTS, WGETOPTS,
-+CDDBTOOLOPTS, EJECTOPTS, NORMALIZEOPTS, and DISTMP3OPTS.
- .TP
- .B MAXPROCS
- Defines how many encoders to run at once. This makes for huge speedups
-@@ -159,6 +170,11 @@
- entire CD. Use only if your system is low on space and cannot encode as
- quickly as it can read.
- .TP
-+.B BATCH
-+If set to y, enables batch mode normalization, which preserves relative
-+volume differences between tracks of an album. Also enables nogap encoding
-+when using the \'lame\' encoder.
-+.TP
- .B PLAYLISTFORMAT
- Specifies the format for completed playlist filenames. Works like the
- OUTPUTFORMAT configuration variable. Default is
-@@ -197,7 +213,7 @@
- abcde requires the following backend tools to work:
- .TP
- .B *
--An Ogg or MP3 Encoder (oggenc, vorbize, lame, gogo, bladeenc, l3enc, mp3enc)
-+An Ogg, MP3 or FLAC Encoder (oggenc, vorbize, lame, gogo, bladeenc, l3enc, mp3enc, flac)
- .TP
- .B *
- An audio CD reading utility (cdparanoia, cdda2wav)
-@@ -213,11 +229,16 @@
- .TP
- .B *
- (optional) distmp3, a client/server for distributed mp3 encoding.
-+.TP
-+.B *
-+(optional) normalize, a WAV file volume normalizer
- .SH "SEE ALSO"
- .BR cdparanoia (1),
- .BR cdda2wav (1),
-+.BR normalize (1),
- .BR oggenc (1),
- .BR vorbize (1),
-+.BR flac (1),
- .BR id3 (1),
- .BR wget (1),
- .BR cd-discid (1),
diff --git a/audio/abcde/patches/patch-ac b/audio/abcde/patches/patch-ac
index ad30b31dd4f..ad04e97d264 100644
--- a/audio/abcde/patches/patch-ac
+++ b/audio/abcde/patches/patch-ac
@@ -1,525 +1,27 @@
-$NetBSD: patch-ac,v 1.10 2003/01/01 19:06:02 kim Exp $
+$NetBSD: patch-ac,v 1.11 2003/06/10 06:29:07 wiz Exp $
---- abcde.orig Mon Jan 28 00:44:02 2002
-+++ abcde Wed Jan 1 13:50:59 2003
-@@ -17,7 +17,8 @@
- echo "This is abcde v$VERSION."
- echo "Usage: abcde [options] [tracks]"
- echo "Options:"
--echo "-a Specify actions to perform (cddb,read,encode,tag,move,playlist,clean)"
-+echo "-a Actions to perform (cddb,read,normalize,encode,tag,move,playlist,clean)"
-+echo "-b Batch mode: enable album normalization and nogap encoding"
- echo "-c Specify a configuration file (overrides system and user config files)"
- echo "-C Specify discid to resume from (only needed if you no longer have the cd)"
- echo "-d Specify CDROM device to grab"
-@@ -27,7 +28,7 @@
- echo "-l Use low disk space algorithm"
- echo "-n No lookup. Don't query CDDB, just create and use template"
- echo "-N Noninteractive. Never prompt for anything"
--echo "-o Output file type - either \"ogg\" or \"mp3\""
-+echo "-o Output file type - either \"ogg\", \"mp3\"" or \"flac\"
- echo "-r [host1,host2...] Also encode on these remote hosts"
- echo "-x Eject CD after all tracks are read"
- echo "Tracks is a space-delimited list of tracks to grab."
-@@ -101,6 +102,14 @@
- RETURN=$?
- fi
- fi
-+ case "$1" in
-+ normalize)
-+ if [ "$RETURN" = "2" ]; then
-+ # File was already normalized.
-+ RETURN=0
-+ fi
-+ ;;
-+ esac
- if [ "$RETURN" != "0" ]; then
- # Put an error in the errors file. For various reasons we
- # can't capture a copy of the program's output but we can
-@@ -206,6 +215,11 @@
- TRACKARTIST="$(echo $DTITLEARTIST | cut -f1 -d~)"
- TRACKNAME="$(echo $DTITLEARTIST | cut -f2 -d~)"
- ;;
-+ trailing-paren)
-+ DTITLEARTIST="$(echo $TRACKNAME | sed 's,^\(.*\) (\(.*\)),\1~\2,')"
-+ TRACKARTIST="$(echo $DTITLEARTIST | cut -f2 -d~)"
-+ TRACKNAME="$(echo $DTITLEARTIST | cut -f1 -d~)"
-+ ;;
- esac
- else
- TRACKARTIST=$DARTIST
-@@ -221,7 +235,8 @@
- {
- COMMENTOUTPUT="$(eval echo ${COMMENT})"
- run_command '' echo "Tagging track $1 of $TRACKS: $TRACKNAME..."
-- if [ "$OUTPUTTYPE" = "mp3" ]; then
-+ case "$OUTPUTTYPE" in
-+ mp3)
- # Amazingly, id3 and id3v2 have identical -a, -A, -c, -t, and -T switches
- # ...except id3v2's -c is completely broken (there's a bug in id3lib
- # v3.7.x keeping -c from being properly implemented)
-@@ -232,7 +247,8 @@
- run_command tagtrack-$1 $TAGGER $TAGGEROPTS -c "$COMMENTOUTPUT" \
- -A "$DALBUM" -a "$TRACKARTIST" -t "$TRACKNAME" -T "$1" "$ABCDETEMPDIR/track$1.$OUTPUTTYPE"
- fi
-- else
-+ ;;
-+ ogg)
- # vorbiscomment can't do in-place modification, mv the file first
- if [ -f "$ABCDETEMPDIR/track$1.$OUTPUTTYPE" -a ! -f "$ABCDETEMPDIR/track$1.uncommented.$OUTPUTTYPE" ]; then
- mv "$ABCDETEMPDIR/track$1.$OUTPUTTYPE" "$ABCDETEMPDIR/track$1.uncommented.$OUTPUTTYPE"
-@@ -254,7 +270,48 @@
- else
- mv "$ABCDETEMPDIR/track$1.uncommented.$OUTPUTTYPE" "$ABCDETEMPDIR/track$1.$OUTPUTTYPE"
- fi
-- fi
-+ ;;
-+ flac)
-+ run_command tagtrack-$1 true
-+ ;;
-+ esac
-+}
-+
-+# do_batch_encode
-+# variables used:
-+# OUTPUTTYPE, ENCODERSYNTAX, ENCNICE, ENCODER, ENCODEROPTS
-+do_batch_encode ()
-+{
-+ # The commands here don't go through run_command because they're never supposed to be silenced
-+ echo "Batch encoding tracks: $TRACKQUEUE"
-+ case "$OUTPUTTYPE" in
-+ mp3)
-+ case "$ENCODERSYNTAX" in
-+ lame)
-+ (
-+ cd "$ABCDETEMPDIR"
-+ TRACKFILES=
-+ for UTRACKNUM in $TRACKQUEUE
-+ do
-+ TRACKFILES="$TRACKFILES track$UTRACKNUM.wav"
-+ done
-+ nice $ENCNICE $ENCODER $ENCODEROPTS --nogap $TRACKFILES
-+ RETURN=$?
-+ if [ "$RETURN" != "0" ]; then
-+ echo "batch-encode: $ENCODER returned code $RETURN" >> errors
-+ else
-+ for UTRACKNUM in $TRACKQUEUE
-+ do
-+ echo encodetrack-$UTRACKNUM >> status
-+ done
-+ fi
-+ )
-+ ;;
-+ esac
-+ ;;
-+ esac
-+ # Other encoders fall through to normal encoding as the tracks
-+ # have not been entered in the status file.
- }
-
- # do_encode [tracknumber] [hostname]
-@@ -295,6 +352,11 @@
- ;;
- esac
- ;;
-+ flac)
-+ case "$ENCODERSYNTAX" in
-+ flac) run_command encodetrack-$1 nice $ENCNICE $ENCODER -TARTIST="$TRACKARTIST" -TALBUM="$DALBUM" -TTITLE="$TRACKNAME" -TTRACKNUMBER="$1" $ENCODEROPTS -o "$OUT" "$IN" ;;
-+ esac
-+ ;;
- esac
- # Only remove .wav if the encoding succeeded
- if checkerrors encodetrack-$1; then :; else
-@@ -302,6 +364,45 @@
- fi
- }
-
-+# do_batch_normalize
-+# variables used:
-+# NORMALIZER, NORMALIZEROPTS
-+do_batch_normalize ()
-+{
-+ # The commands here don't go through run_command because they're never supposed to be silenced
-+ echo "Batch normalizing tracks: $TRACKQUEUE"
-+ (
-+ cd "$ABCDETEMPDIR"
-+ BLURB=
-+ TRACKFILES=
-+ for UTRACKNUM in $TRACKQUEUE
-+ do
-+ TRACKFILES="$TRACKFILES track$UTRACKNUM.wav"
-+ done
-+ # XXX: Hard-coded batch option!
-+ $NORMALIZER -b $NORMALIZEROPTS $TRACKFILES
-+ RETURN=$?
-+ if [ "$RETURN" != "0" ]; then
-+ echo "batch-normalize: $NORMALIZER returned code $RETURN" >> errors
-+ else
-+ for UTRACKNUM in $TRACKQUEUE
-+ do
-+ echo normalizetrack-$UTRACKNUM >> status
-+ done
-+ fi
-+ )
-+}
-+
-+# do_normalize [tracknumber]
-+# variables used:
-+# TRACKS, TRACKNAME, NORMALIZER, NORMALIZEROPTS
-+do_normalize ()
-+{
-+ IN="$ABCDETEMPDIR/track$1.wav"
-+ run_command '' echo "Normalizing track $1 of $TRACKS: $TRACKNAME..."
-+ run_command normalizetrack-$1 $NORMALIZER $NORMALIZEROPTS "$IN"
-+}
-+
- # do_move [tracknumber]
- # Deduces the outfile from environment variables
- # Creates directory if necessary
-@@ -496,6 +597,7 @@
- # following environment variables for them:
- DOCDDB=n
- DOREAD=n
-+ DONORMALIZE=n
- DOENCODE=n
- DOTAG=n
- DOMOVE=n
-@@ -507,6 +609,7 @@
- case $ACTION in
- cddb) DOCDDB=y;;
- read) DOREAD=y;;
-+ normalize) DONORMALIZE=y; DOREAD=y;;
- encode) DOENCODE=y; DOREAD=y;;
- tag) DOTAG=y; DOREAD=y; DOENCODE=y; DOCDDB=y;;
- move) DOMOVE=y; DOTAG=y; DOREAD=y; DOENCODE=y; DOCDDB=y;;
-@@ -574,7 +677,7 @@
- fi
- # List out disc title/author and contents
- echo ---- "$(cut '-d ' -f4- "$ABCDETEMPDIR/cddbquery")" ---- >> "$ABCDETEMPDIR/cddbchoices"
-- for TRACK in $(seq 1 $TRACKS)
-+ for TRACK in $(jot $TRACKS)
- do
- echo $TRACK: "$(grep ^TTITLE$(expr $TRACK - 1)= "$ABCDETEMPDIR/cddbread.1" | cut -f2- -d= | tr -d \\r\\n)" >> "$ABCDETEMPDIR/cddbchoices"
- done
-@@ -590,7 +693,7 @@
- $CDDBTOOL template $(cat "$ABCDETEMPDIR/discid") > "$ABCDETEMPDIR/cddbread.1"
- # List out disc title/author and contents of template
- echo ---- Unknown Artist / Unknown Album ---- >> "$ABCDETEMPDIR/cddbchoices"
-- for TRACK in $(seq 1 $TRACKS)
-+ for TRACK in $(jot $TRACKS)
- do
- echo $TRACK: "$(grep ^TTITLE$(expr $TRACK - 1)= "$ABCDETEMPDIR/cddbread.1" | cut -f2- -d= | tr -d \\r\\n)" >> "$ABCDETEMPDIR/cddbchoices"
- done
-@@ -620,7 +723,7 @@
- fi
- # List out disc title/author and contents
- echo \#$X: ---- "$DISCINFO" ---- >> "$ABCDETEMPDIR/cddbchoices"
-- for TRACK in $(seq 1 $TRACKS)
-+ for TRACK in $(jot $TRACKS)
- do
- echo $TRACK: "$(grep ^TTITLE$(expr $TRACK - 1)= "$ABCDETEMPDIR/cddbread.$X" | cut -f2- -d= | tr -d \\r\\n)" >> "$ABCDETEMPDIR/cddbchoices"
- done
-@@ -766,6 +869,9 @@
- elif [ "$(grep -c "^TTITLE.*\-" "$CDDBDATA")" -gt "$(expr $NUMTRACKS / 2 )" ]; then
- # More than 1/2 contain a "-", so guess forward-dash
- DEFAULTSTYLE=2
-+ elif [ "$(grep -c "^TTITLE.*(.*)" "$CDDBDATA")" -gt "$(expr $NUMTRACKS / 2 )" ]; then
-+ # More than 1/2 contain something in parens, so guess trailing-paren
-+ DEFAULTSTYLE=6
- fi
-
- echo "1) Artist / Title" >&2
-@@ -773,21 +879,22 @@
- echo "3) Title / Artist" >&2
- echo "4) Title - Artist" >&2
- echo "5) Artist: Title" >&2
-- echo "6) This is a single-artist CD" >&2
-- echo -n "Which style of multiple artist entries is it? [1-6] ($DEFAULTSTYLE): " >&2
-+ echo "6) Title (Artist)" >&2
-+ echo "7) This is a single-artist CD" >&2
-+ echo -n "Which style of multiple artist entries is it? [1-7] ($DEFAULTSTYLE): " >&2
- if [ "$INTERACTIVE" = "y" ]; then
- read VARIOUSARTISTSTYLE
- else
- echo $DEFAULTSTYLE >&2
- VARIOUSARTISTSTYLE=$DEFAULTSTYLE
- fi
-- VARIOUSARTISTSTYLE=$(echo $VARIOUSARTISTSTYLE | xargs printf %d)
-+ VARIOUSARTISTSTYLE=$(echo 0$VARIOUSARTISTSTYLE | xargs printf %d)
- # If they press Enter, then the default style (0) was chosen
-- while [ $VARIOUSARTISTSTYLE -lt 0 ] || [ $VARIOUSARTISTSTYLE -gt 6 ]; do
-- echo "Invalid selection. Please choose a number between 1 and 6."
-- echo -n "Selection [1-6]: "
-+ while [ $VARIOUSARTISTSTYLE -lt 0 ] || [ $VARIOUSARTISTSTYLE -gt 7 ]; do
-+ echo "Invalid selection. Please choose a number between 1 and 7."
-+ echo -n "Selection [1-7]: "
- read VARIOUSARTISTSTYLE
-- VARIOUSARTISTSTYLE=$(echo $VARIOUSARTISTSTYLE | xargs printf %d)
-+ VARIOUSARTISTSTYLE=$(echo 0$VARIOUSARTISTSTYLE | xargs printf %d)
- done
- if [ "$VARIOUSARTISTSTYLE" = "0" ]; then
- VARIOUSARTISTSTYLE=$DEFAULTSTYLE
-@@ -809,7 +916,10 @@
- 5) # Artist: Title
- VARIOUSARTISTSTYLE=colon
- ;;
-- 6) # Single Artist
-+ 6) # Title (Artist)
-+ VARIOUSARTISTSTYLE=trailing-paren
-+ ;;
-+ 7) # Single Artist
- VARIOUSARTISTS=n
- ;;
- esac
-@@ -899,6 +1009,7 @@
- READNICE=10
- VARIOUSARTISTS=n
- VARIOUSARTISTSTYLE=forward
-+NORMALIZERSYNTAX=default
-
- # program paths - defaults to checking your $PATH
- LAME=lame
-@@ -909,6 +1020,7 @@
- MP3ENC=mp3enc
- VORBIZE=vorbize
- OGGENC=oggenc
-+FLAC=flac
- ID3=id3
- ID3V2=id3v2
- CDPARANOIA=cdparanoia
-@@ -919,6 +1031,7 @@
- EJECT=eject
- DISTMP3=distmp3
- VORBISCOMMENT=vorbiscomment
-+NORMALIZE=normalize
-
- # Options for programs called from abcde
- LAMEOPTS=
-@@ -929,14 +1042,15 @@
- MP3ENCOPTS=
- VORBIZEOPTS=
- OGGENCOPTS=
-+FLACOPTS=
- ID3OPTS=
- ID3V2OPTS=
--CDPARANOIAOPTS=
- CDDA2WAVOPTS=
- WGETOPTS=
- CDDBTOOLOPTS=
- EJECTOPTS=
- DISTMP3OPTS=
-+NORMALIZEOPTS=
-
- # Default to one process if -j isn't specified
- MAXPROCS=1
-@@ -948,7 +1062,7 @@
- # Custom filename munging:
- mungefilename ()
- {
-- echo "$@" | sed s,:,\ -,g | tr \ / __ | tr -d \'\"\?\[:cntrl:\]
-+ echo "$@" | sed s,:,\ -,g | tr / _ | tr -d \`\'\"\?\[:cntrl:\]
- }
-
- # If CDDBAVAIL is set to n, no CDDB read is done
-@@ -964,17 +1078,13 @@
- WAVOUTPUTDIR="$OUTPUTDIR"
+--- abcde.orig 2003-05-25 12:37:53.000000000 +0200
++++ abcde 2003-05-25 12:40:44.000000000 +0200
+@@ -1233,8 +1233,8 @@
fi
--# If this is a devfs system, default to /dev/cdroms/cdrom0
--# instead of /dev/cdrom
--if [ -e /dev/cdroms/cdrom0 ]; then
-- CDROM=/dev/cdroms/cdrom0
--else
-- CDROM=/dev/cdrom
--fi
-+RAWPART=`sysctl -n kern.rawpartition | awk '{printf "%c",97+$0}'`
-+CDROM=/dev/rcd0$RAWPART
-+CDPARANOIAOPTS="-g ${CDROM}"
-
# Load system defaults
-if [ -r /etc/abcde.conf ]; then
- . /etc/abcde.conf
-+if [ -r @PKG_SYSCONFDIR@/abcde.conf ]; then
-+ . @PKG_SYSCONFDIR@/abcde.conf
++if [ -r @PKG_SYSCONFDIR@/etc/abcde.conf ]; then
++ . @PKG_SYSCONFDIR@/etc/abcde.conf
fi
# Load user preference defaults
if [ -r $HOME/.abcde.conf ]; then
-@@ -982,9 +1092,10 @@
- fi
-
- # Parse command line options
--while getopts a:c:C:d:Dhj:lnNo:r:x opt ; do
-+while getopts a:bc:C:d:Dhj:lnNo:r:x opt ; do
- case "$opt" in
- a) ACTIONS="$OPTARG" ;;
-+ b) BATCH=y ;;
- c) . "$OPTARG" ;;
- C) DISCID="$OPTARG" ;;
- d) CDROM="$OPTARG" ;;
-@@ -1010,7 +1121,7 @@
- if [ "$RSTART" = "$REND" ]; then
- NEWTRACKS="$RSTART"
+@@ -1260,8 +1260,9 @@
+ elif [ -e /dev/acd0c ]; then
+ CDROM=/dev/acd0c
else
-- NEWTRACKS=$(seq -s ' ' $RSTART $REND)
-+ NEWTRACKS=$(jot -s ' ' $(($REND - $RSTART + 1)) $RSTART $REND)
- fi
- TRACKQUEUE=$(echo "$TRACKQUEUE" "$NEWTRACKS")
-
-@@ -1029,12 +1140,25 @@
- ;;
- esac
-
--# If nothing has been specified, use oggenc for oggs and lame for mp3s
-+# There's only one normalize...
-+case "$NORMALIZERSYNTAX" in
-+ default|normalize)
-+ NORMALIZER="$NORMALIZE"
-+ NORMALIZEROPTS="$NORMALIZEOPTS"
-+ ;;
-+esac
-+
-+# If nothing has been specified, use oggenc for oggs and lame for mp3s and flac
-+# for flacs
- if [ "$ENCODERSYNTAX" = "default" ]; then
- if [ "$OUTPUTTYPE" = "ogg" ]; then
- ENCODERSYNTAX=oggenc
-- else
-+ elif [ "$OUTPUTTYPE" = "mp3" ]; then
- ENCODERSYNTAX=lame
-+ elif [ "$OUTPUTTYPE" = "flac" ]; then
-+ ENCODERSYNTAX=flac
-+ else
-+ echo "abcde error: Invalid OUTPUTTYPE defined" >&2
+- echo "abcde error: CDROM device cannot be found." >&2
+- exit 1
++ RAWPART=`sysctl -n kern.rawpartition | awk '{printf "%c",97+$0}'`
++ CDROM=/dev/rcd0$RAWPART
++ CDPARANOIAOPTS="-g ${CDROM}"
fi
fi
-
-@@ -1072,6 +1196,11 @@
- ENCODEROPTS="$OGGENCOPTS"
- ENCODER="$OGGENC"
- ;;
-+ flac)
-+ ENCODEROPTS="$FLACOPTS"
-+ ENCODER="$FLAC"
-+ ;;
-+
- esac
-
- # and which tagger
-@@ -1098,10 +1227,13 @@
- if [ "$REMOTEHOSTS" ]; then NEEDDISTMP3=y; fi
- if [ "$OUTPUTTYPE" = "mp3" ]; then NEEDTAGGER=y; fi
- if [ "$OUTPUTTYPE" = "ogg" ]; then NEEDCOMMENTER=y; fi
-+if [ "$DONORMALIZE" = "y" ]; then NEEDNORMALIZER=y; fi
-+
-
- # Make sure a buncha things exist
- for X in $CDROMREADER $CDDISCID ${NEEDTAGGER+$TAGGER} $ENCODER $WGET \
-- ${NEEDDISTMP3+$DISTMP3} ${NEEDCOMMENTER+$VORBISCOMMENT} seq
-+ ${NEEDDISTMP3+$DISTMP3} ${NEEDCOMMENTER+$VORBISCOMMENT} \
-+ ${NEEDNORMALIZER+$NORMALIZER} jot
- do
- # Cut off the command-line options we just added in
- X=$(echo $X | cut -d' ' -f2)
-@@ -1119,7 +1251,7 @@
-
- # One thousand lines in, we can start doing stuff with things
-
--# List of valid actions: cddb,playlist,read,encode,tag,move
-+# List of valid actions: cddb,playlist,read,normalize,encode,tag,move
-
- do_discid # Get ABCDETEMPDIR created and status file initialized
-
-@@ -1161,16 +1293,20 @@
- fi
- fi
- fi
-- echo NEXTTRACK # Get the encoder machine churning again
-- if [ "$DOREAD" = "y" ]; then
-- if [ "$LOWDISK" = "y" ] && [ "$DOENCODE" = "y" ]; then
-- until checkstatus encodetrack-$UTRACKNUM
-- do
-- if checkerrors encodetrack-$UTRACKNUM; then
-- break
-- fi
-- sleep 2
-- done
-+ if [ "$BATCH" = "y" ]; then
-+ :
-+ else
-+ echo NEXTTRACK # Get the encoder machine churning again
-+ if [ "$DOREAD" = "y" ]; then
-+ if [ "$LOWDISK" = "y" ] && [ "$DOENCODE" = "y" ]; then
-+ until checkstatus encodetrack-$UTRACKNUM
-+ do
-+ if checkerrors encodetrack-$UTRACKNUM; then
-+ break
-+ fi
-+ sleep 2
-+ done
-+ fi
- fi
- fi
- done
-@@ -1181,17 +1317,39 @@
- echo "encode-output=loud" >> "$ABCDETEMPDIR/status"
- fi
-
-+# All tracks read, start encoding.
-+if [ "$BATCH" = "y" ]; then
-+ echo NEXTTRACK
-+fi
-+
- # We are now finished with the cdrom - it can be safely ejected. Note that
- # abcde will not have completed yet.
- if [ "$EJECTCD" = "y" ]; then
- $EJECT $EJECTOPTS $CDROM
- fi
- ) | (
-+# In batch mode, we want all tracks to be read first.
-+if [ "$BATCH" = "y" ]; then
-+ read GOAHEAD # For blocking - will contain either "NO" or "NEXTTRACK"
-+ if [ "$GOAHEAD" = "NO" ]; then break; fi
-+ for LASTTRACK in $TRACKQUEUE; do :; done
-+ if checkstatus readtrack-$LASTTRACK; then
-+ if [ "$DONORMALIZE" = "y" ]; then
-+ if checkstatus normalizetrack-$LASTTRACK; then :; else do_batch_normalize; fi
-+ if checkerrors batch-normalize; then exit; fi
-+ fi
-+ if [ "$DOENCODE" = "y" ]; then
-+ if checkstatus encodetrack-$LASTTRACK; then :; else do_batch_encode; fi
-+ if checkerrors batch-encode; then exit; fi
-+ fi
-+ fi
-+fi
-+
- # Do the encoding, including parallelization of remote encoding
- # Figure out where each track is going to be encoded
- ENCODELOCATIONS="$(echo $REMOTEHOSTS | tr , ' ')"
- if [ "$MAXPROCS" != "0" ]; then
-- for NUM in $(seq 1 "$MAXPROCS")
-+ for NUM in $(jot "$MAXPROCS")
- do
- ENCODELOCATIONS="$ENCODELOCATIONS %local$NUM%"
- done
-@@ -1253,9 +1411,20 @@
- # You can't tag a file before it's finished encoding -
- # thus all of this is backgrounded together
- (
-+ if [ "$DONORMALIZE" = "y" ]; then
-+ if checkstatus readtrack-$UTRACKNUM; then
-+ if checkstatus normalizetrack-$UTRACKNUM; then :; else do_normalize $UTRACKNUM; fi
-+ fi
-+ fi
- if [ "$DOENCODE" = "y" ]; then
- if checkstatus readtrack-$UTRACKNUM; then
-- if checkstatus encodetrack-$UTRACKNUM; then :; else do_encode $UTRACKNUM $LOCATION; fi
-+ if [ "$DONORMALIZE" = "y" ]; then
-+ if checkstatus normalizetrack-$UTRACKNUM; then
-+ if checkstatus encodetrack-$UTRACKNUM; then :; else do_encode $UTRACKNUM $LOCATION; fi
-+ fi
-+ else
-+ if checkstatus encodetrack-$UTRACKNUM; then :; else do_encode $UTRACKNUM $LOCATION; fi
-+ fi
- fi
- fi
- if [ "$DOTAG" = "y" ]; then
+
diff --git a/audio/abcde/patches/patch-ad b/audio/abcde/patches/patch-ad
index 8279ec3c7d2..b44ca47abda 100644
--- a/audio/abcde/patches/patch-ad
+++ b/audio/abcde/patches/patch-ad
@@ -1,38 +1,30 @@
-$NetBSD: patch-ad,v 1.4 2002/11/29 19:12:38 kim Exp $
+$NetBSD: patch-ad,v 1.5 2003/06/10 06:29:07 wiz Exp $
---- cddb-tool.orig Sun Jan 20 21:29:23 2002
-+++ cddb-tool Fri Nov 29 14:09:19 2002
-@@ -119,7 +119,7 @@
+--- cddb-tool.orig 2003-05-25 12:32:29.000000000 +0200
++++ cddb-tool 2003-05-25 12:34:12.000000000 +0200
+@@ -153,7 +153,7 @@
echo '#'
echo '# Track frame offsets:'
NUMTRACKS=$2
-- for x in $(seq 3 $(expr $NUMTRACKS + 2))
-+ for x in $(jot $NUMTRACKS 3)
+- for x in $(f_seq 3 $(expr $NUMTRACKS + 2))
++ for x in $(jot $NUMTRACKS 3))
do
printf "#\t$(echo "$DISCID" | cut -f$x -d' ')\n"
done
-@@ -135,13 +135,13 @@
- echo DISCID="$DISCNUM"
- echo "DTITLE=Unknown Artist / Unknown Album"
+@@ -171,13 +171,13 @@
+ echo "DYEAR="
+ echo "DGENRE="
# TTITLE0 -- TTITLEn
-- for x in $(seq 1 $NUMTRACKS)
-+ for x in $(jot $NUMTRACKS)
+- for x in $(f_seq 1 $NUMTRACKS)
++ for x in $(jot $NUMTRACKS 3)
do
echo "TTITLE$(expr $x - 1)=Track $x"
done
echo "EXTD="
# EXTT0 -- EXTTn
-- for x in $(seq 1 $NUMTRACKS)
-+ for x in $(jot $NUMTRACKS)
+- for x in $(f_seq 1 $NUMTRACKS)
++ for x in $(jot $NUMTRACKS 3)
do
echo "EXTT$(expr $x - 1)="
done
-@@ -153,7 +153,7 @@
- ADDRESS="$2"
- DISCID=$(grep ^DISCID= "$FILE" | cut -f2 -d= | tr -d \[:cntrl:\])
- CDDBGENRE=$(grep '^#CATEGORY=' "$FILE" | cut -f2- -d=)
-- grep -v "^#CATEGORY=" "$FILE" | mail "$ADDRESS" -s "cddb $CDDBGENRE $DISCID"
-+ grep -v "^#CATEGORY=" "$FILE" | mail -s "cddb $CDDBGENRE $DISCID" "$ADDRESS"
- ;;
-
- query) # cddb-tool query serverurl user host discid...
+