2010-04-18 18:07:03 +00:00
|
|
|
{stdenv, fetchurl, autoconf}:
|
2004-04-02 15:36:14 +00:00
|
|
|
|
2013-07-04 07:07:30 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2006-06-29 12:41:25 +00:00
|
|
|
name = "libmad-0.15.1b";
|
2009-02-03 16:31:11 +00:00
|
|
|
|
2003-12-03 21:58:16 +00:00
|
|
|
src = fetchurl {
|
2013-07-04 07:07:30 +00:00
|
|
|
url = "mirror://sourceforge/mad/${name}.tar.gz";
|
2008-02-11 21:02:38 +00:00
|
|
|
sha256 = "bbfac3ed6bfbc2823d3775ebb931087371e142bb0e9bb1bee51a76a6e0078690";
|
|
|
|
};
|
|
|
|
|
2015-03-05 21:05:22 +00:00
|
|
|
patches = [ ./001-mips_removal_h_constraint.patch ./pkgconfig.patch ]
|
|
|
|
# optimize.diff is taken from https://projects.archlinux.org/svntogit/packages.git/tree/trunk/optimize.diff?h=packages/libmad
|
|
|
|
# It is included here in order to fix a build failure in Clang
|
|
|
|
# But it may be useful to fix other, currently unknown problems as well
|
2015-05-11 21:37:53 +00:00
|
|
|
++ stdenv.lib.optional stdenv.cc.isClang [ ./optimize.diff ];
|
2010-08-21 16:53:25 +00:00
|
|
|
|
2012-12-28 18:20:09 +00:00
|
|
|
nativeBuildInputs = [ autoconf ];
|
2010-04-18 18:07:03 +00:00
|
|
|
|
2009-02-03 16:31:11 +00:00
|
|
|
# The -fforce-mem flag has been removed in GCC 4.3.
|
|
|
|
preConfigure = ''
|
2010-08-21 16:53:25 +00:00
|
|
|
autoconf
|
2009-02-03 16:31:11 +00:00
|
|
|
substituteInPlace configure --replace "-fforce-mem" ""
|
2013-07-04 07:07:30 +00:00
|
|
|
substituteInPlace configure --replace "arch=\"-march=i486\"" ""
|
2009-02-03 16:31:11 +00:00
|
|
|
'';
|
2008-02-11 21:02:38 +00:00
|
|
|
|
2013-07-04 07:07:30 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = http://sourceforge.net/projects/mad/;
|
2009-03-03 13:27:40 +00:00
|
|
|
description = "A high-quality, fixed-point MPEG audio decoder supporting MPEG-1 and MPEG-2";
|
2015-03-05 21:05:22 +00:00
|
|
|
license = licenses.gpl2;
|
2013-07-04 07:07:30 +00:00
|
|
|
maintainers = with maintainers; [ lovek323 ];
|
|
|
|
platforms = platforms.unix;
|
2003-12-03 21:58:16 +00:00
|
|
|
};
|
|
|
|
}
|