x265: 3.2 -> 3.4

This commit is contained in:
Titouan 2020-09-16 11:59:49 +02:00 committed by Frederik Rietdijk
parent b90105fa10
commit c1a0aa7eb7

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, fetchpatch, cmake, nasm, numactl { stdenv, fetchFromBitbucket, cmake, nasm, numactl
, numaSupport ? stdenv.hostPlatform.isLinux && (stdenv.hostPlatform.isx86 || stdenv.hostPlatform.isAarch64) # Enabled by default on NUMA platforms , numaSupport ? stdenv.hostPlatform.isLinux && (stdenv.hostPlatform.isx86 || stdenv.hostPlatform.isAarch64) # Enabled by default on NUMA platforms
, debugSupport ? false # Run-time sanity checks (debugging) , debugSupport ? false # Run-time sanity checks (debugging)
, werrorSupport ? false # Warnings as errors , werrorSupport ? false # Warnings as errors
@ -23,31 +23,23 @@ let
(mkFlag werrorSupport "WARNINGS_AS_ERRORS") (mkFlag werrorSupport "WARNINGS_AS_ERRORS")
]; ];
version = "3.2"; version = "3.4";
src = fetchurl { src = fetchFromBitbucket {
urls = [ owner = "multicoreware";
"https://get.videolan.org/x265/x265_${version}.tar.gz" repo = "x265_git";
"ftp://ftp.videolan.org/pub/videolan/x265/x265_${version}.tar.gz" rev = "${version}";
]; sha256 = "1jzgv2hxhcwmsdf6sbgyzm88a46dp09ll1fqj92g9vckvh9a7dsn";
sha256 = "0fqkhfhr22gzavxn60cpnj3agwdf5afivszxf3haj5k1sny7jk9n";
}; };
patches = [
# Fix build on ARM (#406)
(fetchpatch {
url = "https://bitbucket.org/multicoreware/x265/issues/attachments/406/multicoreware/x265/1527562952.26/406/X265-2.8-asm-primitives.patch";
sha256 = "1vf8bpl37gbd9dcbassgkq9i0rp24qm3bl6hx9zv325174bn402v";
})
];
buildLib = has12Bit: stdenv.mkDerivation rec { buildLib = has12Bit: stdenv.mkDerivation rec {
name = "libx265-${if has12Bit then "12" else "10"}-${version}"; name = "libx265-${if has12Bit then "12" else "10"}-${version}";
inherit src patches; inherit src;
enableParallelBuilding = true; enableParallelBuilding = true;
postPatch = '' postPatch = ''
sed -i 's/unknown/${version}/g' source/cmake/version.cmake sed -i 's/unknown/${version}/g' source/cmake/version.cmake
sed -i 's/0.0/${version}/g' source/cmake/version.cmake
''; '';
cmakeLibFlags = [ cmakeLibFlags = [
@ -72,12 +64,13 @@ in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "x265"; pname = "x265";
inherit version src patches; inherit version src;
enableParallelBuilding = true; enableParallelBuilding = true;
postPatch = '' postPatch = ''
sed -i 's/unknown/${version}/g' source/cmake/version.cmake sed -i 's/unknown/${version}/g' source/cmake/version.cmake
sed -i 's/0.0/${version}/g' source/cmake/version.cmake
''; '';
cmakeFlags = [ cmakeFlags = [