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