Skip to content

feat(build): add sources to rofd to support OFD - #401

Merged
deepin-bot[bot] merged 1 commit into
linuxdeepin:masterfrom
add-uos:master
Sep 20, 2026
Merged

deepin-bot[bot] merged 1 commit into
linuxdeepin:masterfrom
add-uos:master

Conversation

@add-uos

@add-uos add-uos commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor
  1. 新增 sources 拉取 rofd 源码,装 cargo/rustc 及 libjbig2dec0-dev

  2. cargo 构建 rofd-ffi,安装 so 与头文件

  3. CMake 加 -DROFD_ROOT,LDD_FILES 加 librofd_ffi.so / libjbig2dec.so

  4. Add sources to fetch rofd, install cargo/rustc and libjbig2dec0-dev

  5. Build rofd-ffi with cargo, install so and header

  6. Add -DROFD_ROOT to CMake, add librofd_ffi.so / libjbig2dec.so to LDD_FILES

Log: 源码构建 rofd-ffi 并打包 libjbig2dec,新增 OFD 支持
Influence: deepin-reader 支持 OFD 渲染,运行时依赖自带

Summary by Sourcery

Build and package rofd-ffi and its dependencies to enable OFD rendering in deepin-reader.

New Features:

  • Add OFD rendering support by building and packaging the rofd-ffi library and its header.
  • Bundle libjbig2dec as a runtime dependency for rofd's JBIG2 support.

Enhancements:

  • Integrate the locally built rofd installation into the CMake configuration and runtime dependency collection.

Build:

  • Add the rofd source repository and Rust build dependencies, and build rofd-ffi during packaging.

1. 新增 sources 拉取 rofd 源码,装 cargo/rustc 及 libjbig2dec0-dev
2. cargo 构建 rofd-ffi,安装 so 与头文件
3. CMake 加 -DROFD_ROOT,LDD_FILES 加 librofd_ffi.so / libjbig2dec.so

1. Add sources to fetch rofd, install cargo/rustc and libjbig2dec0-dev
2. Build rofd-ffi with cargo, install so and header
3. Add -DROFD_ROOT to CMake, add librofd_ffi.so / libjbig2dec.so to LDD_FILES

Log: 源码构建 rofd-ffi 并打包 libjbig2dec,新增 OFD 支持
Influence: deepin-reader 支持 OFD 渲染,运行时依赖自带
@github-actions

Copy link
Copy Markdown
  • 检测到敏感词export变动
详情
    {
    "export": {
        "linglong.yaml": {
            "b": [
                "  export PATH=\"$PREFIX/bin:$PATH\""
            ]
        }
    }
}

@sourcery-ai

sourcery-ai Bot commented Sep 20, 2026

Copy link
Copy Markdown

Reviewer's Guide

该 PR 在 Linglong 构建流程中拉取固定版本的 rofd 源码,安装 Rust/Cargo 工具链和 jbig2dec 依赖,编译并部署 rofd-ffi 及头文件;同时通过 ROFD_ROOT 接入 CMake,并将 rofd 与 libjbig2dec 运行时库纳入最终包,以支持 OFD 渲染。

Flow diagram for building and packaging OFD support

flowchart TD
    A[Fetch pinned rofd source] --> B[Install cargo rustc and libjbig2dec0]
    B --> C[Build rofd-ffi with cargo]
    C --> D[Install librofd_ffi.so and rofd.h]
    D --> E[CMake configure with ROFD_ROOT]
    E --> F[Build deepin-reader]
    F --> G[Package librofd_ffi.so and libjbig2dec.so]
Loading

File-Level Changes

Change Details Files
引入并固定 rofd 源码,在构建阶段编译和安装 rofd-ffi 及其 C 头文件。
  • 新增 rofd Git source,并固定到指定 commit。
  • 下载并解压 cargo、rustc、pkg-config 及 libjbig2dec 开发/运行时依赖。
  • 通过 Cargo release 构建 rofd-ffi,安装带 soname 的共享库及 rofd.h。
  • 增加源码路径探测、构建失败检查和 Cargo 构建目录清理。
linglong.yaml
将 rofd-ffi 集成到 deepin-reader 的 CMake 构建和运行时打包流程。
  • 向 CMake 传入 ROFD_ROOT,使用 PREFIX 中安装的 rofd 头文件和库。
  • 将 librofd_ffi.so 与 libjbig2dec.so 纳入 LDD_FILES,随包分发 OFD 渲染运行时依赖。
  • 刷新动态链接缓存以支持依赖解析。
linglong.yaml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: add-uos, lzwind

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

@add-uos

add-uos commented Sep 20, 2026

Copy link
Copy Markdown
Contributor Author

/forcemerge

@deepin-bot

deepin-bot Bot commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

This pr force merged! (status: unstable)

@deepin-bot
deepin-bot Bot merged commit e7bc32c into linuxdeepin:master Sep 20, 2026
7 of 8 checks passed
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.

3 participants