diff --git a/pkgs/development/libraries/opencv/4.x.nix b/pkgs/development/libraries/opencv/4.x.nix index ce7f98223357..664f39c0c6cd 100644 --- a/pkgs/development/libraries/opencv/4.x.nix +++ b/pkgs/development/libraries/opencv/4.x.nix @@ -76,20 +76,20 @@ }: let - version = "4.5.4"; + version = "4.6.0"; src = fetchFromGitHub { owner = "opencv"; repo = "opencv"; rev = version; - sha256 = "sha256-eIESkc/yYiZZ5iY4t/rAPd+jfjuMYR3srCBC4fO3g70="; + sha256 = "sha256-zPkMc6xEDZU5TlBH3LAzvB17XgocSPeHVMG/U6kfpxg="; }; contribSrc = fetchFromGitHub { owner = "opencv"; repo = "opencv_contrib"; rev = version; - sha256 = "sha256-RkCIGukZ8KJkmVZQAZTWdVcVKD2I3NcfGShcqzKhQD0="; + sha256 = "sha256-hjRqT7V4Sz7t4IEy89F5M+b0x2ObBbqF8GWLKhWFXtE="; }; # Contrib must be built in order to enable Tesseract support: @@ -177,7 +177,7 @@ let dst = ".cache/ade"; }; - # See opencv/modules/wechat_qrcode/CMakeLists.txt + # See opencv_contrib/modules/wechat_qrcode/CMakeLists.txt wechat_qrcode = { src = fetchFromGitHub { owner = "opencv"; diff --git a/pkgs/development/libraries/opencv/cmake-don-t-use-OpenCVFindOpenEXR.patch b/pkgs/development/libraries/opencv/cmake-don-t-use-OpenCVFindOpenEXR.patch index bb398f7546b0..abeb0d9fde4b 100644 --- a/pkgs/development/libraries/opencv/cmake-don-t-use-OpenCVFindOpenEXR.patch +++ b/pkgs/development/libraries/opencv/cmake-don-t-use-OpenCVFindOpenEXR.patch @@ -1,8 +1,8 @@ diff --git a/cmake/OpenCVFindLibsGrfmt.cmake b/cmake/OpenCVFindLibsGrfmt.cmake -index 23a6ca6959..27e121943a 100644 +index 00886cc131..e412771322 100644 --- a/cmake/OpenCVFindLibsGrfmt.cmake +++ b/cmake/OpenCVFindLibsGrfmt.cmake -@@ -255,21 +255,12 @@ endif() +@@ -257,23 +257,12 @@ endif() # --- OpenEXR (optional) --- if(WITH_OPENEXR) ocv_clear_vars(HAVE_OPENEXR) @@ -20,7 +20,9 @@ index 23a6ca6959..27e121943a 100644 - set(OPENEXR_LIBRARIES IlmImf) - add_subdirectory("${OpenCV_SOURCE_DIR}/3rdparty/openexr") - if(OPENEXR_VERSION) # check via TARGET doesn't work +- set(BUILD_OPENEXR ON) - set(HAVE_OPENEXR YES) +- set(BUILD_OPENEXR ON) - endif() + set(OPENEXR_INCLUDE_PATHS ${OPENEXR_INCLUDE_DIRS}) + set(OPENEXR_LIBRARIES ${OPENEXR_LIBRARIES})