Skip to content

Conversation

@18202781743
Copy link
Contributor

  1. Added new libdtk6core-doc package for DTK6 documentation with
    conditional build profile (!nodtk6 !nodoc)
  2. Added new install file for libdtk6core-doc to install dtkcore.qch
    documentation
  3. Reordered build dependencies: moved cmake to top and added
    conditional build profiles for Qt5/Qt6 tools and documentation
  4. Updated debian/rules to enable BUILD_TESTING for both DTK5 and DTK6
    builds
  5. Modified DTK6 version check to use full DTK6_VERSION instead of
    MAJOR_MINOR for shared library versioning
  6. Enabled BUILD_DOCS for DTK6 builds when documentation profile is
    active

Log: Added separate documentation package for DTK6 Core library

Influence:

  1. Test building with different profiles (nodtk5, nodtk6, nodoc) to
    ensure conditional dependencies work correctly
  2. Verify libdtk6core-doc package installation and documentation file
    placement
  3. Test that BUILD_TESTING flag enables test builds properly
  4. Verify shared library versioning uses correct version format for DTK6
  5. Ensure backward compatibility with existing DTK5 packages

feat: 添加DTK6文档包并改进构建配置

  1. 新增libdtk6core-doc包用于DTK6文档,包含条件构建配置(!nodtk6 !nodoc)
  2. 新增libdtk6core-doc安装文件以安装dtkcore.qch文档
  3. 重新排序构建依赖:将cmake移至顶部,并为Qt5/Qt6工具和文档添加条件构建
    配置
  4. 更新debian/rules以同时为DTK5和DTK6构建启用BUILD_TESTING
  5. 修改DTK6版本检查,使用完整DTK6_VERSION而非MAJOR_MINOR进行共享库版本
    控制
  6. 当文档配置激活时,为DTK6构建启用BUILD_DOCS

Log: 为DTK6核心库新增独立的文档包

Influence:

  1. 测试使用不同配置(nodtk5, nodtk6, nodoc)构建,确保条件依赖正常工作
  2. 验证libdtk6core-doc包安装和文档文件放置位置
  3. 测试BUILD_TESTING标志是否正确启用测试构建
  4. 验证共享库版本控制对DTK6使用正确的版本格式
  5. 确保与现有DTK5包的向后兼容性

1. Added new libdtk6core-doc package for DTK6 documentation with
conditional build profile (!nodtk6 !nodoc)
2. Added new install file for libdtk6core-doc to install dtkcore.qch
documentation
3. Reordered build dependencies: moved cmake to top and added
conditional build profiles for Qt5/Qt6 tools and documentation
4. Updated debian/rules to enable BUILD_TESTING for both DTK5 and DTK6
builds
5. Modified DTK6 version check to use full DTK6_VERSION instead of
MAJOR_MINOR for shared library versioning
6. Enabled BUILD_DOCS for DTK6 builds when documentation profile is
active

Log: Added separate documentation package for DTK6 Core library

Influence:
1. Test building with different profiles (nodtk5, nodtk6, nodoc) to
ensure conditional dependencies work correctly
2. Verify libdtk6core-doc package installation and documentation file
placement
3. Test that BUILD_TESTING flag enables test builds properly
4. Verify shared library versioning uses correct version format for DTK6
5. Ensure backward compatibility with existing DTK5 packages

feat: 添加DTK6文档包并改进构建配置

1. 新增libdtk6core-doc包用于DTK6文档,包含条件构建配置(!nodtk6 !nodoc)
2. 新增libdtk6core-doc安装文件以安装dtkcore.qch文档
3. 重新排序构建依赖:将cmake移至顶部,并为Qt5/Qt6工具和文档添加条件构建
配置
4. 更新debian/rules以同时为DTK5和DTK6构建启用BUILD_TESTING
5. 修改DTK6版本检查,使用完整DTK6_VERSION而非MAJOR_MINOR进行共享库版本
控制
6. 当文档配置激活时,为DTK6构建启用BUILD_DOCS

Log: 为DTK6核心库新增独立的文档包

Influence:
1. 测试使用不同配置(nodtk5, nodtk6, nodoc)构建,确保条件依赖正常工作
2. 验证libdtk6core-doc包安装和文档文件放置位置
3. 测试BUILD_TESTING标志是否正确启用测试构建
4. 验证共享库版本控制对DTK6使用正确的版本格式
5. 确保与现有DTK5包的向后兼容性
deepin-ci-robot added a commit to linuxdeepin/dtk6core that referenced this pull request Dec 30, 2025
Synchronize source files from linuxdeepin/dtkcore.

Source-pull-request: linuxdeepin/dtkcore#529
@18202781743 18202781743 changed the title [ feat: add DTK6 documentation package and improve build profiles Dec 30, 2025
@deepin-ci-robot
Copy link
Contributor

deepin pr auto review

我来对这个git diff进行详细的代码审查:

  1. 构建依赖管理优化:
  • 在debian/control中添加了<!nodtk5><!nodtk6><!nodoc>等构建配置标记,这样可以更灵活地控制不同版本的构建选项
  • 将cmake移到了Build-Depends列表的开头,这是一个好的实践,因为cmake是基础构建工具
  1. 文档处理改进:
  • 新增了libdtk6core-doc包,专门用于存放文档
  • 将doxygen的依赖也添加了<!nodoc>标记,使得文档构建可选
  • 在debian/rules中统一了BUILD_DOCS的处理方式
  1. 构建目录命名优化:
  • 将build-dtk5/build-dtk6简化为build5/build6,使目录名更简洁
  • 删除了未使用的DTK6_MAJOR_MINOR变量
  1. 测试相关改进:
  • 在dtkcore.cmake中添加了BUILD_TESTING选项,默认关闭
  • 在tests/CMakeLists.txt中,将地址检查器(-fsanitize=address)限制在Debug模式下启用,避免在Release模式下影响性能
  • 添加了RPATH设置,确保能正确找到测试所需的动态库
  1. 版本控制改进:
  • 在dh_makeshlibs中使用完整的DTK6_VERSION而不是DTK6_MAJOR_MINOR,这样可以提供更精确的版本依赖关系

建议改进:

  1. 在tests/CMakeLists.txt中,可以考虑添加更多的编译器警告选项,比如:
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
    add_compile_options(-fsanitize=address -Wall -Wextra -Werror)
    add_link_options(-fsanitize=address)
endif()
  1. 在dtkcore.cmake中,建议明确设置默认的构建类型:
if (NOT CMAKE_BUILD_TYPE)
    set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type" FORCE)
endif()
  1. 考虑在debian/control中添加更多关于包的详细描述,特别是新添加的libdtk6core-doc包

  2. 建议在debian/rules中添加错误处理,比如在创建build目录时检查是否成功:

mkdir -p build5
$(if $(wildcard build5),,$(error Failed to create build directory))
  1. 对于文档构建,可以考虑添加对文档质量的检查,比如:
override_dh_auto_build:
    # ... existing build commands ...
ifeq ($(BUILD_DOCS),ON)
    @echo "Checking documentation quality..."
    @! grep -r "TODO\|FIXME\|XXX" doc/ || (echo "Documentation contains TODO/FIXME markers"; exit 1)
endif

这些改进可以提高代码质量、构建可靠性和文档质量。

@18202781743 18202781743 requested a review from asterwyx December 30, 2025 12:04
@deepin-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: 18202781743, mhduiy

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

endif
ifeq ($(BUILD_DTK6),ON)
dh_makeshlibs -V "libdtk6core (>= $(DTK6_MAJOR_MINOR))" -plibdtk6core
dh_makeshlibs -V "libdtk6core (>= $(DTK6_VERSION))" -plibdtk6core
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个地方和dtk5不一致了,是故意的吗。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是特意的,dtk6的需要三位版本兼容,dtk5的宽松些,

@18202781743 18202781743 requested a review from asterwyx December 31, 2025 06:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants