2014-05-30 10:18:25 +01:00
|
|
|
{stdenv, fetchurl, bash, yasm, which, perl, binutils}:
|
2010-05-24 22:57:45 +01:00
|
|
|
|
2014-01-20 12:46:44 +00:00
|
|
|
let version = "1.3.0";
|
2013-06-11 17:03:48 +01:00
|
|
|
in
|
2010-05-24 22:57:45 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2013-06-11 17:03:48 +01: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 22:57:45 +01: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 09:36:09 +01:00
|
|
|
sed -e '/enable linux/d' -i configure
|
2010-05-24 22:57:45 +01:00
|
|
|
'';
|
|
|
|
|
2014-05-30 10:18:25 +01:00
|
|
|
buildInputs = [ yasm which perl ]
|
|
|
|
++ stdenv.lib.optional stdenv.isDarwin binutils; # new asm opcode support
|
2010-09-01 09:36:09 +01:00
|
|
|
|
|
|
|
preConfigure = ''
|
2010-05-24 22:57:45 +01:00
|
|
|
mkdir -p build
|
|
|
|
cd build
|
2013-07-04 06:03:46 +01:00
|
|
|
substituteInPlace make/configure.sh --replace "-arch x86_64" "-march=x86-64"
|
2010-05-24 22:57:45 +01:00
|
|
|
'';
|
|
|
|
|
2013-06-11 17:03:48 +01:00
|
|
|
configureScript = "../configure";
|
2013-07-04 06:03:46 +01: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 09:36:09 +01:00
|
|
|
|
2010-05-24 22:57:45 +01:00
|
|
|
installPhase = ''
|
|
|
|
make quiet=false DIST_DIR=$out install
|
|
|
|
'';
|
|
|
|
|
2013-07-04 06:03:46 +01:00
|
|
|
meta = with stdenv.lib; {
|
2010-05-24 22:57:45 +01:00
|
|
|
description = "VP8 video encoder";
|
2013-07-04 06:03:46 +01:00
|
|
|
homepage = http://code.google.com/p/webm;
|
2013-07-13 20:54:39 +01:00
|
|
|
license = licenses.bsd3;
|
2013-07-04 06:03:46 +01:00
|
|
|
maintainers = with maintainers; [ lovek323 ];
|
|
|
|
platforms = platforms.unix;
|
2010-05-24 22:57:45 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|