2013-07-04 06:06:22 +01:00
|
|
|
{ stdenv, fetchurl, nasm, autoconf, automake, libtool }:
|
2010-04-30 22:47:09 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2011-07-25 15:19:10 +01:00
|
|
|
name = "xvidcore-1.3.2";
|
2010-04-30 22:47:09 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2011-05-12 21:43:33 +01:00
|
|
|
url = "http://downloads.xvid.org/downloads/${name}.tar.bz2";
|
2011-07-25 15:19:10 +01:00
|
|
|
sha256 = "1x0b2rq6fv99ramifhkakycd0prjc93lbzrffbjgjwg7w4s17hfn";
|
2010-04-30 22:47:09 +01:00
|
|
|
};
|
|
|
|
|
2013-07-04 06:06:22 +01:00
|
|
|
preConfigure = ''
|
|
|
|
cd build/generic
|
|
|
|
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
|
|
|
substituteInPlace configure --replace "-no-cpp-precomp" ""
|
|
|
|
'';
|
2010-04-30 22:58:47 +01:00
|
|
|
|
2013-07-04 06:06:22 +01:00
|
|
|
configureFlags = stdenv.lib.optionals stdenv.isDarwin
|
|
|
|
[ "--enable-macosx_module" "--disable-assembly" ];
|
2011-07-25 15:19:10 +01:00
|
|
|
|
2013-07-04 05:55:32 +01:00
|
|
|
buildInputs = [ nasm ]
|
|
|
|
++ stdenv.lib.optionals stdenv.isDarwin [ autoconf automake libtool ];
|
|
|
|
|
|
|
|
# don't delete the '.a' files on darwin -- they're needed to compile ffmpeg
|
|
|
|
# (and perhaps other things)
|
|
|
|
postInstall = stdenv.lib.optionalString (!stdenv.isDarwin) ''
|
|
|
|
rm $out/lib/*.a
|
|
|
|
'' + ''
|
|
|
|
cd $out/lib
|
|
|
|
ln -s *.so.4.* libxvidcore.so
|
|
|
|
if [ ! -e libxvidcore.so.4 ]; then
|
|
|
|
ln -s *.so.4.* libxvidcore.so.4
|
|
|
|
fi
|
|
|
|
'';
|
2010-04-30 22:47:09 +01:00
|
|
|
|
2013-07-04 06:06:22 +01:00
|
|
|
meta = with stdenv.lib; {
|
2010-04-30 22:47:09 +01:00
|
|
|
description = "MPEG-4 video codec for PC";
|
2013-07-04 06:06:22 +01:00
|
|
|
homepage = http://www.xvid.org/;
|
2013-07-14 00:08:03 +01:00
|
|
|
license = licenses.gpl2;
|
2013-07-04 06:06:22 +01:00
|
|
|
maintainers = with maintainers; [ lovek323 ];
|
|
|
|
platforms = platforms.all;
|
2010-04-30 22:47:09 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|