ABCDE: Fix interaction with libcdio's `cd-paranoia'.

svn path=/nixpkgs/trunk/; revision=13157
This commit is contained in:
Ludovic Courtès 2008-10-29 21:59:44 +00:00
parent 000ba65363
commit 866d9c8241
3 changed files with 35 additions and 2 deletions

View File

@ -0,0 +1,16 @@
Choose the right CDROM reader syntax for `cd-paranoia'.
--- abcde-2.3.99.6/abcde 2006-08-05 21:14:00.000000000 +0200
+++ abcde-2.3.99.6/abcde 2008-10-29 22:55:38.000000000 +0100
@@ -3184,7 +3184,10 @@ if [ -n "$DISCID" ] || [ "$CDROMREADERSY
if [ "$CDROMREADERSYNTAX" = "" ]; then
for DEFAULT_CDROMREADER in $DEFAULT_CDROMREADERS; do
if new_checkexec $DEFAULT_CDROMREADER; then
- CDROMREADERSYNTAX=$DEFAULT_CDROMREADER
+ case "$DEFAULT_CDROMREADER" in
+ cd-paranoia) CDROMREADERSYNTAX=cdparanoia;;
+ *) CDROMREADERSYNTAX=$DEFAULT_CDROMREADER;;
+ esac
break
fi
done

View File

@ -13,7 +13,7 @@ in
# FIXME: This package does not support MP3 encoding (only Ogg),
# nor `distmp3', `eject', etc.
patches = [ ./install.patch ];
patches = [ ./install.patch ./which.patch ./cd-paranoia.patch ];
configurePhase = ''
sed -i "s|^[[:blank:]]*prefix *=.*$|prefix = $out|g ;
@ -23,7 +23,8 @@ in
# We use `cd-paranoia' from GNU libcdio, which contains a hyphen
# in its name, unlike Xiph's cdparanoia.
sed -i "s|^[[:blank:]]*CDPARANOIA=.*$|CDPARANOIA=cd-paranoia|g" \
sed -i "s|^[[:blank:]]*CDPARANOIA=.*$|CDPARANOIA=cd-paranoia|g ;
s|^[[:blank:]]*DEFAULT_CDROMREADERS=.*$|DEFAULT_CDROMREADERS=\"cd-paranoia cdda2wav\"|g" \
"abcde"
substituteInPlace "abcde" \

View File

@ -0,0 +1,16 @@
Add an alias for `which'.
--- abcde-2.3.99.6/abcde 2006-08-05 21:14:00.000000000 +0200
+++ abcde-2.3.99.6/abcde 2008-10-29 22:49:16.000000000 +0100
@@ -15,6 +15,11 @@
VERSION='2.3.99-$Revision: 222M $'
+which ()
+{
+ type -P $1
+}
+
usage ()
{
echo "This is abcde v$VERSION."