libpointmatcher, rtabmap: fix boost 1.89 compatibility (#495485)

This commit is contained in:
kirillrdy
2026-03-01 20:03:51 +00:00
committed by GitHub
2 changed files with 32 additions and 6 deletions
+24 -5
View File
@@ -9,17 +9,36 @@
yaml-cpp,
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "libpointmatcher";
version = "1.4.4";
src = fetchFromGitHub {
owner = "norlab-ulaval";
repo = "libpointmatcher";
rev = version;
tag = finalAttrs.version;
hash = "sha256-OkfWdim0JDKiBx5spYpkMyFrLQP3AMWBVDpzmFwqNFM=";
};
# Fix boost 1.89 compatibility
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace-fail \
"find_package(Boost REQUIRED COMPONENTS thread system program_options date_time)" \
"find_package(Boost REQUIRED COMPONENTS thread program_options date_time)" \
--replace-fail \
"find_package(Boost REQUIRED COMPONENTS thread system program_options date_time chrono)" \
"find_package(Boost REQUIRED COMPONENTS thread program_options date_time chrono)"
substituteInPlace libpointmatcherConfig.cmake.in \
--replace-fail \
"find_package(Boost COMPONENTS thread system program_options date_time REQUIRED)" \
"find_package(Boost COMPONENTS thread program_options date_time REQUIRED)" \
--replace-fail \
"find_package(Boost COMPONENTS thread system program_options date_time chrono REQUIRED)" \
"find_package(Boost COMPONENTS thread program_options date_time chrono REQUIRED)"
'';
nativeBuildInputs = [ cmake ];
buildInputs = [
eigen
@@ -30,16 +49,16 @@ stdenv.mkDerivation rec {
cmakeFlags = [
(lib.cmakeFeature "EIGEN_INCLUDE_DIR" "${eigen}/include/eigen3")
(lib.cmakeBool "BUILD_TESTS" doCheck)
(lib.cmakeBool "BUILD_TESTS" finalAttrs.doCheck)
];
doCheck = true;
meta = {
inherit (src.meta) homepage;
inherit (finalAttrs.src.meta) homepage;
description = "\"Iterative Closest Point\" library for 2-D/3-D mapping in robotic";
license = lib.licenses.bsd3;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ cryptix ];
};
}
})
+8 -1
View File
@@ -2,7 +2,6 @@
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
# nativeBuildInputs
cmake,
@@ -51,6 +50,14 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-u9wswlFkGpPgJaBwSddnpv49wBAmkKRwWFO5jQ9/twA=";
};
# Fix boost 1.89 compatibility
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace-fail \
"find_package(Boost COMPONENTS thread filesystem system program_options date_time chrono timer serialization REQUIRED)" \
"find_package(Boost COMPONENTS thread filesystem program_options date_time chrono timer serialization REQUIRED)"
'';
nativeBuildInputs = [
cmake
qt6.wrapQtAppsHook