summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2026-09-20 09:40:56 +0000
committerCoprDistGit <infra@openeuler.org>2026-09-20 09:40:56 +0000
commit209c3c909fc069f4d0f9bcd7775079ad60fd6a9b (patch)
tree63b07abb3896639d90b464b0780dc942b39017a5
parentea309be58803817d5659a55fe1ce2cf55fc4e047 (diff)
automatic import of ros-humble-swri-geometry-utilopeneuler24.03_LTS_SP3
-rw-r--r--swri-geometry-util.spec28
1 files changed, 28 insertions, 0 deletions
diff --git a/swri-geometry-util.spec b/swri-geometry-util.spec
index 0ff8102..34ff0c6 100644
--- a/swri-geometry-util.spec
+++ b/swri-geometry-util.spec
@@ -39,6 +39,33 @@ Commonly used geometry routines, implemented in a ROS friendly package.
%prep
%autosetup -n %{RosPkgName}-%{src_version}
+# openEuler 的 geos-devel 不提供 GEOSConfig.cmake,手写 FindGEOS.cmake 供 cmake 使用
+mkdir -p %{_builddir}/cmake_modules
+cat > %{_builddir}/cmake_modules/FindGEOS.cmake << 'EOF'
+find_path(GEOS_INCLUDE_DIR geos_c.h PATH_SUFFIXES geos)
+find_library(GEOS_C_LIBRARY NAMES geos_c)
+find_library(GEOS_LIBRARY NAMES geos)
+if(GEOS_INCLUDE_DIR AND GEOS_C_LIBRARY)
+ set(GEOS_FOUND TRUE)
+ set(GEOS_INCLUDE_DIRS ${GEOS_INCLUDE_DIR})
+ set(GEOS_LIBRARIES ${GEOS_C_LIBRARY})
+ if(NOT TARGET GEOS::geos_c)
+ add_library(GEOS::geos_c UNKNOWN IMPORTED)
+ set_target_properties(GEOS::geos_c PROPERTIES
+ IMPORTED_LOCATION "${GEOS_C_LIBRARY}"
+ INTERFACE_INCLUDE_DIRECTORIES "${GEOS_INCLUDE_DIR}")
+ endif()
+ if(NOT TARGET geos_c)
+ add_library(geos_c UNKNOWN IMPORTED)
+ set_target_properties(geos_c PROPERTIES
+ IMPORTED_LOCATION "${GEOS_C_LIBRARY}"
+ INTERFACE_INCLUDE_DIRECTORIES "${GEOS_INCLUDE_DIR}")
+ endif()
+endif()
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(GEOS DEFAULT_MSG GEOS_C_LIBRARY GEOS_INCLUDE_DIR)
+EOF
+
%build
[ -f /opt/ros/%{ros_distro}/setup.sh ] && source /opt/ros/%{ros_distro}/setup.sh || true
export PYTHONPATH=/opt/ros/%{ros_distro}/lib/python%{python3_version}/site-packages${PYTHONPATH:+:$PYTHONPATH}
@@ -49,6 +76,7 @@ mkdir -p .obj && cd .obj
-DCMAKE_INSTALL_PREFIX="/opt/ros/%{ros_distro}" \
-DAMENT_PREFIX_PATH="/opt/ros/%{ros_distro}" \
-DCMAKE_PREFIX_PATH="/opt/ros/%{ros_distro};/usr" \
+ -DCMAKE_MODULE_PATH="%{_builddir}/cmake_modules" \
-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 \