%global forgeurl0 https://gitlab.freedesktop.org/mateosss/basalt/ %global commit0 673cc5c68b1889f4d6567fa85fe2631672704351 %global date 20240310 # Submodules in forgeurl0 %global forgeurl1 https://github.com/CLIUtils/CLI11/ %global commit1 4af78beef777e313814b4daff70e2da9171a385a %global forgeurl2 https://github.com/stevenlovegrove/Pangolin/ %global commit2 86eb4975fc4fc8b5d92148c2e370045ae9bf9f5d %global forgeurl3 https://gitlab.freedesktop.org/mateosss/basalt-headers/ %global commit3 28b09b3a5802d44835655778cdd9b1974569bd47 %global forgeurl4 https://github.com/Neargye/magic_enum/ %global commit4 3d1f6a5a2a3fbcba077e00ad0ccc2dd9fefc2ca7 %global forgeurl5 https://github.com/laurentkneip/opengv/ %global commit5 91f4b19c73450833a40e463ad3648aae80b3a7f3 %global forgeurl6 https://github.com/strasdat/Sophus/ %global commit6 8e1941677ef214aab0397608f42b18fbe1a19885 %global forgeurl7 https://github.com/USCiLab/cereal/ %global commit7 ebef1e929807629befafbb2918ea1a08c7194554 %global forgeurl8 https://gitlab.com/libeigen/eigen/ %global commit8 3147391d946bb4b6c68edd901f2add6ac1f31f8c %global forgeurl9 https://github.com/ros/console_bridge/ %global commit9 f0b423c0c2d02651db1776c96887c0a314908063 %global forgeurl10 https://github.com/ros/ros_comm/ %global commit10 194c776737134a429619f6851f1850734843e210 %global forgeurl11 https://github.com/NikolausDemmel/roscpp_core/ %global commit11 1a74781ce707b1a2198d1bd6799b892b3c1fa195 %forgemeta Name: basalt # FIXME: upstream versioning is commit based Version: 0 Release: %autorelease Summary: Visual-Inertial Mapping with Non-Linear Factor Recovery License: BSD-3-Clause URL: %{forgeurl0} Source0: %{forgesource0} # License: BSD-3-Clause Source1: %{forgeurl1}/archive/%{commit1}/CLI11-%{commit1}.tar.gz # License: MIT Source2: %{forgeurl2}/archive/%{commit2}/Pangolin-%{commit2}.tar.gz # License: BSD-3-Clause Source3: %{forgeurl3}/-/archive/%{commit3}/basalt-headers-%{commit3}.tar.bz2 # License: MIT Source4: %{forgeurl4}/archive/%{commit4}/magic_enum-%{commit4}.tar.gz # License: BSD-3-Clause Source5: %{forgeurl5}/archive/%{commit5}/opengv-%{commit5}.tar.gz # License: MIT Source6: %{forgeurl6}/archive/%{commit6}/Sophus-%{commit6}.tar.gz # License: BSD-3-Clause Source7: %{forgeurl7}/archive/%{commit7}/cereal-%{commit7}.tar.gz # License: MPL-2.0 Source8: %{forgeurl8}/-/archive/%{commit8}/eigen-%{commit8}.tar.bz2 # License: BSD-3-Clause Source9: %{forgeurl9}/archive/%{commit9}/console_bridge-%{commit9}.tar.gz # License: FIXME - unknown Source10: %{forgeurl10}/archive/%{commit10}/ros_comm-%{commit10}.tar.gz # License: FIXME - unknown Source11: %{forgeurl11}/archive/%{commit11}/roscpp_core-%{commit11}.tar.gz # https://gitlab.freedesktop.org/mateosss/basalt/-/merge_requests/56 Patch0: basalt-95dd2d7bc5fddaf893103fdc1d4fed687dcc327b-cmake-gnuinstalldirs.patch # https://github.com/stevenlovegrove/Pangolin/pull/911 applied to old commit Patch1: basalt-95dd2d7bc5fddaf893103fdc1d4fed687dcc327b-pagolin-add-stdint.patch # https://gitlab.freedesktop.org/mateosss/basalt/-/merge_requests/56 Patch2: basalt-95dd2d7bc5fddaf893103fdc1d4fed687dcc327b-cmake-basalt-pkgconfig-gnuinstalldirs.patch BuildRequires: boost-devel BuildRequires: cmake BuildRequires: doxygen BuildRequires: gcc-c++ BuildRequires: git BuildRequires: ninja-build BuildRequires: pkgconfig(bzip2) BuildRequires: pkgconfig(eigen3) BuildRequires: pkgconfig(fmt) BuildRequires: pkgconfig(glew) BuildRequires: pkgconfig(liblz4) BuildRequires: pkgconfig(opencv) BuildRequires: pkgconfig(opengl) BuildRequires: pkgconfig(tbb) # Best effort commit to version mapping for all thirdparty sources Provides: bundled(cli11) = 2.0.0 Provides: bundled(pangolin) = 0.6 Provides: bundled(basalt-headers) Provides: bundled(magic_enum) = 0.7.3 Provides: bundled(opengv) Provides: bundled(sophus) = 1.22.10 Provides: bundled(cereal) = 1.3.2 Provides: bundled(eigen3) = 3.4.0 Provides: bundled(console_bridge) = 0.4.3 Provides: bundled(ros_com) Provides: bundled(roscpp_core) %description This project contains tools for: Camera, IMU and motion capture calibration. Visual-inertial odometry and mapping. Simulated environment to test different components of the system. %package devel Requires: %{name}%{?_isa} = %{version}-%{release} Summary: Development files for Basalt %description devel Devel information for Basalt. %prep %forgesetup # Extract libraries that are bundled tar -xvf %{SOURCE1} --strip-components 1 -C thirdparty/CLI11 tar -xvf %{SOURCE2} --strip-components 1 -C thirdparty/Pangolin tar -xvf %{SOURCE3} --strip-components 1 -C thirdparty/basalt-headers tar -xvf %{SOURCE4} --strip-components 1 -C thirdparty/magic_enum tar -xvf %{SOURCE5} --strip-components 1 -C thirdparty/opengv tar -xvf %{SOURCE6} --strip-components 1 -C thirdparty/basalt-headers/thirdparty/Sophus tar -xvf %{SOURCE7} --strip-components 1 -C thirdparty/basalt-headers/thirdparty/cereal tar -xvf %{SOURCE8} --strip-components 1 -C thirdparty/basalt-headers/thirdparty/eigen tar -xvf %{SOURCE9} --strip-components 1 -C thirdparty/ros/console_bridge tar -xvf %{SOURCE10} --strip-components 1 -C thirdparty/ros/ros_comm tar -xvf %{SOURCE11} --strip-components 1 -C thirdparty/ros/roscpp_core %autopatch -p1 %build # W: package-with-huge-docs 83% # CMake errors: # -DBUILD_TESTS=on \ #thirdparty/basalt-headers/test/googletest does not contain a CMakeLists.txt file #thirdparty/basalt-headers/test/benchmark does not contain a CMakeLists.txt file %cmake -GNinja \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DEIGEN_ROOT=%{_includedir}/eigen3 \ -DBASALT_BUILD_SHARED_LIBRARY_ONLY=on \ %cmake_build %install %cmake_install # FIXME: noop %check %ctest %files %license LICENSE %doc README.md doc/*.md %{_libdir}/libbasalt.so.* %{_datarootdir}/basalt/* %files devel %license LICENSE %{_libdir}/libbasalt.so %{_libdir}/pkgconfig/basalt.pc %changelog %autochangelog