2014-05-30 09:18:25 +00:00
|
|
|
{stdenv, fetchurl, bash, yasm, which, perl, binutils}:
|
2010-05-24 21:57:45 +00:00
|
|
|
|
2014-01-20 12:46:44 +00:00
|
|
|
let version = "1.3.0";
|
2013-06-11 16:03:48 +00:00
|
|
|
in
|
2010-05-24 21:57:45 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2013-06-11 16:03:48 +00:00
|
|
|
name = "libvpx-" + version;
|
|
|
|
|
|
|
|
src = fetchurl { # sadly, there's no official tarball for this release
|
2014-01-20 12:46:44 +00:00
|
|
|
url = "http://webm.googlecode.com/files/libvpx-v1.3.0.tar.bz2";
|
|
|
|
sha1 = "191b95817aede8c136cc3f3745fb1b8c50e6d5dc";
|
2010-05-24 21:57:45 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
sed -e 's,/bin/bash,${bash}/bin/bash,' -i configure build/make/version.sh \
|
2012-01-30 21:02:08 +00:00
|
|
|
examples/gen_example_code.sh build/make/gen_asm_deps.sh
|
2010-09-01 08:36:09 +00:00
|
|
|
sed -e '/enable linux/d' -i configure
|
2010-05-24 21:57:45 +00:00
|
|
|
'';
|
|
|
|
|
2014-05-30 09:18:25 +00:00
|
|
|
buildInputs = [ yasm which perl ]
|
|
|
|
++ stdenv.lib.optional stdenv.isDarwin binutils; # new asm opcode support
|
2010-09-01 08:36:09 +00:00
|
|
|
|
|
|
|
preConfigure = ''
|
2010-05-24 21:57:45 +00:00
|
|
|
mkdir -p build
|
|
|
|
cd build
|
2013-07-04 05:03:46 +00:00
|
|
|
substituteInPlace make/configure.sh --replace "-arch x86_64" "-march=x86-64"
|
2010-05-24 21:57:45 +00:00
|
|
|
'';
|
|
|
|
|
2013-06-11 16:03:48 +00:00
|
|
|
configureScript = "../configure";
|
2013-07-04 05:03:46 +00:00
|
|
|
configureFlags =
|
|
|
|
[ "--disable-install-srcs" "--disable-install-docs" "--disable-examples"
|
|
|
|
"--enable-vp8" "--enable-runtime-cpu-detect" "--enable-pic" ]
|
|
|
|
# --enable-shared is only supported on ELF
|
2014-01-20 13:24:05 +00:00
|
|
|
++ stdenv.lib.optional (!stdenv.isDarwin) "--disable-static --enable-shared";
|
2010-09-01 08:36:09 +00:00
|
|
|
|
2010-05-24 21:57:45 +00:00
|
|
|
installPhase = ''
|
|
|
|
make quiet=false DIST_DIR=$out install
|
|
|
|
'';
|
|
|
|
|
2013-07-04 05:03:46 +00:00
|
|
|
meta = with stdenv.lib; {
|
2010-05-24 21:57:45 +00:00
|
|
|
description = "VP8 video encoder";
|
2013-07-04 05:03:46 +00:00
|
|
|
homepage = http://code.google.com/p/webm;
|
2013-07-13 19:54:39 +00:00
|
|
|
license = licenses.bsd3;
|
2013-07-04 05:03:46 +00:00
|
|
|
maintainers = with maintainers; [ lovek323 ];
|
|
|
|
platforms = platforms.unix;
|
2010-05-24 21:57:45 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|