From 945bb1b1cf63694dfa1eba0ca3df40030b34592c Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Sun, 20 Sep 2026 04:19:10 +0000 Subject: automatic import of ros-humble-depthai --- depthai.spec | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/depthai.spec b/depthai.spec index 1ac6a9c..dc5b1c1 100644 --- a/depthai.spec +++ b/depthai.spec @@ -51,6 +51,23 @@ install -d %{hunter_root} _VENDOR_TMP=$(mktemp -d) tar xzf %{SOURCE1} -C "$_VENDOR_TMP" --strip-components=1 +# Hunter 框架需要:tar.gz 放到 / + 解压到 /Unpacked/ + SHA1 + DONE 文件 +# HunterGate.cmake 通过检查 DONE 文件决定是否跳过联网下载 +_install_hunter_framework() { + local ver="$1" sha1="$2" fname="$3" + local archive_id="${sha1:0:7}" + local dest="%{hunter_root}/_Base/Download/Hunter/${ver}/${archive_id}" + install -d "$dest" + cp "$_VENDOR_TMP/${fname}" "$dest/${fname}" + # 解压源码到 Unpacked/(cmake configure 阶段从这里 include Hunter) + install -d "$dest/Unpacked" + tar xzf "$_VENDOR_TMP/${fname}" -C "$dest/Unpacked" --strip-components=1 + # 写入标记文件,让 HunterGate 跳过下载 + echo -n "${sha1}" > "$dest/SHA1" + echo -n "DONE" > "$dest/DONE" +} + +# 普通依赖包只需要 tar.gz 放到下载缓存目录(Hunter 构建系统自行处理) _install_hunter_pkg() { local pkg="$1" ver="$2" sha1="$3" fname="$4" local archive_id="${sha1:0:7}" @@ -59,19 +76,19 @@ _install_hunter_pkg() { cp "$_VENDOR_TMP/${fname}" "$dest/${fname}" } -# Hunter 框架本身 -_install_hunter_pkg "Hunter" "unknown" "16cc954aa723bccd16ea45fc91a858d0c5246376" "hunter-9d9242b.tar.gz" +# Hunter 框架本身(需要完整的 Unpacked + DONE + SHA1) +_install_hunter_framework "unknown" "16cc954aa723bccd16ea45fc91a858d0c5246376" "hunter-9d9242b.tar.gz" # 所有依赖包 _install_hunter_pkg "nlohmann_json" "3.9.1" "f8a20a7e19227906d77de0ede97468fbcfea03e7" "nlohmann_json-v3.9.1.tar.gz" _install_hunter_pkg "XLink" "luxonis-2021.4.2-master" "ea63909f4a97fb24d8ee557763ebfd13a63a1ed7" "XLink-b0be8f9.tar.gz" -_install_hunter_pkg "BZip2" "1.0.8-p0" "9125bd674fbe7c8169c8ea6a2a15a414a7dc2f86" "bzip2-v1.0.8-p0.tar.gz" +_install_hunter_pkg "BZip2" "1.0.8-p0" "9125bd674fbe7c8169c8ea6a2a15a414a7dc2f86" "bzip2-v1.0.8-p0.tar.gz" _install_hunter_pkg "spdlog" "1.8.2" "4437f350ca7fa89a0cd8faca1198afb36823f775" "spdlog-v1.8.2.tar.gz" _install_hunter_pkg "libarchive-luxonis" "hunter-3.5.2" "ca5cd0f1c31b9c187d7119cb1aa7467f8c231d29" "libarchive-luxonis-45baa3a.tar.gz" _install_hunter_pkg "FP16" "luxonis-0.0.0" "40e9723c87c2fe21781132c0f2f8b90338500e32" "FP16-c911175.tar.gz" _install_hunter_pkg "Backward" "1.6" "4ecb711eabfd15bc88ff9dd9342907fc5da46b62" "backward-cpp-v1.6.tar.gz" _install_hunter_pkg "libnop" "1.0-ec8f75a" "32f40f084615ba7940ce9d29f05f3294371aabeb" "libnop-ab842f5.tar.gz" -_install_hunter_pkg "ZLIB" "1.2.11-p2" "fb8b6486183b13a86040f793a939b128f6d27095" "zlib-v1.2.11-p2.tar.gz" +_install_hunter_pkg "ZLIB" "1.2.11-p2" "fb8b6486183b13a86040f793a939b128f6d27095" "zlib-v1.2.11-p2.tar.gz" _install_hunter_pkg "libusb-luxonis" "1.0.24-cmake" "2d79573d57628fe56d2868d2f6ce756d40906cf4" "libusb-luxonis-b7e4548.tar.gz" _install_hunter_pkg "CURL" "7.88.1-p0-custom" "db96d87e078e529a90dfb74de8d360a785c053aa" "curl-25d45e8.tar.gz" _install_hunter_pkg "cpr" "1.4.0" "2e2ba9920ed99c19887592ca89d9be5ffce4722b" "cpr-50a1321.tar.gz" -- cgit v1.2.3