summaryrefslogtreecommitdiff
path: root/mrpt-libbase.spec
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2026-09-21 02:25:59 +0000
committerCoprDistGit <infra@openeuler.org>2026-09-21 02:25:59 +0000
commit0466b8ebc0b80f9c1830be7c951ed3f3e6c4046b (patch)
treece88a184fddb1a97f0ba1b3420f36d3e240ba0e6 /mrpt-libbase.spec
parent26dc5071b361c674ed11f5000214d6271f9cf141 (diff)
automatic import of ros-humble-mrpt-libbase
Diffstat (limited to 'mrpt-libbase.spec')
-rw-r--r--mrpt-libbase.spec26
1 files changed, 22 insertions, 4 deletions
diff --git a/mrpt-libbase.spec b/mrpt-libbase.spec
index eaed2f1..cf19158 100644
--- a/mrpt-libbase.spec
+++ b/mrpt-libbase.spec
@@ -1,6 +1,7 @@
%define ros_distro humble
%define RosPkgName mrpt-libbase
%define src_version 2.15.20
+%define mrpt_version 2.15.21
Name: ros-%{ros_distro}-%{RosPkgName}
Version: 2.15.20
@@ -9,6 +10,8 @@ Summary: Mobile Robot Programming Toolkit (MRPT) libraries (core C++ libr
License: BSD
URL: https://github.com/MRPT/mrpt_ros.git
Source0: %{RosPkgName}-%{src_version}.tar.gz
+# mrpt upstream source, pre-fetched to avoid ExternalProject git clone at build time
+Source1: https://github.com/MRPT/mrpt/archive/refs/tags/%{mrpt_version}.tar.gz#/mrpt-%{mrpt_version}.tar.gz
%global debug_package %{nil}
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
@@ -19,10 +22,13 @@ BuildRequires: assimp-devel
BuildRequires: eigen3-devel
BuildRequires: ffmpeg-devel
BuildRequires: freeglut
+BuildRequires: git
BuildRequires: libXrandr-devel
+BuildRequires: libXxf86vm-devel
BuildRequires: libpcap-devel
BuildRequires: libudev-devel
BuildRequires: libusbx-devel
+BuildRequires: libjpeg-devel
BuildRequires: libzstd-devel
BuildRequires: mesa-libGL-devel
BuildRequires: opencv
@@ -33,10 +39,6 @@ BuildRequires: tbb-devel
BuildRequires: tinyxml2-devel
BuildRequires: zlib-devel
BuildRequires: cmake
-BuildRequires: libjpeg
-BuildRequires: libXxf86vm-devel
-BuildRequires: python3-pip
-BuildRequires: wxGTK3-devel
Requires: ros-%{ros_distro}-ros-workspace
@@ -50,6 +52,18 @@ Mobile Robot Programming Toolkit (MRPT) libraries (core C++ libraries).
%prep
%autosetup -n %{RosPkgName}-%{src_version}
+# Pre-populate the ExternalProject SOURCE_DIR so cmake does not attempt a git clone.
+# CMakeLists.txt checks: ${CMAKE_BINARY_DIR}/../mrpt_libbase/mrpt-build/src/mrpt/CMakeLists.txt
+# With CMAKE_BINARY_DIR = <builddir>/mrpt_libbase/.obj the resolved path is:
+# <builddir>/mrpt_libbase/mrpt-build/src/mrpt/
+mkdir -p mrpt_libbase/mrpt-build/src
+tar -xzf %{SOURCE1} -C mrpt_libbase/mrpt-build/src
+mv mrpt_libbase/mrpt-build/src/mrpt-%{mrpt_version} mrpt_libbase/mrpt-build/src/mrpt
+# Write the version cache file so cmake treats the pre-populated tree as current
+mkdir -p mrpt_libbase/mrpt-build/mrpt_libbase
+echo -n "%{mrpt_version}" > mrpt_libbase/mrpt-build/mrpt_libbase/MRPT_VERSION_TO_DOWNLOAD.txt
+# Override the version cmake reads from package.xml to match the pre-fetched source
+echo 'set(MRPT_VERSION_TO_DOWNLOAD "%{mrpt_version}")' > override_mrpt_version.cmake
%build
[ -f /opt/ros/%{ros_distro}/setup.sh ] && source /opt/ros/%{ros_distro}/setup.sh || true
@@ -64,6 +78,10 @@ mkdir -p .obj && cd .obj
-UINCLUDE_INSTALL_DIR -ULIB_INSTALL_DIR -USYSCONF_INSTALL_DIR -USHARE_INSTALL_PREFIX -ULIB_SUFFIX \
-DSETUPTOOLS_DEB_LAYOUT=OFF \
-DBUILD_TESTING=OFF -DTESTING=OFF -DCMAKE_SUPPRESS_REGENERATION=ON \
+ -DMRPT_WITH_FREENECT=OFF \
+ -DMRPT_WITH_OPENNI2=OFF \
+ -DMRPT_WITH_GLFW=OFF \
+ -DMRPT_BUILD_wxThings=OFF \
..
make %{?_smp_mflags}