Ximin Luo:
> Simon McVittie:
>> [..]
>>
>> librsvg runs `cargo build` during its own build: running `make` compiles
>> C code, then calls `cargo build` to compile Rust code that depends on the
>> C, then compiles some more C code that depends on the Rust. I don't think
>> we can avoid that.
>>
>> It might be possible to patch Makefile.am to use dh_auto_build or
>> dh_auto_install instead of `cargo build`, but that's "inside out" compared
>> with a normal Debian package build, so I'd be far from confident about
>> making that change myself.
>>
> [..]

The latest version of the cargo Debian package has a wrapper script that should 
make this a bit easier. The cargo build itself now uses this wrapper script, 
see here for an example: 
https://salsa.debian.org/rust-team/cargo/blob/debian/sid/debian/rules

For librsvg, it should be sufficient to add a build-depends on python3:native, 
and add something like this to your d/rules:

PATH := /usr/share/cargo/bin:$(PATH)
export PATH

override_dh_auto_configure:
        cargo prepare-debian $(CURDIR)/vendor

Later, when this bug is fixed and you stop depending on vendored libraries, the 
configure override can be changed to:

override_dh_auto_configure:
        cargo prepare-debian /usr/share/cargo/registry

X

-- 
GPG: ed25519/56034877E1F87C35
GPG: rsa4096/1318EFAC5FBBDBCE
https://github.com/infinity0/pubkeys.git

Reply via email to