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