diff --git a/as2-rviz-plugins-geographiclib.patch b/as2-rviz-plugins-geographiclib.patch new file mode 100644 index 0000000000000000000000000000000000000000..aca6157446b614525071bb01d7131c3187598c4d --- /dev/null +++ b/as2-rviz-plugins-geographiclib.patch @@ -0,0 +1,57 @@ +diff -Nur agiros-loong-as2-rviz-plugins-1.1.2/CMakeLists.txt agiros-loong-as2-rviz-plugins-1.1.2-2.0/CMakeLists.txt +--- agiros-loong-as2-rviz-plugins-1.1.2/CMakeLists.txt 2024-08-22 21:23:38.000000000 +0800 ++++ agiros-loong-as2-rviz-plugins-1.1.2-2.0/CMakeLists.txt 2025-03-19 15:17:47.000000000 +0800 +@@ -3,8 +3,13 @@ + ## TeleopPanel, ImuDisplay, and PlantFlagTool tutorials. + + cmake_minimum_required(VERSION 3.8) ++ ++list(APPEND CMAKE_PREFIX_PATH "/usr") ++ + project(as2_rviz_plugins) + ++ ++ + # Default to C++17 + if(NOT CMAKE_CXX_STANDARD) + set(CMAKE_CXX_STANDARD 17) +@@ -28,10 +33,19 @@ + as2_core + as2_msgs + as2_motion_reference_handlers ++ GeographicLib + ) + + find_package(Qt5 REQUIRED COMPONENTS Widgets) + ++find_package(GeographicLib REQUIRED COMPONENTS SHARED) ++ ++find_package(yaml-cpp REQUIRED ) ++ ++link_directories(/opt/agiros/loong/lib) ++ ++ ++ + foreach(DEPENDENCY ${PROJECT_DEPENDENCIES}) + find_package(${DEPENDENCY} REQUIRED) + endforeach() +@@ -50,11 +64,19 @@ + ## "rviz_plugin_tutorials", or whatever your version of this project + ## is called) and specify the list of source files we collected above + ## in ``${SRC_FILES}``. We also add the needed dependencies. ++ ++ + add_library(${PROJECT_NAME} SHARED ${SRC_FILES}) + ament_target_dependencies(${PROJECT_NAME} ${PROJECT_DEPENDENCIES}) + target_include_directories(${PROJECT_NAME} PUBLIC + ${Qt5Widgets_INCLUDE_DIRS}) + ++target_link_libraries(${PROJECT_NAME} ++ GeographicLib::GeographicLib_SHARED ++ as2_core ++ yaml-cpp ++) ++ + ## Here we export the plugins and meshes so they can be found by RViz at runtime. + pluginlib_export_plugin_description_file(rviz_common plugin_description.xml) + diff --git a/as2-rviz-plugins.spec b/as2-rviz-plugins.spec index 7c027c73bfbe1ee75426eaf0de29127e968527b3..f4850d05dccae7c20387733811d79aa9a6162a61 100644 --- a/as2-rviz-plugins.spec +++ b/as2-rviz-plugins.spec @@ -16,10 +16,11 @@ Summary: Tutorials showing how to write plugins for RViz. Url: http://ros.org/wiki/rviz_plugin_tutorials License: BSD Source0: %{name}_%{version}.orig.tar.gz +Patch0: as2-rviz-plugins-geographiclib.patch -Requires: agiros-%{agiros_distro}-geometry_msgs +Requires: agiros-%{agiros_distro}-geometry-msgs Requires: agiros-%{agiros_distro}-rclcpp -Requires: agiros-%{agiros_distro}-rviz_common +Requires: agiros-%{agiros_distro}-rviz-common Requires: agiros-%{agiros_distro}-rviz-rendering Requires: agiros-%{agiros_distro}-sensor-msgs Requires: agiros-%{agiros_distro}-as2-core @@ -27,7 +28,7 @@ Requires: agiros-%{agiros_distro}-as2-msgs Requires: agiros-%{agiros_distro}-as2-motion-reference-handlers Requires: qt5-qtbase Requires: qt5-qtbase-gui -Requires: libqt5-widgets +#Requires: libqt5-widgets Requires: agiros-%{agiros_distro}-ros-workspace BuildRequires: agiros-%{agiros_distro}-geometry-msgs @@ -60,7 +61,7 @@ Tutorials showing how to write plugins for RViz. %build # Needed to bootstrap since the ros_workspace package does not yet exist. export PYTHONPATH=/opt/agiros/%{agiros_distro}/lib/python%{python3_version}/site-packages - +export LDFLAGS="-L/opt/agiros/loong/lib" export ROS_DISTRO=%{ros_distro} export ROS_PYTHON_VERSION=%{python3_version} @@ -79,7 +80,11 @@ mkdir -p .obj-%{_target_platform} && cd .obj-%{_target_platform} -DAMENT_PREFIX_PATH="/opt/agiros/%{agiros_distro}" \ -DCMAKE_PREFIX_PATH="/opt/agiros/%{agiros_distro}" \ -DCMAKE_INSTALL_LIBDIR="/opt/agiros/%{agiros_distro}/lib" \ + -DCMAKE_LIBRARY_PATH=/opt/agiros/%{agiros_distro}/lib \ -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DGeographicLib_DIR=/usr/lib64/cmake/geographiclib \ + -DCMAKE_PREFIX_PATH="/usr:%{CMAKE_PREFIX_PATH}" \ + -DCMAKE_MODULE_PATH=/usr/share/cmake/Modules \ %if !0%{?with_tests} -DBUILD_TESTING=OFF \ %endif @@ -119,4 +124,4 @@ else echo "RPM TESTS SKIPPED"; fi %changelog * Thu Dec 26 2024 Mabel Zhang mabel@openrobotics.org - 1.1.2-1 -- Autogenerated by ros-porting-tools +- Autogenerated by ros-porting-tools \ No newline at end of file