mirror of
https://github.com/opencv/opencv.git
synced 2024-12-03 00:10:21 +08:00
Merge pull request #21811 from fengyuentau:update_mirrors
Support mirrors for TIM-VX and others 3rdparty components in opencv_contrib
This commit is contained in:
commit
2b60166e5c
@ -3,27 +3,39 @@
|
|||||||
# OAID/Tengine, 01org/tbb(oneAPI/oneTBB), opencv/ade
|
# OAID/Tengine, 01org/tbb(oneAPI/oneTBB), opencv/ade
|
||||||
# from OPENCV_DOWNLOAD_MIRROR
|
# from OPENCV_DOWNLOAD_MIRROR
|
||||||
ocv_update(OPENCV_DOWNLOAD_MIRROR_URL "")
|
ocv_update(OPENCV_DOWNLOAD_MIRROR_URL "")
|
||||||
|
|
||||||
|
######
|
||||||
|
# Download via commit id
|
||||||
|
######
|
||||||
# Tengine
|
# Tengine
|
||||||
ocv_update(TENGINE_PKG_MD5_CUSTOM "")
|
ocv_update(TENGINE_PKG_MD5_CUSTOM "")
|
||||||
ocv_update(TENGINE_PKG_MD5_ORIGINAL 23f61ebb1dd419f1207d8876496289c5) # same as tengine_md5sum for TENGINE commit of e89cf8870de2ff0a80cfe626c0b52b2a16fb302e
|
ocv_update(TENGINE_PKG_MD5_ORIGINAL 23f61ebb1dd419f1207d8876496289c5) # same as tengine_md5sum for TENGINE commit of e89cf8870de2ff0a80cfe626c0b52b2a16fb302e
|
||||||
|
# NVIDIA_OPTICAL_FLOW
|
||||||
|
ocv_update(NVIDIA_OPTICAL_FLOW_PKG_MD5_GITCODE "")
|
||||||
|
ocv_update(NVIDIA_OPTICAL_FLOW_PKG_MD5_ORIGINAL a73cd48b18dcc0cc8933b30796074191)
|
||||||
|
# TIM-VX
|
||||||
|
ocv_update(TIM-VX_PKG_MD5_GITCODE "")
|
||||||
|
ocv_update(TIM-VX_PKG_MD5_ORIGINAL 92619cc4498014ac7a09834d5e33ebd5)
|
||||||
|
|
||||||
|
######
|
||||||
|
# Download from release page
|
||||||
|
#####
|
||||||
# TBB
|
# TBB
|
||||||
ocv_update(TBB_RELEASE_CUSTOM "")
|
ocv_update(TBB_RELEASE_CUSTOM "")
|
||||||
ocv_update(TBB_PKG_NAME_CUSTOM "")
|
ocv_update(TBB_PKG_NAME_CUSTOM "")
|
||||||
ocv_update(TBB_PKG_MD5_CUSTOM "")
|
ocv_update(TBB_PKG_MD5_CUSTOM "")
|
||||||
ocv_update(TBB_PKG_MD5_ORIGINAL 5af6f6c2a24c2043e62e47205e273b1f) # same as OPENCV_TBB_RELEASE_MD5 for TBB release of v2020.2
|
ocv_update(TBB_PKG_MD5_ORIGINAL 5af6f6c2a24c2043e62e47205e273b1f) # same as OPENCV_TBB_RELEASE_MD5 for TBB release of v2020.2
|
||||||
|
|
||||||
# ADE
|
# ADE
|
||||||
ocv_update(ADE_RELEASE_CUSTOM "")
|
ocv_update(ADE_RELEASE_CUSTOM "")
|
||||||
ocv_update(ADE_PKG_NAME_CUSTOM "")
|
ocv_update(ADE_PKG_NAME_CUSTOM "")
|
||||||
ocv_update(ADE_PKG_MD5_CUSTOM "")
|
ocv_update(ADE_PKG_MD5_CUSTOM "")
|
||||||
ocv_update(ADE_PKG_MD5_ORIGINAL b624b995ec9c439cbc2e9e6ee940d3a2) # same as ade_md5 for ADE release of v0.1.1f
|
ocv_update(ADE_PKG_MD5_ORIGINAL b624b995ec9c439cbc2e9e6ee940d3a2) # same as ade_md5 for ADE release of v0.1.1f
|
||||||
|
|
||||||
macro(ocv_download_url_custom_usercontent)
|
macro(ocv_download_url_custom_usercontent OWNER)
|
||||||
string(REPLACE "/" ";" DL_URL_split ${DL_URL})
|
string(REPLACE "/" ";" DL_URL_split ${DL_URL})
|
||||||
list(GET DL_URL_split 5 __COMMIT_ID)
|
list(GET DL_URL_split 5 __COMMIT_ID)
|
||||||
list(GET DL_URL_split 6 __PKG_NAME)
|
list(GET DL_URL_split 6 __PKG_NAME)
|
||||||
set(DL_URL "https://${OPENCV_DOWNLOAD_MIRROR_URL}/opencv/opencv_3rdparty/-/raw/${__COMMIT_ID}/${__PKG_NAME}/")
|
set(DL_URL "https://${OPENCV_DOWNLOAD_MIRROR_URL}/${OWNER}/opencv_3rdparty/-/raw/${__COMMIT_ID}/${__PKG_NAME}/")
|
||||||
endmacro()
|
endmacro()
|
||||||
macro(ocv_download_url_custom_archive_commit_id)
|
macro(ocv_download_url_custom_archive_commit_id)
|
||||||
if("m${${DL_ID}_PKG_MD5_CUSTOM}" STREQUAL "m")
|
if("m${${DL_ID}_PKG_MD5_CUSTOM}" STREQUAL "m")
|
||||||
@ -54,16 +66,18 @@ macro(ocv_download_url_custom_archive_release)
|
|||||||
string(REPLACE "/" ";" DL_URL_split ${DL_URL})
|
string(REPLACE "/" ";" DL_URL_split ${DL_URL})
|
||||||
list(GET DL_URL_split 3 __OWNER)
|
list(GET DL_URL_split 3 __OWNER)
|
||||||
list(GET DL_URL_split 4 __REPO_NAME)
|
list(GET DL_URL_split 4 __REPO_NAME)
|
||||||
set(DL_URL "https://${OPENCV_DOWNLOAD_MIRROR_URL}/${__OWNER}/${__REPO_NAME}/-/archive/${${DL_ID}_PKG_RELEASE_CUSTOM}/${__REPO_NAME}-")
|
set(DL_URL "https://${OPENCV_DOWNLOAD_MIRROR_URL}/${__OWNER}/${__REPO_NAME}/-/archive/${${DL_ID}_RELEASE_CUSTOM}/${__REPO_NAME}-")
|
||||||
set(DL_HASH "${${DL_ID}_PKG_MD5_CUSTOM}")
|
set(DL_HASH "${${DL_ID}_PKG_MD5_CUSTOM}")
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
if("m${OPENCV_DOWNLOAD_MIRROR_URL}" STREQUAL "m")
|
if("m${OPENCV_DOWNLOAD_MIRROR_URL}" STREQUAL "m")
|
||||||
message(WARNING "ocv_download: specify OPENCV_DOWNLOAD_MIRROR_URL to use custom mirror.")
|
message(WARNING "ocv_download: specify OPENCV_DOWNLOAD_MIRROR_URL to use custom mirror.")
|
||||||
else()
|
else()
|
||||||
if((DL_ID STREQUAL "FFMPEG") OR (DL_ID STREQUAL "IPPICV"))
|
if((DL_ID STREQUAL "FFMPEG") OR (DL_ID STREQUAL "IPPICV") OR (DL_ID STREQUAL "data") OR (DL_ID STREQUAL "xfeatures2d/boostdesc") OR (DL_ID STREQUAL "xfeatures2d/vgg"))
|
||||||
ocv_download_url_custom_usercontent()
|
ocv_download_url_custom_usercontent(opencv)
|
||||||
elseif(DL_ID STREQUAL "TENGINE")
|
elseif(DL_ID STREQUAL "wechat_qrcode")
|
||||||
|
ocv_download_url_gitcode_usercontent(WeChatCV)
|
||||||
|
elseif((DL_ID STREQUAL "TENGINE") OR (DL_ID STREQUAL "NVIDIA_OPTICAL_FLOW") OR (DL_ID STREQUAL "TIM-VX"))
|
||||||
ocv_download_url_custom_archive_commit_id()
|
ocv_download_url_custom_archive_commit_id()
|
||||||
elseif(DL_ID STREQUAL "TBB")
|
elseif(DL_ID STREQUAL "TBB")
|
||||||
ocv_download_url_custom_archive_release()
|
ocv_download_url_custom_archive_release()
|
||||||
|
@ -1,14 +1,25 @@
|
|||||||
# Tengine (Download via commit id)
|
######
|
||||||
|
# Download via commit id
|
||||||
|
######
|
||||||
|
# Tengine
|
||||||
ocv_update(TENGINE_PKG_MD5_GITCODE 1b5908632b557275cd6e85b0c03f9690)
|
ocv_update(TENGINE_PKG_MD5_GITCODE 1b5908632b557275cd6e85b0c03f9690)
|
||||||
ocv_update(TENGINE_PKG_MD5_ORIGINAL 23f61ebb1dd419f1207d8876496289c5) # same as tengine_md5sum for TENGINE commit of e89cf8870de2ff0a80cfe626c0b52b2a16fb302e
|
ocv_update(TENGINE_PKG_MD5_ORIGINAL 23f61ebb1dd419f1207d8876496289c5) # same as tengine_md5sum for TENGINE commit of e89cf8870de2ff0a80cfe626c0b52b2a16fb302e
|
||||||
|
# NVIDIA_OPTICAL_FLOW
|
||||||
|
ocv_update(NVIDIA_OPTICAL_FLOW_PKG_MD5_GITCODE 8d5b7eeb24d6ca9c6bcfdff4196d5b47)
|
||||||
|
ocv_update(NVIDIA_OPTICAL_FLOW_PKG_MD5_ORIGINAL a73cd48b18dcc0cc8933b30796074191)
|
||||||
|
# TIM-VX
|
||||||
|
ocv_update(TIM-VX_PKG_MD5_GITCODE 3f2a548b40b170668aaa60d4f60ba40b)
|
||||||
|
ocv_update(TIM-VX_PKG_MD5_ORIGINAL 92619cc4498014ac7a09834d5e33ebd5)
|
||||||
|
|
||||||
# TBB (Download from release page)
|
######
|
||||||
|
# Download from release page
|
||||||
|
#####
|
||||||
|
# TBB
|
||||||
ocv_update(TBB_RELEASE_GITCODE "v2020.2")
|
ocv_update(TBB_RELEASE_GITCODE "v2020.2")
|
||||||
ocv_update(TBB_PKG_NAME_GITCODE "tbb-${TBB_RELEASE_GITCODE}")
|
ocv_update(TBB_PKG_NAME_GITCODE "tbb-${TBB_RELEASE_GITCODE}")
|
||||||
ocv_update(TBB_PKG_MD5_GITCODE 4eeafdf16a90cb66e39a31c8d6c6804e)
|
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
|
ocv_update(TBB_PKG_MD5_ORIGINAL 5af6f6c2a24c2043e62e47205e273b1f) # same as OPENCV_TBB_RELEASE_MD5 for TBB release of v2020.2
|
||||||
|
# ADE
|
||||||
# ADE (Download from release page)
|
|
||||||
ocv_update(ADE_RELEASE_GITCODE "v0.1.1f")
|
ocv_update(ADE_RELEASE_GITCODE "v0.1.1f")
|
||||||
ocv_update(ADE_PKG_NAME_GITCODE "ade-${ADE_RELEASE_GITCODE}")
|
ocv_update(ADE_PKG_NAME_GITCODE "ade-${ADE_RELEASE_GITCODE}")
|
||||||
ocv_update(ADE_PKG_MD5_GITCODE c12909e0ccfa93138c820ba91ff37b3c)
|
ocv_update(ADE_PKG_MD5_GITCODE c12909e0ccfa93138c820ba91ff37b3c)
|
||||||
@ -19,11 +30,14 @@ ocv_update(ADE_PKG_MD5_ORIGINAL b624b995ec9c439cbc2e9e6ee940d3a2) # same as ade_
|
|||||||
# 1. Extract repo owner and repo name from DL_URL.
|
# 1. Extract repo owner and repo name from DL_URL.
|
||||||
# 2. Put repo owner and repo name into the placeholders of new DL_URL.
|
# 2. Put repo owner and repo name into the placeholders of new DL_URL.
|
||||||
#
|
#
|
||||||
macro(ocv_download_url_gitcode_usercontent)
|
macro(ocv_download_url_gitcode_usercontent OWNER)
|
||||||
string(REPLACE "/" ";" DL_URL_split ${DL_URL})
|
string(REPLACE "/" ";" DL_URL_split ${DL_URL})
|
||||||
list(GET DL_URL_split 5 __COMMIT_ID)
|
list(GET DL_URL_split 5 __COMMIT_ID)
|
||||||
list(GET DL_URL_split 6 __PKG_NAME)
|
list(GET DL_URL_split 6 __PKG_NAME)
|
||||||
set(DL_URL "https://gitcode.net/opencv/opencv_3rdparty/-/raw/${__COMMIT_ID}/${__PKG_NAME}/")
|
set(DL_URL "https://gitcode.net/${OWNER}/opencv_3rdparty/-/raw/${__COMMIT_ID}/")
|
||||||
|
if(__PKG_NAME)
|
||||||
|
set(DL_URL "${DL_URL}${__PKG_NAME}/")
|
||||||
|
endif()
|
||||||
endmacro()
|
endmacro()
|
||||||
#
|
#
|
||||||
# Replace download links and checksums for archives/releases in other repositories:
|
# Replace download links and checksums for archives/releases in other repositories:
|
||||||
@ -37,7 +51,7 @@ macro(ocv_download_url_gitcode_archive_commit_id)
|
|||||||
string(REPLACE "/" ";" DL_URL_split ${DL_URL})
|
string(REPLACE "/" ";" DL_URL_split ${DL_URL})
|
||||||
list(GET DL_URL_split 3 __OWNER)
|
list(GET DL_URL_split 3 __OWNER)
|
||||||
list(GET DL_URL_split 4 __REPO_NAME)
|
list(GET DL_URL_split 4 __REPO_NAME)
|
||||||
set(DL_URL "https://gitcode.net/${__OWNER}/${__REPO_NAME}/-/archive/")
|
set(DL_URL "https://gitcode.net/mirrors/${__OWNER}/${__REPO_NAME}/-/archive/")
|
||||||
set(DL_HASH "${${DL_ID}_PKG_MD5_GITCODE}")
|
set(DL_HASH "${${DL_ID}_PKG_MD5_GITCODE}")
|
||||||
else()
|
else()
|
||||||
message(WARNING "Package ${DL_ID} from mirror gitcode.net is outdated and will be downloaded from github.com instead.")
|
message(WARNING "Package ${DL_ID} from mirror gitcode.net is outdated and will be downloaded from github.com instead.")
|
||||||
@ -55,9 +69,11 @@ macro(ocv_download_url_gitcode_archive_release)
|
|||||||
endif()
|
endif()
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
if((DL_ID STREQUAL "FFMPEG") OR (DL_ID STREQUAL "IPPICV"))
|
if((DL_ID STREQUAL "FFMPEG") OR (DL_ID STREQUAL "IPPICV") OR (DL_ID STREQUAL "data") OR (DL_ID STREQUAL "xfeatures2d/boostdesc") OR (DL_ID STREQUAL "xfeatures2d/vgg"))
|
||||||
ocv_download_url_gitcode_usercontent()
|
ocv_download_url_gitcode_usercontent(opencv)
|
||||||
elseif(DL_ID STREQUAL "TENGINE")
|
elseif(DL_ID STREQUAL "wechat_qrcode")
|
||||||
|
ocv_download_url_gitcode_usercontent(mirrors/WeChatCV)
|
||||||
|
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()
|
ocv_download_url_gitcode_archive_commit_id()
|
||||||
elseif(DL_ID STREQUAL "TBB")
|
elseif(DL_ID STREQUAL "TBB")
|
||||||
ocv_download_url_gitcode_archive_release()
|
ocv_download_url_gitcode_archive_release()
|
||||||
|
Loading…
Reference in New Issue
Block a user