%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 %global forgeurl12 https://github.com/google/benchmark %global commit12 f91b6b42b1b9854772a90ae9501464a161707d1e %global forgeurl13 https://github.com/google/googletest/ %global commit13 e2239ee6043f73722e7aa812a459f54a28552929 %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 # License: Apache - 2.0 Source12: %{forgeurl12}/archive/%{commit12}/benchmark-%{commit12}.tar.gz # License: BSD-3-Clause Source13: %{forgeurl13}/archive/%{commit13}/googletest-%{commit13}.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(CLI11) BuildRequires: pkgconfig(eigen3) BuildRequires: pkgconfig(fmt) BuildRequires: pkgconfig(glew) BuildRequires: pkgconfig(liblz4) #BuildRequires: pkgconfig(magic_enum) BuildRequires: pkgconfig(opencv) BuildRequires: pkgconfig(opengl) BuildRequires: pkgconfig(tbb) # Best effort commit to version mapping for all thirdparty sources #pkgconfig(CLI11) = 2.4.2 #Provides: bundled(CLI11) = 2.0.0 Provides: bundled(pangolin) = 0.6 Provides: bundled(basalt-headers) #pkgconfig(magic_enum) = 0.9.5 Provides: bundled(magic_enum) = 0.7.3 Provides: bundled(opengv) Provides: bundled(sophus) = 1.22.10 Provides: bundled(cereal) = 1.3.2 #pkgconfig(eigen3) = 3.4.0 Provides: bundled(eigen3) = 3.4.0 Provides: bundled(console_bridge) = 0.4.3 Provides: bundled(ros_com) Provides: bundled(roscpp_core) # FIXME: See if we can unbundle this with the google-benchmark package #pkgconfig(benchmark) = 1.8.3 Provides: bundled(google-benchmark) = 1.6.0 # FIXME: See if we can unbundle this with the gtest package #pkgconfig(gtest) = 1.13.0 Provides: bundled(gtest) = 1.11.0 %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 ln -s /usr/include/CLI thirdparty/CLI11/include 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 # XXX: magic_enum is installed into /usr/include #ln -s /usr/include 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 # XXX: custom cmake functions seem to be getting in the way here #ln -s /usr/include/eigen3 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 tar -xvf %{SOURCE12} --strip-components 1 -C thirdparty/basalt-headers/test/benchmark tar -xvf %{SOURCE13} --strip-components 1 -C thirdparty/basalt-headers/test/googletest %autopatch -p1 %build # W: package-with-huge-docs 83% # Eigen3 attempt to unbundle, likely need to patch cmake configs # -DBASALT_BUILTIN_EIGEN=off \ # -DEIGEN3_INCLUDE_DIR=%{_includedir}/eigen3 \ # -DEIGEN3_DIR=%{_includedir}/eigen3 \ # -- Finding external Eigen # CMake Error at thirdparty/basalt-headers/CMakeLists.txt:77 (get_target_property): # get_target_property() called with non-existent target "Eigen3::Eigen". # Call Stack (most recent call first): # thirdparty/basalt-headers/CMakeLists.txt:105 (report_dependency_location) %cmake -GNinja \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DEIGEN_ROOT=%{_includedir}/eigen3 \ -DBASALT_BUILD_SHARED_LIBRARY_ONLY=on \ -DBUILD_TESTS=on \ %cmake_build %install %cmake_install %check %ctest %files %license LICENSE %doc README.md doc/*.md %{_libdir}/libbasalt.so.1 %{_libdir}/libbasalt.so.1.0.1 %{_datarootdir}/basalt %files devel %license LICENSE %{_libdir}/libbasalt.so %{_libdir}/pkgconfig/basalt.pc %changelog %autochangelog