diff --git a/ports/opencv3/0012-fix-zlib.patch b/ports/opencv3/0012-fix-zlib.patch new file mode 100644 index 0000000000..7f01dabf3c --- /dev/null +++ b/ports/opencv3/0012-fix-zlib.patch @@ -0,0 +1,14 @@ +diff --git a/cmake/OpenCVFindLibsGrfmt.cmake b/cmake/OpenCVFindLibsGrfmt.cmake +index 6dbeca9..08e2f4a 100644 +--- a/cmake/OpenCVFindLibsGrfmt.cmake ++++ b/cmake/OpenCVFindLibsGrfmt.cmake +@@ -5,6 +5,9 @@ + # --- zlib (required) --- + if(BUILD_ZLIB) + ocv_clear_vars(ZLIB_FOUND) ++elseif(1) ++ ocv_clear_internal_cache_vars(ZLIB_LIBRARY ZLIB_INCLUDE_DIR) ++ find_package(ZLIB "${MIN_VER_ZLIB}" REQUIRED) + else() + ocv_clear_internal_cache_vars(ZLIB_LIBRARY ZLIB_INCLUDE_DIR) + if(ANDROID) diff --git a/ports/opencv3/portfile.cmake b/ports/opencv3/portfile.cmake index f1b4315b7c..7f8b548380 100644 --- a/ports/opencv3/portfile.cmake +++ b/ports/opencv3/portfile.cmake @@ -26,6 +26,7 @@ vcpkg_from_github( 0009-fix-protobuf.patch 0010-fix-uwp-tiff-imgcodecs.patch 0011-remove-python2.patch + 0012-fix-zlib.patch ) if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") diff --git a/ports/opencv3/vcpkg.json b/ports/opencv3/vcpkg.json index 804084d71d..530cc0ca7e 100644 --- a/ports/opencv3/vcpkg.json +++ b/ports/opencv3/vcpkg.json @@ -1,7 +1,7 @@ { "name": "opencv3", "version": "3.4.16", - "port-version": 2, + "port-version": 3, "description": "computer vision library", "homepage": "https://github.com/opencv/opencv", "license": "BSD-3-Clause", diff --git a/ports/opencv4/0012-fix-zlib.patch b/ports/opencv4/0012-fix-zlib.patch new file mode 100644 index 0000000000..9c38fd8925 --- /dev/null +++ b/ports/opencv4/0012-fix-zlib.patch @@ -0,0 +1,14 @@ +diff --git a/cmake/OpenCVFindLibsGrfmt.cmake b/cmake/OpenCVFindLibsGrfmt.cmake +index 8ea5497..7ed3f6b 100644 +--- a/cmake/OpenCVFindLibsGrfmt.cmake ++++ b/cmake/OpenCVFindLibsGrfmt.cmake +@@ -5,6 +5,9 @@ + # --- zlib (required) --- + if(BUILD_ZLIB) + ocv_clear_vars(ZLIB_FOUND) ++elseif(1) ++ ocv_clear_internal_cache_vars(ZLIB_LIBRARY ZLIB_INCLUDE_DIR) ++ find_package(ZLIB "${MIN_VER_ZLIB}" REQUIRED) + else() + ocv_clear_internal_cache_vars(ZLIB_LIBRARY ZLIB_INCLUDE_DIR) + if(ANDROID) diff --git a/ports/opencv4/portfile.cmake b/ports/opencv4/portfile.cmake index 500038ff06..71c805b76d 100644 --- a/ports/opencv4/portfile.cmake +++ b/ports/opencv4/portfile.cmake @@ -26,6 +26,7 @@ vcpkg_from_github( 0009-fix-protobuf.patch 0010-fix-uwp-tiff-imgcodecs.patch 0011-remove-python2.patch + 0012-fix-zlib.patch ) if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") diff --git a/ports/opencv4/vcpkg.json b/ports/opencv4/vcpkg.json index 763c219e8d..ffdd95f97f 100644 --- a/ports/opencv4/vcpkg.json +++ b/ports/opencv4/vcpkg.json @@ -1,7 +1,7 @@ { "name": "opencv4", "version": "4.5.4", - "port-version": 3, + "port-version": 4, "description": "computer vision library", "homepage": "https://github.com/opencv/opencv", "dependencies": [ diff --git a/versions/baseline.json b/versions/baseline.json index c8b5e0096a..0edbad27e2 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -5002,11 +5002,11 @@ }, "opencv3": { "baseline": "3.4.16", - "port-version": 2 + "port-version": 3 }, "opencv4": { "baseline": "4.5.4", - "port-version": 3 + "port-version": 4 }, "opendnp3": { "baseline": "3.1.1", diff --git a/versions/o-/opencv3.json b/versions/o-/opencv3.json index 98617f1fd0..167793486c 100644 --- a/versions/o-/opencv3.json +++ b/versions/o-/opencv3.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "76d605b750c5535590489574dc24fa30ffe249f8", + "version": "3.4.16", + "port-version": 3 + }, { "git-tree": "a11dd583ecb7212732fedb0ab3e3308ea84f10d9", "version": "3.4.16", diff --git a/versions/o-/opencv4.json b/versions/o-/opencv4.json index 2add172495..ee29cc212f 100644 --- a/versions/o-/opencv4.json +++ b/versions/o-/opencv4.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "ce474a40e6572ced8dd1229f22f6cbed9cc74212", + "version": "4.5.4", + "port-version": 4 + }, { "git-tree": "b170a087d34521462cd247a24f230627a272975e", "version": "4.5.4",