[opencv] Add Patch to Skip ZLIB Hacks (#23132)

This commit is contained in:
Bobby Reynolds 2022-02-16 21:54:38 -08:00 committed by GitHub
parent 6647a76be8
commit f54a7b0013
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 44 additions and 4 deletions

View File

@ -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)

View File

@ -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")

View File

@ -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",

View File

@ -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)

View File

@ -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")

View File

@ -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": [

View File

@ -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",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "76d605b750c5535590489574dc24fa30ffe249f8",
"version": "3.4.16",
"port-version": 3
},
{
"git-tree": "a11dd583ecb7212732fedb0ab3e3308ea84f10d9",
"version": "3.4.16",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "ce474a40e6572ced8dd1229f22f6cbed9cc74212",
"version": "4.5.4",
"port-version": 4
},
{
"git-tree": "b170a087d34521462cd247a24f230627a272975e",
"version": "4.5.4",