3
0
Fork 0
forked from mirrors/nixpkgs

opencv3: 3.4.6 -> 3.4.7

This commit is contained in:
Orivej Desh 2019-07-26 23:46:38 +00:00
parent b36bed3c06
commit c5592fabba

View file

@ -35,20 +35,20 @@
}: }:
let let
version = "3.4.6"; version = "3.4.7";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "opencv"; owner = "opencv";
repo = "opencv"; repo = "opencv";
rev = version; rev = version;
sha256 = "1gf0rbgd5s13q46bdna0bqn4yz9rxfhvlhbp5ds9hs326q8zprg8"; sha256 = "0r5rrcnqx2lsnr1ja5ij2chb7yk9kkamr4p0ik52sqxydwkv3z50";
}; };
contribSrc = fetchFromGitHub { contribSrc = fetchFromGitHub {
owner = "opencv"; owner = "opencv";
repo = "opencv_contrib"; repo = "opencv_contrib";
rev = version; rev = version;
sha256 = "115qcq0k2wmvhxw5lyv14yrd8m6xq3qy0pdby90ml2yl1caymbfy"; sha256 = "1ik6acsmgrx66awf19r2y3ijqvv9xg43gaphwszbiyi0jq3r43yw";
}; };
# Contrib must be built in order to enable Tesseract support: # Contrib must be built in order to enable Tesseract support:
@ -61,16 +61,16 @@ let
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "opencv"; owner = "opencv";
repo = "opencv_3rdparty"; repo = "opencv_3rdparty";
rev = "bdb7bb85f34a8cb0d35e40a81f58da431aa1557a"; rev = "32e315a5b106a7b89dbed51c28f8120a48b368b4";
sha256 = "1ys9mshfpm8iy8h4ml792gnqrq959dsrcv26axx14niivxyjbji8"; sha256 = "19w9f0r16072s59diqxsr5q6nmwyz9gnxjs49nglzhd66p3ddbkp";
} + "/ippicv"; } + "/ippicv";
files = let name = platform : "ippicv_2017u3_${platform}_general_20180518.tgz"; in files = let name = platform : "ippicv_2019_${platform}_general_20180723.tgz"; in
if stdenv.hostPlatform.system == "x86_64-linux" then if stdenv.hostPlatform.system == "x86_64-linux" then
{ ${name "lnx_intel64"} = "b7cc351267db2d34b9efa1cd22ff0572"; } { ${name "lnx_intel64"} = "c0bd78adb4156bbf552c1dfe90599607"; }
else if stdenv.hostPlatform.system == "i686-linux" then else if stdenv.hostPlatform.system == "i686-linux" then
{ ${name "lnx_ia32"} = "ea72de74dae3c604eb6348395366e78e"; } { ${name "lnx_ia32"} = "4f38432c30bfd6423164b7a24bbc98a0"; }
else if stdenv.hostPlatform.system == "x86_64-darwin" then else if stdenv.hostPlatform.system == "x86_64-darwin" then
{ ${name "mac_intel64"} = "3ae52b9be0fe73dd45bc5e9429cd3732"; } { ${name "mac_intel64"} = "fe6b2bb75ae0e3f19ad3ae1a31dfa4a2"; }
else else
throw "ICV is not available for this platform (or not yet supported by this package)"; throw "ICV is not available for this platform (or not yet supported by this package)";
dst = ".cache/ippicv"; dst = ".cache/ippicv";
@ -147,12 +147,6 @@ stdenv.mkDerivation rec {
cp --no-preserve=mode -r "${contribSrc}/modules" "$NIX_BUILD_TOP/opencv_contrib" cp --no-preserve=mode -r "${contribSrc}/modules" "$NIX_BUILD_TOP/opencv_contrib"
''; '';
patches = lib.optional stdenv.isDarwin
(fetchpatch {
url = "https://github.com/opencv/opencv/commit/7621b91769098359e893e68ad474040ca7940fa1.patch";
sha256 = "12qb14yd5934ig61lzs4pg29gak9wjyhnj7nmfx5r213jj1a4m21";
});
# This prevents cmake from using libraries in impure paths (which # This prevents cmake from using libraries in impure paths (which
# causes build failure on non NixOS) # causes build failure on non NixOS)
# Also, work around https://github.com/NixOS/nixpkgs/issues/26304 with # Also, work around https://github.com/NixOS/nixpkgs/issues/26304 with
@ -246,6 +240,9 @@ stdenv.mkDerivation rec {
"-DBUILD_opencv_videoio=OFF" "-DBUILD_opencv_videoio=OFF"
] ++ lib.optionals enablePython [ ] ++ lib.optionals enablePython [
"-DOPENCV_SKIP_PYTHON_LOADER=ON" "-DOPENCV_SKIP_PYTHON_LOADER=ON"
] ++ lib.optional enableEigen [
# Autodetection broken by https://github.com/opencv/opencv/pull/13337
"-DEIGEN_INCLUDE_PATH=${eigen}/include/eigen3"
]; ];
enableParallelBuilding = true; enableParallelBuilding = true;