From 1daec834f2095a800631df5d86a7f9075222aebe Mon Sep 17 00:00:00 2001 From: Jia Yue Hua <3423893+jiayuehua@users.noreply.github.com> Date: Wed, 3 Apr 2024 03:42:49 +0800 Subject: [PATCH] [octomap] update to 1.10.0 (#37706) --- ports/octomap/fix-compilation.patch | 22 ---------------------- ports/octomap/fix-isnan.patch | 25 +++++++++++++++++++++++++ ports/octomap/portfile.cmake | 6 +++--- ports/octomap/vcpkg.json | 3 +-- versions/baseline.json | 4 ++-- versions/o-/octomap.json | 5 +++++ 6 files changed, 36 insertions(+), 29 deletions(-) delete mode 100644 ports/octomap/fix-compilation.patch create mode 100644 ports/octomap/fix-isnan.patch diff --git a/ports/octomap/fix-compilation.patch b/ports/octomap/fix-compilation.patch deleted file mode 100644 index ebb6e4a535..0000000000 --- a/ports/octomap/fix-compilation.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/octomap/include/octomap/ScanGraph.h b/octomap/include/octomap/ScanGraph.h -index 07c7436..e54eaf5 100644 ---- a/octomap/include/octomap/ScanGraph.h -+++ b/octomap/include/octomap/ScanGraph.h -@@ -60,7 +60,7 @@ namespace octomap { - - ~ScanNode(); - -- bool operator == (const ScanNode& other) { -+ bool operator == (const ScanNode& other) const { - return (id == other.id); - } - -@@ -87,7 +87,7 @@ namespace octomap { - : first(_first), second(_second), constraint(_constraint), weight(1.0) { } - ScanEdge() {} - -- bool operator == (const ScanEdge& other) { -+ bool operator == (const ScanEdge& other) const { - return ( (*first == *(other.first) ) && ( *second == *(other.second) ) ); - } - diff --git a/ports/octomap/fix-isnan.patch b/ports/octomap/fix-isnan.patch new file mode 100644 index 0000000000..5da9a207ea --- /dev/null +++ b/ports/octomap/fix-isnan.patch @@ -0,0 +1,25 @@ +diff --git a/octomap/src/compare_octrees.cpp b/octomap/src/compare_octrees.cpp +index c02ceea8..e6890f59 100644 +--- a/octomap/src/compare_octrees.cpp ++++ b/octomap/src/compare_octrees.cpp +@@ -39,7 +39,7 @@ + #include + #include + +-#ifdef _MSC_VER // fix missing isnan for VC++ ++#if defined(_MSC_VER) && !((defined(_MSVC_LANG) && _MSVC_LANG >= 201103L) || __cplusplus >= 201103L) + #define isnan(x) _isnan(x) + #endif + +@@ -132,11 +132,7 @@ int main(int argc, char** argv) { + else + kld +=log(p1/p2)*p1 + log((1-p1)/(1-p2))*(1-p1); + +-#if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201103L) || __cplusplus >= 201103L) +- if (std::isnan(kld)){ +-#else + if (isnan(kld)){ +-#endif + OCTOMAP_ERROR("KLD is nan! KLD(%f,%f)=%f; sum = %f", p1, p2, kld, kld_sum); + exit(-1); + } diff --git a/ports/octomap/portfile.cmake b/ports/octomap/portfile.cmake index d820b3a411..c3405ac3bc 100644 --- a/ports/octomap/portfile.cmake +++ b/ports/octomap/portfile.cmake @@ -4,11 +4,11 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO OctoMap/octomap REF "v${VERSION}" - SHA512 60afeecc36a190f136dcbe33cb9cd6c06c16233988b383b0b010f65f81e6a3630b55902c5b5ad756ac35dee4c4ec26ec5722d6bd9b8e079f70b7d286293c518e - HEAD_REF master + SHA512 1cbee4f6b3569587986774447ad9ec4190f597310c4d6865ffa7cd8865ece2492e4a42fa369b633d9d7a9da782560d49deaa62a18601ea4f56396bdf1a6a5f52 + HEAD_REF devel PATCHES 001-fix-exported-targets.patch - fix-compilation.patch + fix-isnan.patch # Remove this patch in the next update ) vcpkg_cmake_configure( diff --git a/ports/octomap/vcpkg.json b/ports/octomap/vcpkg.json index f22b0e8f16..53a6dad165 100644 --- a/ports/octomap/vcpkg.json +++ b/ports/octomap/vcpkg.json @@ -1,7 +1,6 @@ { "name": "octomap", - "version": "1.9.8", - "port-version": 1, + "version": "1.10.0", "description": "An Efficient Probabilistic 3D Mapping Framework Based on Octrees", "homepage": "https://octomap.github.io/", "license": "BSD-3-Clause", diff --git a/versions/baseline.json b/versions/baseline.json index e792f957c6..dbbbce5e4c 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -6293,8 +6293,8 @@ "port-version": 0 }, "octomap": { - "baseline": "1.9.8", - "port-version": 1 + "baseline": "1.10.0", + "port-version": 0 }, "ode": { "baseline": "0.16.4", diff --git a/versions/o-/octomap.json b/versions/o-/octomap.json index a458c41f90..9965fa87bf 100644 --- a/versions/o-/octomap.json +++ b/versions/o-/octomap.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "ff492e256718daa9fb2245c135959d6a812f938d", + "version": "1.10.0", + "port-version": 0 + }, { "git-tree": "18c703e99a9e7da9184b9ebcee3ddfa80d66502e", "version": "1.9.8",