Repository navigation
feat(debian): install rofd-ffi.pc in librofd-ffi-dev - #12
Conversation
Consumers currently have to hardcode the library directory and guess the version: the released ABI has no pkg-config metadata, so e.g. Meson projects carry -Drofd_libdir/-Drofd_includedir by hand and cannot check the version they build against. Ship a rofd-ffi.pc from librofd-ffi-dev. The template is filled in at build time with the Debian version (the release identifier; the Cargo crate version lags the release train) and DEB_HOST_MULTIARCH, and declares Requires: cairo because rofd.h includes <cairo.h> (matching the existing libcairo2-dev dependency) and -lrofd_ffi for the linker symlink the package already ships. Verification (on a non-Debian host, so dpkg-buildpackage itself was not run): - recipe indentation checked with cat -A (all recipe lines start with TAB) - substitution and metadata checked by running the same sed with @Version@=0.4.3 and @multiarch@=x86_64-linux-gnu: Version: 0.4.3; Requires: cairo; Libs: -L/usr/lib/x86_64-linux-gnu -lrofd_ffi and `pkg-config --libs` yields -L/usr/lib/x86_64-linux-gnu -lrofd_ffi -lcairo - `pkg-config --validate` reports nothing for the generated file
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThe Debian packaging now generates and installs rofd-ffi.pc in librofd-ffi-dev, allowing consumers to discover the multiarch include/library paths, link against rofd_ffi and Cairo, and enforce a minimum release version via pkg-config. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Hi @YangtseSu. Thanks for your PR. I'm waiting for a linuxdeepin member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
I have read the CLA Document and I hereby sign the CLA. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: lzwind, YangtseSu The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Motivation. The released ABI ships no pkg-config metadata, so consumers
cannot discover the include directory, the library or the version. In practice
they hardcode paths (our papers-ofd backend has to carry
-Drofd_libdir=... -Drofd_includedir=...) and have no way to express "I needthe ABI as of 0.4.2 or newer".
Behaviour.
librofd-ffi-devnow installs/usr/lib/<multiarch>/pkgconfig/rofd-ffi.pc, generated fromdebian/rofd-ffi.pc.inat build time:Version:is the Debian version (dpkg-parsechangelog -SVersion), i.e. therelease identifier — the Cargo crate version currently lags the release train
(
crates/rofd-ffi/Cargo.tomlstill says 0.4.0 while the package is 0.4.3), andconsumers compare against the release;
Requires: cairobecauserofd.hincludes<cairo.h>— this matches theexisting
libcairo2-devdependency of the-devpackage;Libs: -lrofd_ffi, the linker symlink the package already installs.With it a Meson consumer can say
dependency('rofd-ffi', version: '>= 0.4.2')and both the paths and the versioncheck come from the metadata.
Verification (done on a non-Debian host, so
dpkg-buildpackageitself wasnot run here):
Recipe lines were checked to start with a tab (
cat -A). The same file isalready shipped by the AUR
librofd-ffipackage, so the two packaging pathsstay in sync.
Summary by Sourcery
Add Debian pkg-config metadata so consumers can discover and version-check the rofd-ffi ABI without hardcoded paths.
New Features:
Build: