Merge pull request #6324 from codyopel/x265br

X265br
This commit is contained in:
Domen Kožar 2015-02-13 01:22:16 +01:00
commit b2d17156bb
3 changed files with 38 additions and 40 deletions

View File

@ -1,7 +1,7 @@
{ callPackage, ... } @ args:
callPackage ./generic.nix (args // {
version = "1.4";
rev = "5e604833c5aa605d0b6efbe5234492b5e7d8ac61";
sha256 = "1aqksqi1qmjpva5cal6j7h0hzk298wk3nhqv73wnyqdchq2sa8v5";
version = "1.5";
rev = "9f0324125f53a12f766f6ed6f98f16e2f42337f4";
sha256 = "1nyim0l975faj7926s4wba8yvjy4rvx005zb7krv0gb5p84nzgi7";
})

View File

@ -1,12 +1,21 @@
{ stdenv, cmake, fetchhg, mercurial, yasm
{ stdenv, fetchhg, cmake, yasm
, rev , sha256, version
, highBitDepth ? false
, debuggingSupport ? false
, enableCli ? true
, testSupport ? false
, debugSupport ? false # Run-time sanity checks (debugging)
, highbitdepthSupport ? false # false=8bits per channel, true=10/12bits per channel
, werrorSupport ? false # Warnings as errors
, ppaSupport ? false # PPA profiling instrumentation
, vtuneSupport ? false # Vtune profiling instrumentation
, custatsSupport ? false # Internal profiling of encoder work
, cliSupport ? true # Build standalone CLI application
, unittestsSupport ? false # Unit tests
, ...
}:
let
mkFlag = optSet: flag: if optSet then "-D${flag}=ON" else "-D${flag}=OFF";
in
with stdenv.lib;
stdenv.mkDerivation rec {
name = "x265-${version}";
@ -20,39 +29,28 @@ stdenv.mkDerivation rec {
sed -i 's/unknown/${version}/g' source/cmake/version.cmake
'';
cmakeFlags = with stdenv.lib;
''
${if debuggingSupport
then "-DCHECKED_BUILD=ON"
else "-DCHECKED_BUILD=OFF"
}
-DSTATIC_LINK_CRT=OFF
${if (stdenv.system == "x86_64-linux" && highBitDepth)
then "-DHIGH_BIT_DEPTH=ON"
else "-DHIGH_BIT_DEPTH=OFF"
}
-DWARNINGS_AS_ERRORS=OFF
-DENABLE_PPA=OFF
-DENABLE_SHARED=ON
${if enableCli
then "-DENABLE_CLI=ON"
else "-DENABLE_CLI=OFF"
}
${if testSupport
then "-DENABLE_TESTS=ON"
else "-DENABLE_TESTS=OFF"
}
'';
cmakeFlags = with stdenv.lib; [
(mkFlag debugSupport "CHECKED_BUILD")
"-DSTATIC_LINK_CRT=OFF"
(mkFlag (highbitdepthSupport && stdenv.isx86_64) "HIGH_BIT_DEPTH")
(mkFlag werrorSupport "WARNINGS_AS_ERRORS")
(mkFlag ppaSupport "ENABLE_PPA")
"-DENABLE_SHARED=ON"
(mkFlag cliSupport "ENABLE_CLI")
(mkFlag unittestsSupport "ENABLE_TESTS")
];
preConfigure = "cd source";
preConfigure = ''
cd source
'';
buildInputs = [ cmake yasm ];
nativeBuildInputs = [ cmake yasm ];
meta = with stdenv.lib; {
homepage = "http://x265.org";
meta = {
description = "Library for encoding h.265/HEVC video streams";
license = licenses.gpl2;
platforms = platforms.linux;
homepage = http://x265.org;
license = licenses.gpl2;
maintainers = with maintainers; [ codyopel ];
platforms = platforms.all;
};
}

View File

@ -1,7 +1,7 @@
{ callPackage, ... } @ args:
callPackage ./generic.nix (args // rec {
version = "hg";
rev = "5f9f7194267b76f733e9ffb0f9e8b474dfe89a71";
sha256 = "056ng8nsadmjf6s7igbgbxmiapjcxpfy6pbayl764xbhpkv4md88";
version = "2015-2-11"; # Date of commit used Y-M-D
rev = "9ab104096834f51bd799ea1cf1160092f8182944";
sha256 = "1j4k6ylglrzng5rz29qx2z06amdrq8wyzvqhm4ivfzvpndfniim6";
})