summaryrefslogtreecommitdiff
path: root/web-video-server.spec
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2026-09-24 02:19:00 +0000
committerCoprDistGit <infra@openeuler.org>2026-09-24 02:19:00 +0000
commit9d101c5fd056535fd98e9752a671db2c36d068e6 (patch)
tree91106c6910c832f0cf0f1416976f81f8d56d7640 /web-video-server.spec
parenta800e3bb1946eb51ab657f4cf7d1a8c727265e47 (diff)
automatic import of ros-humble-web-video-serveropeneuler24.03_LTS_SP3
Diffstat (limited to 'web-video-server.spec')
-rw-r--r--web-video-server.spec49
1 files changed, 44 insertions, 5 deletions
diff --git a/web-video-server.spec b/web-video-server.spec
index 751f1ee..82db6ab 100644
--- a/web-video-server.spec
+++ b/web-video-server.spec
@@ -4,7 +4,7 @@
Name: ros-%{ros_distro}-%{RosPkgName}
Version: 3.1.0
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: HTTP Streaming of ROS Image Topics in Multiple Formats
License: BSD
URL: https://github.com/RobotWebTools/web_video_server/tree/ros2
@@ -59,14 +59,48 @@ HTTP Streaming of ROS Image Topics in Multiple Formats
[ -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}
export PKG_CONFIG_PATH=/opt/ros/%{ros_distro}/lib/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}
-find /opt/ros/%{ros_distro}/share -name '*.cmake' \
- -exec sed -i -e 's/find_dependency(Boost [0-9][0-9]*/find_dependency(Boost/g' \
- -e 's/find_package(Boost [0-9][0-9]*/find_package(Boost/g' {} + 2>/dev/null || true
-mkdir -p .obj && cd .obj
+
+# Fix Boost version format mismatch: installed ROS cmake configs (e.g.
+# async_web_server_cpp) hardcode find_dependency(Boost 108300) using old
+# numeric Boost version. CMake FindBoost cannot parse 108300 as X.Y version
+# (error at line 1654) and comparison 1.83.0 >= 108300 fails.
+# Round 1 used find -exec sed {} + which silently failed (find returned
+# non-zero, target file NOT patched). This round uses two approaches:
+#
+# Approach 1: directly sed the known file + while-read sweep (avoids {} + )
+sed -i -E 's/(find_dependency|find_package)\([[:space:]]*Boost[[:space:]]+[0-9][0-9.]*/\1(Boost/g' \
+ /opt/ros/%{ros_distro}/share/async_web_server_cpp/cmake/find_dependencies.cmake 2>/dev/null || true
+find /opt/ros/%{ros_distro}/share -name '*.cmake' -print 2>/dev/null | while IFS= read -r _f; do
+ sed -i -E 's/(find_dependency|find_package)\([[:space:]]*Boost[[:space:]]+[0-9][0-9.]*/\1(Boost/g' "$_f" 2>/dev/null || true
+done
+#
+# Approach 2: custom FindBoost.cmake wrapper as CMake-level fallback.
+# Intercepts find_package(Boost 108300) at module layer, clears the numeric
+# version, then delegates to the real FindBoost.cmake. This catches any
+# Boost version check regardless of which cmake config triggers it.
+mkdir -p .obj/cmake/Modules
+cat > .obj/cmake/Modules/FindBoost.cmake << 'BOOST_OVERRIDE'
+if(DEFINED Boost_FIND_VERSION)
+ message(STATUS "FindBoost wrapper: clearing version ${Boost_FIND_VERSION}")
+endif()
+unset(Boost_FIND_VERSION)
+unset(Boost_FIND_VERSION_MAJOR)
+unset(Boost_FIND_VERSION_MINOR)
+unset(Boost_FIND_VERSION_PATCH)
+unset(Boost_FIND_VERSION_EXACT)
+set(_bw_dir ${CMAKE_CURRENT_LIST_DIR})
+list(REMOVE_ITEM CMAKE_MODULE_PATH ${_bw_dir})
+include(/usr/share/cmake/Modules/FindBoost.cmake)
+list(APPEND CMAKE_MODULE_PATH ${_bw_dir})
+BOOST_OVERRIDE
+
+cd .obj
+_boost_mod_dir="$(pwd)/cmake/Modules"
%cmake3 \
-DCMAKE_INSTALL_PREFIX="/opt/ros/%{ros_distro}" \
-DAMENT_PREFIX_PATH="/opt/ros/%{ros_distro}" \
-DCMAKE_PREFIX_PATH="/opt/ros/%{ros_distro}" \
+ -DCMAKE_MODULE_PATH="${_boost_mod_dir}" \
-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 \
@@ -84,6 +118,11 @@ make install DESTDIR=%{buildroot}
/opt/ros/%{ros_distro}
%changelog
+* Thu Sep 24 2026 ai-importer <ai-importer@openeuler.org> - 3.1.0-3
+- Fix Boost version mismatch: replace failed find -exec sed with direct
+ sed on find_dependencies.cmake + while-read sweep, and add custom
+ FindBoost.cmake wrapper to intercept version checks at CMake module layer
+
* Thu Sep 24 2026 ai-importer <ai-importer@openeuler.org> - 3.1.0-2
- Fix Boost version format mismatch: strip numeric version (108300) from
find_dependency(Boost ...) calls in installed ROS cmake config files