2015-02-17 07:01:10 +00:00
|
|
|
{ stdenv, fetchurl, yasm, autoconf, automake, libtool }:
|
2010-04-30 21:47:09 +00:00
|
|
|
|
2015-02-17 07:01:10 +00:00
|
|
|
with stdenv.lib;
|
2010-04-30 21:47:09 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2015-02-17 07:01:10 +00:00
|
|
|
name = "xvidcore-${version}";
|
2016-04-12 11:17:59 +00:00
|
|
|
version = "1.3.4";
|
2010-04-30 21:47:09 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2011-05-12 20:43:33 +00:00
|
|
|
url = "http://downloads.xvid.org/downloads/${name}.tar.bz2";
|
2016-04-12 11:17:59 +00:00
|
|
|
sha256 = "1xwbmp9wqshc0ckm970zdpi0yvgqxlqg0s8bkz98mnr8p2067bsz";
|
2010-04-30 21:47:09 +00:00
|
|
|
};
|
|
|
|
|
2013-07-04 05:06:22 +00:00
|
|
|
preConfigure = ''
|
2015-02-17 07:01:10 +00:00
|
|
|
# Configure script is not in the root of the source directory
|
2013-07-04 05:06:22 +00:00
|
|
|
cd build/generic
|
2015-02-17 07:01:10 +00:00
|
|
|
'' + optionalString stdenv.isDarwin ''
|
|
|
|
# Undocumented darwin hack
|
2013-07-04 05:06:22 +00:00
|
|
|
substituteInPlace configure --replace "-no-cpp-precomp" ""
|
|
|
|
'';
|
2010-04-30 21:58:47 +00:00
|
|
|
|
2015-02-17 07:01:10 +00:00
|
|
|
configureFlags = [ ]
|
|
|
|
# Undocumented darwin hack (assembly is probably disabled due to an
|
|
|
|
# issue with nasm, however yasm is now used)
|
|
|
|
++ optional stdenv.isDarwin "--enable-macosx_module --disable-assembly";
|
2011-07-25 14:19:10 +00:00
|
|
|
|
2015-02-17 07:01:10 +00:00
|
|
|
nativeBuildInputs = [ ]
|
|
|
|
++ optional (!stdenv.isDarwin) yasm;
|
2013-07-04 04:55:32 +00:00
|
|
|
|
2015-02-17 07:01:10 +00:00
|
|
|
buildInputs = [ ]
|
|
|
|
# Undocumented darwin hack
|
|
|
|
++ optionals stdenv.isDarwin [ autoconf automake libtool ];
|
|
|
|
|
|
|
|
# Don't remove static libraries (e.g. 'libs/*.a') on darwin. They're needed to
|
|
|
|
# compile ffmpeg (and perhaps other things).
|
|
|
|
postInstall = optionalString (!stdenv.isDarwin) ''
|
2013-07-04 04:55:32 +00:00
|
|
|
rm $out/lib/*.a
|
|
|
|
'';
|
2010-04-30 21:47:09 +00:00
|
|
|
|
2015-02-17 07:01:10 +00:00
|
|
|
meta = {
|
2010-04-30 21:47:09 +00:00
|
|
|
description = "MPEG-4 video codec for PC";
|
2015-02-17 07:01:10 +00:00
|
|
|
homepage = https://www.xvid.com/;
|
2013-07-13 23:08:03 +00:00
|
|
|
license = licenses.gpl2;
|
2015-02-17 07:01:10 +00:00
|
|
|
maintainers = with maintainers; [ codyopel lovek323 ];
|
2013-07-04 05:06:22 +00:00
|
|
|
platforms = platforms.all;
|
2010-04-30 21:47:09 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|