Merge pull request #4799 from codyopel/x265-refactor
x265: refactored to generic, fixed build versioning
This commit is contained in:
commit
6fa4668914
|
@ -1,52 +1,7 @@
|
||||||
{ stdenv, cmake, fetchurl, yasm
|
{ callPackage, ... } @ args:
|
||||||
, highBitDepth ? false
|
|
||||||
, debuggingSupport ? false
|
|
||||||
, enableCli ? true
|
|
||||||
, testSupport ? false
|
|
||||||
}:
|
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
callPackage ./generic.nix (args // {
|
||||||
version = "1.3";
|
version = "1.4";
|
||||||
name = "x265-${version}";
|
rev = "5e604833c5aa605d0b6efbe5234492b5e7d8ac61";
|
||||||
|
sha256 = "1aqksqi1qmjpva5cal6j7h0hzk298wk3nhqv73wnyqdchq2sa8v5";
|
||||||
src = fetchurl {
|
})
|
||||||
url = "mirror://gentoo/distfiles/${name}.tar.bz2";
|
|
||||||
sha256 = "3807090a99bc351894d58eb037db4f1487b2dba3489eb2c38ab43dd6b7c9b09d";
|
|
||||||
};
|
|
||||||
|
|
||||||
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"
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
|
|
||||||
preConfigure = "cd source";
|
|
||||||
|
|
||||||
buildInputs = [ cmake yasm ];
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
|
||||||
homepage = "http://x265.org";
|
|
||||||
description = "Library for encoding h.265/HEVC video streams";
|
|
||||||
license = licenses.gpl2;
|
|
||||||
platforms = platforms.linux;
|
|
||||||
maintainers = with maintainers; [ codyopel ];
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -0,0 +1,58 @@
|
||||||
|
{ stdenv, cmake, fetchhg, mercurial, yasm
|
||||||
|
, rev , sha256, version
|
||||||
|
, highBitDepth ? false
|
||||||
|
, debuggingSupport ? false
|
||||||
|
, enableCli ? true
|
||||||
|
, testSupport ? false
|
||||||
|
, ...
|
||||||
|
}:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
name = "x265-${version}";
|
||||||
|
|
||||||
|
src = fetchhg {
|
||||||
|
url = "https://bitbucket.org/multicoreware/x265/src";
|
||||||
|
inherit rev;
|
||||||
|
inherit sha256;
|
||||||
|
};
|
||||||
|
|
||||||
|
patchPhase = ''
|
||||||
|
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"
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
|
||||||
|
preConfigure = "cd source";
|
||||||
|
|
||||||
|
buildInputs = [ cmake yasm ];
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
homepage = "http://x265.org";
|
||||||
|
description = "Library for encoding h.265/HEVC video streams";
|
||||||
|
license = licenses.gpl2;
|
||||||
|
platforms = platforms.linux;
|
||||||
|
maintainers = with maintainers; [ codyopel ];
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,52 +1,7 @@
|
||||||
{ stdenv, cmake, fetchhg, yasm
|
{ callPackage, ... } @ args:
|
||||||
, highBitDepth ? false
|
|
||||||
, debuggingSupport ? false
|
|
||||||
, enableCli ? true
|
|
||||||
, testSupport ? false
|
|
||||||
}:
|
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
callPackage ./generic.nix (args // rec {
|
||||||
name = "x265-hg";
|
version = "hg-${rev}";
|
||||||
|
rev = "eebb372eec893efc50e66806fcc19b1c1bd89683";
|
||||||
src = fetchhg {
|
sha256 = "03dpbjqcmbmyid45560byabybfzy2bvic0gqa6k6hxci6rvmynpi";
|
||||||
url = "https://bitbucket.org/multicoreware/x265/src";
|
})
|
||||||
rev = "eebb372eec893efc50e66806fcc19b1c1bd89683";
|
|
||||||
sha256 = "03dpbjqcmbmyid45560byabybfzy2bvic0gqa6k6hxci6rvmynpi";
|
|
||||||
};
|
|
||||||
|
|
||||||
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"
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
|
|
||||||
preConfigure = "cd source";
|
|
||||||
|
|
||||||
buildInputs = [ cmake yasm ];
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
|
||||||
homepage = "http://x265.org";
|
|
||||||
description = "Library for encoding h.265/HEVC video streams";
|
|
||||||
license = licenses.gpl2;
|
|
||||||
platforms = platforms.linux;
|
|
||||||
maintainers = with maintainers; [ codyopel ];
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
Reference in New Issue