summaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
authorlukem <lukem>2002-12-16 05:14:28 +0000
committerlukem <lukem>2002-12-16 05:14:28 +0000
commitabb159b6494adea348a7bf25776c6c22a404939b (patch)
tree3be9c48b1ec952d1ed6df74e710b26096eae2243 /audio
parent6b4d62189c20368e39ea36a67f3af91b52afbc25 (diff)
downloadpkgsrc-abb159b6494adea348a7bf25776c6c22a404939b.tar.gz
Add support for encoding to FLAC. Initially based on
http://www.bagu.dhs.org/abcde-2.0.3-flac-patch but with some serious improvements by me (including documentation updates, and in-line addition of vorbis comments with flac -T ...). Bump PKGREVISION.
Diffstat (limited to 'audio')
-rw-r--r--audio/abcde/DESCR2
-rw-r--r--audio/abcde/MESSAGE3
-rw-r--r--audio/abcde/Makefile4
-rw-r--r--audio/abcde/distinfo6
-rw-r--r--audio/abcde/patches/patch-aa110
-rw-r--r--audio/abcde/patches/patch-ac134
6 files changed, 230 insertions, 29 deletions
diff --git a/audio/abcde/DESCR b/audio/abcde/DESCR
index 608296163a7..e2a50bb5d91 100644
--- a/audio/abcde/DESCR
+++ b/audio/abcde/DESCR
@@ -1,3 +1,3 @@
abcde is a frontend command-line utility (actually, a shell script) that
-grabs tracks off a CD, encodes them to ogg or mp3 format, and tags them,
+grabs tracks off a CD, encodes them to ogg, mp3 or flac formats, and tags them,
all in one go.
diff --git a/audio/abcde/MESSAGE b/audio/abcde/MESSAGE
index ae564345888..23084dfb640 100644
--- a/audio/abcde/MESSAGE
+++ b/audio/abcde/MESSAGE
@@ -1,10 +1,11 @@
===========================================================================
-$NetBSD: MESSAGE,v 1.1 2002/11/29 02:37:21 kim Exp $
+$NetBSD: MESSAGE,v 1.2 2002/12/16 05:14:28 lukem Exp $
You need to install at least one encoder to use with abcde. It has support
for the following encoders in pkgsrc:
audio/bladeenc
+ audio/flac
audio/gogo
audio/lame
audio/vorbis-tools
diff --git a/audio/abcde/Makefile b/audio/abcde/Makefile
index 1e63fcbda32..e9daa2f8f10 100644
--- a/audio/abcde/Makefile
+++ b/audio/abcde/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.8 2002/11/29 02:58:46 kim Exp $
+# $NetBSD: Makefile,v 1.9 2002/12/16 05:14:28 lukem Exp $
DISTNAME= abcde-2.0.3
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= audio
MASTER_SITES= http://frantica.lly.org/~rcw/abcde/
DISTFILES= ${DISTNAME:S/-/_/}.orig.tar.gz
diff --git a/audio/abcde/distinfo b/audio/abcde/distinfo
index 48348bf770c..2ed51f16048 100644
--- a/audio/abcde/distinfo
+++ b/audio/abcde/distinfo
@@ -1,8 +1,8 @@
-$NetBSD: distinfo,v 1.11 2002/11/29 19:12:37 kim Exp $
+$NetBSD: distinfo,v 1.12 2002/12/16 05:14:29 lukem Exp $
SHA1 (abcde_2.0.3.orig.tar.gz) = 66a7620a835baee29296f4d5e9322bb1679baa49
Size (abcde_2.0.3.orig.tar.gz) = 35655 bytes
-SHA1 (patch-aa) = 31392536c53eb76df26da1bb4bbe1e68b9427999
+SHA1 (patch-aa) = d3c8a6c9c7bbd0c7fd22cf935d903fd05d1ccb31
SHA1 (patch-ab) = 524452b3930c25351deee7a508f98bcd0f51a872
-SHA1 (patch-ac) = af57feea1d63a5aa4b524f1710709fd01b71686f
+SHA1 (patch-ac) = 77fb524cef6bfcf3fa934e9229681535321fb9ee
SHA1 (patch-ad) = b37aebe39a003da917d7b192e9169af4c2d17115
diff --git a/audio/abcde/patches/patch-aa b/audio/abcde/patches/patch-aa
index 2b03f884ca7..0f7d14dfdc0 100644
--- a/audio/abcde/patches/patch-aa
+++ b/audio/abcde/patches/patch-aa
@@ -1,8 +1,25 @@
-$NetBSD: patch-aa,v 1.5 2002/11/29 02:58:47 kim Exp $
+$NetBSD: patch-aa,v 1.6 2002/12/16 05:14:30 lukem Exp $
---- abcde.1.orig Mon Aug 20 21:22:33 2001
-+++ abcde.1 Thu Nov 28 21:55:24 2002
-@@ -42,7 +42,7 @@
+--- abcde.1.orig Tue Aug 21 11:22:33 2001
++++ abcde.1
+@@ -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 @@ Do a CDDB query over the Internet to loo
+ 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
+@@ -42,7 +42,7 @@ cddb. The default is to do all actions e
.TP
.B \-c [filename]
Specifies an additional configuration file to parse. Configuration options
@@ -11,8 +28,24 @@ $NetBSD: patch-aa,v 1.5 2002/11/29 02:58:47 kim Exp $
.TP
.B \-C [discid]
Allows you to resume a session for
-@@ -91,7 +91,7 @@
- or '.mp3'. This can be modified using the OUTPUTFORMAT and VAOUTPUTFORMAT
+@@ -66,7 +66,7 @@ the MAXPROCS configuration variable.
+ 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 +87,12 @@ will process the entire CD. Accepts rang
+ .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
@@ -20,3 +53,68 @@ $NetBSD: patch-aa,v 1.5 2002/11/29 02:58:47 kim Exp $
$HOME/.abcde.conf, in that order. Here is a list of options abcde recognizes:
.TP
.B CDDBURL
+@@ -100,7 +101,8 @@ Specifies a server to use for CDDB looku
+ .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
+@@ -118,7 +120,8 @@ to 700MB of temporary space for each ses
+ 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 +130,8 @@ automatically zero-padded.
+ .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,14 +140,14 @@ OUTPUTFORMAT is set to.
+ .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,
++VORBIZE, OGGENC, FLAC, ID3, ID3V2, CDPARANOIA, CDDA2WAV, WGET, CDDISCID,
+ CDDBTOOL, EJECT, 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,
++OGGENCOPTS, FLACOPTS, ID3OPTS, ID3V2OPTS, CDPARANOIAOPTS, CDDA2WAVOPTS, WGETOPTS,
+ CDDBTOOLOPTS, EJECTOPTS, and DISTMP3OPTS.
+ .TP
+ .B MAXPROCS
+@@ -197,7 +200,7 @@ after all tracks have been read.
+ 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)
+@@ -218,6 +221,7 @@ wget, an HTTP retrieval program.
+ .BR cdda2wav (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 39d777e2b6f..aa24b2cda66 100644
--- a/audio/abcde/patches/patch-ac
+++ b/audio/abcde/patches/patch-ac
@@ -1,8 +1,17 @@
-$NetBSD: patch-ac,v 1.8 2002/11/29 02:58:47 kim Exp $
+$NetBSD: patch-ac,v 1.9 2002/12/16 05:14:30 lukem Exp $
---- abcde.orig Mon Jan 28 00:44:02 2002
-+++ abcde Thu Nov 28 21:55:10 2002
-@@ -206,6 +206,11 @@
+--- abcde.orig Mon Jan 28 16:44:02 2002
++++ abcde
+@@ -27,7 +27,7 @@ echo "-j Number of encoder processes
+ 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."
+@@ -206,6 +206,11 @@ splitvarious ()
TRACKARTIST="$(echo $DTITLEARTIST | cut -f1 -d~)"
TRACKNAME="$(echo $DTITLEARTIST | cut -f2 -d~)"
;;
@@ -14,7 +23,52 @@ $NetBSD: patch-ac,v 1.8 2002/11/29 02:58:47 kim Exp $
esac
else
TRACKARTIST=$DARTIST
-@@ -574,7 +579,7 @@
+@@ -221,7 +226,8 @@ do_tag ()
+ {
+ 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 +238,8 @@ do_tag ()
+ 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 +261,11 @@ do_tag ()
+ else
+ mv "$ABCDETEMPDIR/track$1.uncommented.$OUTPUTTYPE" "$ABCDETEMPDIR/track$1.$OUTPUTTYPE"
+ fi
+- fi
++ ;;
++ flac)
++ run_command tagtrack-$1 true
++ ;;
++ esac
+ }
+
+ # do_encode [tracknumber] [hostname]
+@@ -295,6 +306,11 @@ do_encode ()
+ ;;
+ 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
+@@ -574,7 +590,7 @@ do_cddbread ()
fi
# List out disc title/author and contents
echo ---- "$(cut '-d ' -f4- "$ABCDETEMPDIR/cddbquery")" ---- >> "$ABCDETEMPDIR/cddbchoices"
@@ -23,7 +77,7 @@ $NetBSD: patch-ac,v 1.8 2002/11/29 02:58:47 kim Exp $
do
echo $TRACK: "$(grep ^TTITLE$(expr $TRACK - 1)= "$ABCDETEMPDIR/cddbread.1" | cut -f2- -d= | tr -d \\r\\n)" >> "$ABCDETEMPDIR/cddbchoices"
done
-@@ -590,7 +595,7 @@
+@@ -590,7 +606,7 @@ do_cddbread ()
$CDDBTOOL template $(cat "$ABCDETEMPDIR/discid") > "$ABCDETEMPDIR/cddbread.1"
# List out disc title/author and contents of template
echo ---- Unknown Artist / Unknown Album ---- >> "$ABCDETEMPDIR/cddbchoices"
@@ -32,7 +86,7 @@ $NetBSD: patch-ac,v 1.8 2002/11/29 02:58:47 kim Exp $
do
echo $TRACK: "$(grep ^TTITLE$(expr $TRACK - 1)= "$ABCDETEMPDIR/cddbread.1" | cut -f2- -d= | tr -d \\r\\n)" >> "$ABCDETEMPDIR/cddbchoices"
done
-@@ -620,7 +625,7 @@
+@@ -620,7 +636,7 @@ do_cddbread ()
fi
# List out disc title/author and contents
echo \#$X: ---- "$DISCINFO" ---- >> "$ABCDETEMPDIR/cddbchoices"
@@ -41,7 +95,7 @@ $NetBSD: patch-ac,v 1.8 2002/11/29 02:58:47 kim Exp $
do
echo $TRACK: "$(grep ^TTITLE$(expr $TRACK - 1)= "$ABCDETEMPDIR/cddbread.$X" | cut -f2- -d= | tr -d \\r\\n)" >> "$ABCDETEMPDIR/cddbchoices"
done
-@@ -766,6 +771,9 @@
+@@ -766,6 +782,9 @@ do_cddbedit ()
elif [ "$(grep -c "^TTITLE.*\-" "$CDDBDATA")" -gt "$(expr $NUMTRACKS / 2 )" ]; then
# More than 1/2 contain a "-", so guess forward-dash
DEFAULTSTYLE=2
@@ -51,7 +105,7 @@ $NetBSD: patch-ac,v 1.8 2002/11/29 02:58:47 kim Exp $
fi
echo "1) Artist / Title" >&2
-@@ -773,21 +781,22 @@
+@@ -773,21 +792,22 @@ do_cddbedit ()
echo "3) Title / Artist" >&2
echo "4) Title - Artist" >&2
echo "5) Artist: Title" >&2
@@ -81,7 +135,7 @@ $NetBSD: patch-ac,v 1.8 2002/11/29 02:58:47 kim Exp $
done
if [ "$VARIOUSARTISTSTYLE" = "0" ]; then
VARIOUSARTISTSTYLE=$DEFAULTSTYLE
-@@ -809,7 +818,10 @@
+@@ -809,7 +829,10 @@ do_cddbedit ()
5) # Artist: Title
VARIOUSARTISTSTYLE=colon
;;
@@ -93,15 +147,26 @@ $NetBSD: patch-ac,v 1.8 2002/11/29 02:58:47 kim Exp $
VARIOUSARTISTS=n
;;
esac
-@@ -931,7 +943,6 @@
+@@ -909,6 +932,7 @@ XINGMP3ENC=xingmp3enc
+ MP3ENC=mp3enc
+ VORBIZE=vorbize
+ OGGENC=oggenc
++FLAC=flac
+ ID3=id3
+ ID3V2=id3v2
+ CDPARANOIA=cdparanoia
+@@ -929,9 +953,9 @@ XINGMP3ENCOPTS=
+ MP3ENCOPTS=
+ VORBIZEOPTS=
OGGENCOPTS=
++FLACOPTS=
ID3OPTS=
ID3V2OPTS=
-CDPARANOIAOPTS=
CDDA2WAVOPTS=
WGETOPTS=
CDDBTOOLOPTS=
-@@ -948,7 +959,7 @@
+@@ -948,7 +972,7 @@ ACTIONS=cddb,read,encode,tag,move,clean
# Custom filename munging:
mungefilename ()
{
@@ -110,7 +175,7 @@ $NetBSD: patch-ac,v 1.8 2002/11/29 02:58:47 kim Exp $
}
# If CDDBAVAIL is set to n, no CDDB read is done
-@@ -964,17 +975,13 @@
+@@ -964,17 +988,13 @@ if [ -z "$WAVOUTPUTDIR" ]; then
WAVOUTPUTDIR="$OUTPUTDIR"
fi
@@ -133,7 +198,7 @@ $NetBSD: patch-ac,v 1.8 2002/11/29 02:58:47 kim Exp $
fi
# Load user preference defaults
if [ -r $HOME/.abcde.conf ]; then
-@@ -1010,7 +1017,7 @@
+@@ -1010,7 +1030,7 @@ while [ $# -gt 0 ]; do
if [ "$RSTART" = "$REND" ]; then
NEWTRACKS="$RSTART"
else
@@ -142,8 +207,45 @@ $NetBSD: patch-ac,v 1.8 2002/11/29 02:58:47 kim Exp $
fi
TRACKQUEUE=$(echo "$TRACKQUEUE" "$NEWTRACKS")
-@@ -1101,7 +1108,7 @@
+@@ -1029,13 +1049,18 @@ case "$CDROMREADERSYNTAX" in
+ ;;
+ esac
+
+-# If nothing has been specified, use oggenc for oggs and lame for mp3s
++# 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
+- fi
++ elif [ "$OUTPUTTYPE" = "flac" ]; then
++ ENCODERSYNTAX=flac
++ else
++ echo "abcde error: Invalid OUTPUTTYPE defined" >&2
++ fi
+ fi
+
+ # decide which encoder
+@@ -1072,6 +1097,11 @@ case "$ENCODERSYNTAX" in
+ ENCODEROPTS="$OGGENCOPTS"
+ ENCODER="$OGGENC"
+ ;;
++ flac)
++ ENCODEROPTS="$FLACOPTS"
++ ENCODER="$FLAC"
++ ;;
++
+ esac
+
+ # and which tagger
+@@ -1099,9 +1129,10 @@ if [ "$REMOTEHOSTS" ]; then NEEDDISTMP3=
+ if [ "$OUTPUTTYPE" = "mp3" ]; then NEEDTAGGER=y; fi
+ if [ "$OUTPUTTYPE" = "ogg" ]; then NEEDCOMMENTER=y; fi
++
# Make sure a buncha things exist
for X in $CDROMREADER $CDDISCID ${NEEDTAGGER+$TAGGER} $ENCODER $WGET \
- ${NEEDDISTMP3+$DISTMP3} ${NEEDCOMMENTER+$VORBISCOMMENT} seq
@@ -151,7 +253,7 @@ $NetBSD: patch-ac,v 1.8 2002/11/29 02:58:47 kim Exp $
do
# Cut off the command-line options we just added in
X=$(echo $X | cut -d' ' -f2)
-@@ -1191,7 +1198,7 @@
+@@ -1191,7 +1222,7 @@ fi
# Figure out where each track is going to be encoded
ENCODELOCATIONS="$(echo $REMOTEHOSTS | tr , ' ')"
if [ "$MAXPROCS" != "0" ]; then