Updated version of abcde to 2.5.4

- Added support for MusicBrainz queries to abcde package
- Added new dependencies to abcde: mkcue, eject, perl, MusicBrainz, MusicBrainzDiscID
- libdiscid version in pkg-config was incorrect; patched libdiscid to fix
- Added WebServices::MusicBrainz Perl module
- Added MusicBrainz::DiscID Perl module
- Commented out XSLoader Perl module since it was broken, no packages depend on it,
  and it has been incorporated into the Perl core
This commit is contained in:
Michael Ashton 2012-10-27 15:13:56 -07:00
parent 472c5a5d77
commit 78db9a8cb1
8 changed files with 95 additions and 71 deletions

View File

@ -0,0 +1,30 @@
Two changes:
* Add an alias for `which', so abcde can find things in store
* Choose the right CDROM reader syntax for `cd-paranoia'
--- abcde-2.5.4/abcde~ 2012-09-18 06:09:31.000000000 -0700
+++ abcde-2.5.4/abcde 2012-10-27 00:08:48.000862364 -0700
@@ -17,6 +17,11 @@
VERSION='2.5.4'
+which ()
+{
+ type -P $1
+}
+
usage ()
{
echo "This is abcde v$VERSION."
@@ -3497,6 +3502,10 @@
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

@ -1,16 +0,0 @@
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

@ -1,19 +1,20 @@
{ stdenv, fetchurl, libcdio, cddiscid, wget, bash, vorbisTools, id3v2, lame
{ stdenv, fetchurl, libcdio, cddiscid, wget, bash, vorbisTools, id3v2, lame, flac, eject, mkcue
, perl, DigestSHA, MusicBrainz, MusicBrainzDiscID
, makeWrapper }:
let version = "2.3.99.6";
let version = "2.5.4";
in
stdenv.mkDerivation {
name = "abcde-${version}";
src = fetchurl {
url = "mirror://debian/pool/main/a/abcde/abcde_${version}.orig.tar.gz";
sha256 = "1wl4ygj1cf1d6g05gwwygsd5g83l039fzi011r30ma5lnm763lyb";
sha256 = "14g5lsgh53hza9848351kwpygc0yqpvvzp3s923aja77f2wpkdl5";
};
# FIXME: This package does not support MP3 encoding (only Ogg),
# nor `distmp3', `eject', etc.
patches = [ ./install.patch ./which.patch ./cd-paranoia.patch ];
patches = [ ./abcde.patch ];
configurePhase = ''
sed -i "s|^[[:blank:]]*prefix *=.*$|prefix = $out|g ;
@ -29,25 +30,37 @@ in
substituteInPlace "abcde" \
--replace "/etc/abcde.conf" "$out/etc/abcde.conf"
'';
# no ELFs in this package, only scripts
dontStrip = true;
dontPatchELF = true;
buildInputs = [ makeWrapper ];
postInstall = ''
substituteInPlace "$out/bin/cddb-tool" \
--replace '#!/bin/sh' '#!${bash}/bin/sh'
substituteInPlace "$out/bin/abcde" \
--replace '#!/bin/bash' '#!${bash}/bin/bash'
# substituteInPlace "$out/bin/cddb-tool" \
# --replace '#!/bin/sh' '#!${bash}/bin/sh'
# substituteInPlace "$out/bin/abcde" \
# --replace '#!/bin/bash' '#!${bash}/bin/bash'
# generic fixup script should be doing this, but it ignores this file for some reason
substituteInPlace "$out/bin/abcde-musicbrainz-tool" \
--replace '#!/usr/bin/perl' '#!${perl}/bin/perl'
wrapProgram "$out/bin/abcde" --prefix PATH ":" \
"$out/bin:${libcdio}/bin:${cddiscid}/bin:${wget}/bin:${vorbisTools}/bin:${id3v2}/bin:${lame}/bin"
wrapProgram "$out/bin/cddb-tool" --prefix PATH ":" \
"${wget}/bin"
wrapProgram "$out/bin/abcde-musicbrainz-tool" --prefix PATH ":" \
"${wget}/bin"
'';
meta = {
homepage = http://www.hispalinux.es/~data/abcde.php;
homepage = "http://lly.org/~rcw/abcde/page/";
licence = "GPLv2+";
description = "A Better CD Encoder (ABCDE)";

View File

@ -1,21 +0,0 @@
--- abcde-2.3.3/Makefile~ 2005-08-26 00:43:27.000000000 +0200
+++ abcde-2.3.3/Makefile 2008-05-26 22:20:17.000000000 +0200
@@ -14,13 +14,13 @@ clean:
install:
$(INSTALL) -d -m 755 $(bindir)
- $(INSTALL) -m 755 -o 0 abcde $(bindir)
- $(INSTALL) -m 755 -o 0 cddb-tool $(bindir)
+ $(INSTALL) -m 755 abcde $(bindir)
+ $(INSTALL) -m 755 cddb-tool $(bindir)
$(INSTALL) -d -m 755 $(mandir)
- $(INSTALL) -m 644 -o 0 abcde.1 $(mandir)
- $(INSTALL) -m 644 -o 0 cddb-tool.1 $(mandir)
+ $(INSTALL) -m 644 abcde.1 $(mandir)
+ $(INSTALL) -m 644 cddb-tool.1 $(mandir)
$(INSTALL) -d -m 755 $(etcdir)
- $(INSTALL) -m 644 -o 0 abcde.conf $(etcdir)
+ $(INSTALL) -m 644 abcde.conf $(etcdir)
tarball:
@cd .. && tar czvf abcde_$(VERSION).orig.tar.gz \

View File

@ -1,16 +0,0 @@
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."

View File

@ -1,8 +1,9 @@
{ stdenv, fetchurl, cmake }:
{ stdenv, fetchurl, cmake, pkgconfig }:
stdenv.mkDerivation rec {
name = "libdiscid-0.2.2";
buildNativeInputs = [ pkgconfig ];
buildInputs = [ cmake ];
src = fetchurl {
@ -10,6 +11,13 @@ stdenv.mkDerivation rec {
sha256 = "00l4ln9rk0vqf67iccwqrgc9qx1al92i05zylh85kd1zn9d5sjwp";
};
# developer forgot to update his version number
# this is propagated to pkg-config
preConfigure = ''
substituteInPlace "CMakeLists.txt" \
--replace "PROJECT_VERSION 0.1.1" "PROJECT_VERSION 0.2.2"
'';
meta = {
description = "A C library for creating MusicBrainz DiscIDs from audio CDs";
homepage = http://musicbrainz.org/doc/libdiscid;

View File

@ -6510,7 +6510,9 @@ let
aangifte2011 = callPackage_i686 ../applications/taxes/aangifte-2011 { };
abcde = callPackage ../applications/audio/abcde { };
abcde = callPackage ../applications/audio/abcde {
inherit (perlPackages) DigestSHA MusicBrainz MusicBrainzDiscID;
};
abiword = callPackage ../applications/office/abiword {
inherit (gnome) libglade libgnomecanvas;

View File

@ -2775,6 +2775,30 @@ rec {
};
};
MusicBrainzDiscID = buildModule rec {
name = "MusicBrainz-DiscID-0.03";
src = fetchurl {
url = "mirror://cpan/authors/id/N/NJ/NJH/${name}.tar.gz";
sha256 = "0fjph2q3yp0aa87gckv3391s47m13wbyylj7jb7vqx7hv0pzj0jh";
};
# Build.PL in this package uses which to find pkg-config -- make it use path instead
patchPhase = ''sed -ie 's/`which pkg-config`/"pkg-config"/' Build.PL'';
doCheck = false; # The main test performs network access
#buildInputs = [ TestMore TestPod ];
buildInputs = [ pkgs.pkgconfig ];
propagatedBuildInputs = [ pkgs.libdiscid ];
};
MusicBrainz = buildPerlPackage rec {
name = "WebService-MusicBrainz-0.93";
src = fetchurl {
url = "mirror://cpan/authors/id/B/BF/BFAIST/${name}.tar.gz";
sha256 = "1gg62x6qv4jj73jsqh0sb237k96i22blj29afpbp1scp3m7i5g61";
};
propagatedBuildInputs = [ XMLLibXML LWP ClassAccessor URI ];
doCheck = false; # Test performs network access.
};
NamespaceAutoclean = buildPerlPackage rec {
name = "namespace-autoclean-0.12";
src = fetchurl {
@ -4345,13 +4369,13 @@ rec {
};
};
XSLoader = buildPerlPackage {
name = "XSLoader-0.08";
src = fetchurl {
url = mirror://cpan/authors/id/S/SA/SAPER/XSLoader-0.08.tar.gz;
sha256 = "0mr4l3givrpyvz1kg0kap2ds8g0rza2cim9kbnjy8hi64igkixi5";
};
};
# XSLoader = buildPerlPackage {
# name = "XSLoader-0.08";
# src = fetchurl {
# url = mirror://cpan/authors/id/S/SA/SAPER/XSLoader-0.08.tar.gz;
# sha256 = "0mr4l3givrpyvz1kg0kap2ds8g0rza2cim9kbnjy8hi64igkixi5";
# };
# };
YAML = buildPerlPackage rec {
name = "YAML-0.80";