diff options
| author | CoprDistGit <infra@openeuler.org> | 2026-09-24 09:56:23 +0000 |
|---|---|---|
| committer | CoprDistGit <infra@openeuler.org> | 2026-09-24 09:56:23 +0000 |
| commit | c90a8ec9c78e247c0854943263c98b5c42c8bc3c (patch) | |
| tree | 6bbab299ead1e1e6937a67931aba7dde43ad5cf2 | |
| parent | 9fe56d6abedb4421025fc7771c8fac9b2d09f25f (diff) | |
automatic import of ros-humble-qt-gui-cppopeneuler24.03_LTS_SP3
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | ros-humble-qt-gui-cpp.spec | 103 | ||||
| -rw-r--r-- | sources | 1 |
3 files changed, 105 insertions, 0 deletions
@@ -0,0 +1 @@ +/ros-humble-qt-gui-cpp-2.2.5.tar.gz diff --git a/ros-humble-qt-gui-cpp.spec b/ros-humble-qt-gui-cpp.spec new file mode 100644 index 0000000..bb633bf --- /dev/null +++ b/ros-humble-qt-gui-cpp.spec @@ -0,0 +1,103 @@ +# ROS humble C++ 包:qt_gui_cpp +# 上游 monorepo:https://github.com/ros-visualization/qt_gui_core(humble 分支) +# 本包只取 monorepo 中 qt_gui_cpp 子目录构建,--transform 统一顶层目录为 %%{name}-%%{version} +# topdir: ros-humble-qt-gui-cpp-2.2.5 +# 子包目录(CMakeLists.txt 所在):qt_gui_cpp +%define ros_distro humble +%define RosPkgName qt-gui-cpp + +Name: ros-%{ros_distro}-%{RosPkgName} +Version: 2.2.5 +Release: 1%{?dist} +Summary: qt_gui_cpp provides C++-bindings for qt_gui and creates bindings for every generator available +License: BSD +URL: https://github.com/ros-visualization/qt_gui_core +# 上游为 monorepo;#/ 强制 rpm 内部文件名,--transform 已统一顶层目录为 %%{name}-%%{version} +Source0: https://github.com/ros-visualization/qt_gui_core/archive/refs/heads/humble.tar.gz#/%{name}-%{version}.tar.gz + +# debug 子包无意义(/opt 前缀,strip/debugedit 路径非常规),SIG 模板统一关闭 +%global debug_package %{nil} +# /opt 下 python 字节码编译会写标准 sitelib 路径,摘掉 brp-python-bytecompile +%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') +# ROS 包不做自动依赖扫描(.so 全在 /opt/ros 下,由 ament 间接依赖模型替代) +%global __provides_exclude_from ^/opt/ros/%{ros_distro}/.*$ +%global __requires_exclude_from ^/opt/ros/%{ros_distro}/.*$ + +BuildRequires: cmake +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: make +BuildRequires: pkgconf +# ROS 基座构建工具(ament_cmake 形态强制) +BuildRequires: ros-%{ros_distro}-ament-cmake +# package.xml <build_depend> +BuildRequires: ros-%{ros_distro}-pluginlib +BuildRequires: ros-%{ros_distro}-python-qt-binding +BuildRequires: ros-%{ros_distro}-rcpputils +BuildRequires: ros-%{ros_distro}-tinyxml2-vendor +# package.xml <build_depend>qt5-qmake</build_depend> / qtbase5-dev -> openEuler 名 qt5-qtbase-devel +BuildRequires: qt5-qtbase-devel +# TinyXML2(tinyxml2_vendor 包提供 cmake config,tinyxml2-devel 提供库和头文件) +BuildRequires: tinyxml2-devel +# SIP 绑定生成器(python_qt_binding 的 sip_helper.cmake 调用 sip 二进制) +BuildRequires: python3-sip-devel +# Python 开发(ament_python_install_package 需要) +BuildRequires: python3-devel + +# 运行时 Requires(/opt/ros 被 __requires_exclude_from 豁免、autodeps 扫不到,必须手写) +Requires: ros-%{ros_distro}-ros-workspace +Requires: ros-%{ros_distro}-ament-cmake +Requires: ros-%{ros_distro}-pluginlib +Requires: ros-%{ros_distro}-qt-gui +Requires: ros-%{ros_distro}-python-qt-binding +Requires: ros-%{ros_distro}-rcpputils +Requires: ros-%{ros_distro}-tinyxml2-vendor + +# 单包策略:ROS 包严禁拆实体子包,用虚拟别名兼容依赖方 +Provides: %{name}-devel = %{version}-%{release} +Provides: %{name}-doc = %{version}-%{release} +Provides: %{name}-runtime = %{version}-%{release} + +%description +qt_gui_cpp provides the foundation for C++-bindings for qt_gui and creates +bindings for every generator available. At least one specific binding must +be available in order to use C++-plugins. +This is the humble (ROS 2) release of the qt_gui_cpp package, built with +the ament_cmake build system and installed under /opt/ros/humble. + +%prep +%autosetup -n %{name}-%{version} + +%build +# ROS 基座环境(chroot 已配置 ROS SIG repo;setup.sh 不存在时用守卫) +[ -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} + +# 显式 out-of-source 构建(避免 openEuler %%cmake 宏位置参数坑) +# monorepo tarball 解压后 CMakeLists.txt 在 qt_gui_cpp/ 子目录,需先 cd 进去 +cd qt_gui_cpp +mkdir -p .obj +cd .obj +cmake .. \ + -DCMAKE_INSTALL_PREFIX="/opt/ros/%{ros_distro}" \ + -DAMENT_PREFIX_PATH="/opt/ros/%{ros_distro}" \ + -DCMAKE_PREFIX_PATH="/opt/ros/%{ros_distro}" \ + -DCMAKE_C_FLAGS="%{optflags}" \ + -DCMAKE_CXX_FLAGS="%{optflags}" \ + -UINCLUDE_INSTALL_DIR -ULIB_INSTALL_DIR -USYSCONF_INSTALL_DIR -USHARE_INSTALL_PREFIX -ULIB_SUFFIX \ + -DSETUPTOOLS_DEB_LAYOUT=OFF \ + -DBUILD_TESTING=OFF +%make_build + +%install +cd qt_gui_cpp/.obj +%make_install + +%files +# %%files 整树拥有 /opt/ros/%%{ros_distro}(对"装了没打包"类错误免疫) +/opt/ros/%{ros_distro} + +%changelog +* Thu Sep 24 2026 openEuler ROS SIG <ros@openeuler.org> - 2.2.5-1 +- Initial package for openEuler 24.03 LTS (ROS 2 humble) @@ -0,0 +1 @@ +210530196ce22c5aaa338b335b1bb39e ros-humble-qt-gui-cpp-2.2.5.tar.gz |
