From 45a7b71cacb33d3f1b0b58d6f341ff5c8b57c479 Mon Sep 17 00:00:00 2001 From: fengyuentau Date: Fri, 16 Sep 2022 16:02:56 +0800 Subject: [PATCH 1/2] bump ADE to 0.1.2a --- cmake/mirrors/gitcode.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/mirrors/gitcode.cmake b/cmake/mirrors/gitcode.cmake index abd7a29be4..2f1e5e5f6f 100644 --- a/cmake/mirrors/gitcode.cmake +++ b/cmake/mirrors/gitcode.cmake @@ -20,10 +20,10 @@ ocv_update(TBB_PKG_NAME_GITCODE "tbb-${TBB_RELEASE_GITCODE}") ocv_update(TBB_PKG_MD5_GITCODE 4eeafdf16a90cb66e39a31c8d6c6804e) ocv_update(TBB_PKG_MD5_ORIGINAL 5af6f6c2a24c2043e62e47205e273b1f) # same as OPENCV_TBB_RELEASE_MD5 for TBB release of v2020.2 # ADE -ocv_update(ADE_RELEASE_GITCODE "v0.1.1f") +ocv_update(ADE_RELEASE_GITCODE "v0.1.2a") ocv_update(ADE_PKG_NAME_GITCODE "ade-${ADE_RELEASE_GITCODE}") -ocv_update(ADE_PKG_MD5_GITCODE c12909e0ccfa93138c820ba91ff37b3c) -ocv_update(ADE_PKG_MD5_ORIGINAL b624b995ec9c439cbc2e9e6ee940d3a2) # same as ade_md5 for ADE release of v0.1.1f +ocv_update(ADE_PKG_MD5_GITCODE 6c8015a886a98fd8a67635431fa171d8) +ocv_update(ADE_PKG_MD5_ORIGINAL fa4b3e25167319cb0fa9432ef8281945) # same as ade_md5 for ADE release of v0.1.2a # # Replace download links for packages in opencv/opencv_3rdparty: From 65998d8076fbda79c91b0b583d5cac7c1010ea7a Mon Sep 17 00:00:00 2001 From: fengyuentau Date: Fri, 16 Sep 2022 16:04:20 +0800 Subject: [PATCH 2/2] fix a bug when download from github instead but the subdir is changed to a wrong one --- cmake/mirrors/gitcode.cmake | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/cmake/mirrors/gitcode.cmake b/cmake/mirrors/gitcode.cmake index 2f1e5e5f6f..ec0893f3f7 100644 --- a/cmake/mirrors/gitcode.cmake +++ b/cmake/mirrors/gitcode.cmake @@ -57,13 +57,14 @@ macro(ocv_download_url_gitcode_archive_commit_id) message(WARNING "Package ${DL_ID} from mirror gitcode.net is outdated and will be downloaded from github.com instead.") endif() endmacro() -macro(ocv_download_url_gitcode_archive_release) +macro(ocv_download_url_gitcode_archive_release SUBDIR) if(DL_HASH STREQUAL "${${DL_ID}_PKG_MD5_ORIGINAL}") string(REPLACE "/" ";" DL_URL_split ${DL_URL}) list(GET DL_URL_split 3 __OWNER) list(GET DL_URL_split 4 __REPO_NAME) set(DL_URL "https://gitcode.net/${__OWNER}/${__REPO_NAME}/-/archive/${${DL_ID}_RELEASE_GITCODE}/${__REPO_NAME}-") set(DL_HASH "${${DL_ID}_PKG_MD5_GITCODE}") + set(SUBDIR "${${DL_ID}_PKG_NAME_GITCODE}" PARENT_SCOPE) else() message(WARNING "Package ${DL_ID} from mirror gitcode.net is outdated and will be downloaded from github.com instead.") endif() @@ -76,11 +77,9 @@ elseif(DL_ID STREQUAL "wechat_qrcode") elseif((DL_ID STREQUAL "TENGINE") OR (DL_ID STREQUAL "NVIDIA_OPTICAL_FLOW") OR (DL_ID STREQUAL "TIM-VX")) ocv_download_url_gitcode_archive_commit_id() elseif(DL_ID STREQUAL "TBB") - ocv_download_url_gitcode_archive_release() - set(OPENCV_TBB_SUBDIR "${TBB_PKG_NAME_GITCODE}" PARENT_SCOPE) + ocv_download_url_gitcode_archive_release(OPENCV_TBB_SUBDIR) elseif(DL_ID STREQUAL "ADE") - ocv_download_url_gitcode_archive_release() - set(ade_subdir "${ADE_PKG_NAME_GITCODE}" PARENT_SCOPE) + ocv_download_url_gitcode_archive_release(ade_subdir) else() message(STATUS "ocv_download: Unknown download ID ${DL_ID} for using mirror gitcode.net. Use original source instead.") endif()