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