2010-04-18 11:07:03 -07:00
|
|
|
{stdenv, fetchurl, autoconf}:
|
2004-04-02 07:36:14 -08:00
|
|
|
|
2013-07-04 00:07:30 -07:00
|
|
|
stdenv.mkDerivation rec {
|
2006-06-29 05:41:25 -07:00
|
|
|
name = "libmad-0.15.1b";
|
2009-02-03 08:31:11 -08:00
|
|
|
|
2003-12-03 13:58:16 -08:00
|
|
|
src = fetchurl {
|
2013-07-04 00:07:30 -07:00
|
|
|
url = "mirror://sourceforge/mad/${name}.tar.gz";
|
2008-02-11 13:02:38 -08:00
|
|
|
sha256 = "bbfac3ed6bfbc2823d3775ebb931087371e142bb0e9bb1bee51a76a6e0078690";
|
|
|
|
};
|
|
|
|
|
2015-03-05 13:05:22 -08: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 14:37:53 -07:00
|
|
|
++ stdenv.lib.optional stdenv.cc.isClang [ ./optimize.diff ];
|
2010-08-21 09:53:25 -07:00
|
|
|
|
2012-12-28 10:20:09 -08:00
|
|
|
nativeBuildInputs = [ autoconf ];
|
2010-04-18 11:07:03 -07:00
|
|
|
|
2009-02-03 08:31:11 -08:00
|
|
|
# The -fforce-mem flag has been removed in GCC 4.3.
|
|
|
|
preConfigure = ''
|
2010-08-21 09:53:25 -07:00
|
|
|
autoconf
|
2009-02-03 08:31:11 -08:00
|
|
|
substituteInPlace configure --replace "-fforce-mem" ""
|
2013-07-04 00:07:30 -07:00
|
|
|
substituteInPlace configure --replace "arch=\"-march=i486\"" ""
|
2009-02-03 08:31:11 -08:00
|
|
|
'';
|
2008-02-11 13:02:38 -08:00
|
|
|
|
2013-07-04 00:07:30 -07:00
|
|
|
meta = with stdenv.lib; {
|
2017-08-02 14:50:51 -07:00
|
|
|
homepage = https://sourceforge.net/projects/mad/;
|
2009-03-03 05:27:40 -08:00
|
|
|
description = "A high-quality, fixed-point MPEG audio decoder supporting MPEG-1 and MPEG-2";
|
2015-03-05 13:05:22 -08:00
|
|
|
license = licenses.gpl2;
|
2013-07-04 00:07:30 -07:00
|
|
|
maintainers = with maintainers; [ lovek323 ];
|
|
|
|
platforms = platforms.unix;
|
2003-12-03 13:58:16 -08:00
|
|
|
};
|
|
|
|
}
|