Skip to content

WIP: use cargo-c

Federico Mena Quintero requested to merge cargo-c into master

This will fix #552 (closed).

I've included just the basic metadata, and it does not yet generate the same .pc file - need to tweak some things, maybe.

The DT_SONAME looks correct (objdump -p); I'm not so sure about the version in the filename for target/debug/librsvg.so.2.51.0.

  • Figure out if the .pc needs to look the same as the original (needs the same librsvg-2.0.pc name because that's what apps expect; contents can change.)
  • Figure out the .so filename - see comments by @smcv below
  • Stay at SONAME librsvg-2.so.2 or distros will be unhappy (and API/ABI are still compatible anyway).
  • Add configure.ac check for cargo-c
  • Librsvg probably needs to change the name of the pkg-config file too.
  • Update COMPILING.md with a cargo-c dependency.
  • Test for cargo-cbuild 0.9 once it is released; it has fixes we need.
  • Generate include/librsvg/rsvg-version.h from build.rs instead of configure so a plain cargo cinstall will work.
  • Change Makefile.am to use cargo-cbuild / cargo-cinstall - see below
  • Since libtool is not used anymore, figure out how to call the GObject-Introspection machinery.
  • Actually implement capi as a conditionally-compiled feature Not mandatory for this release; it's interesting only for a Rust-only crate, and 2.52.0 won't get published to crates.io just yet.

Downstreams:

  • Notify release team and gnome-build-meta.
  • Notify downstreams that cargo-c is required, in discourse.gnome.org.

Makefile.am changes

  • Replace compilation with cargo cbuild
  • Replace installation with cargo cinstall - be sure to pass all the --libdir, etc.
  • Change the GObject-Introspection machinery since libtool is not used anymore, and the stock Makefile.introspection is not usable here.
Edited by Federico Mena Quintero

Merge request reports