HomeFreeBSD

Mk/Uses/cargo.mk: Add CARGO_GIT_SUBDIR hook to provide hints for CARGO_USE_GIT*

Description

Mk/Uses/cargo.mk: Add CARGO_GIT_SUBDIR hook to provide hints for CARGO_USE_GIT*

This is a workaround to add some manual "support" for Cargo projects
that use workspaces where the current method of patching is not
good enough as it causes the various Cargo.toml to point to the
wrong directory. With CARGO_GIT_SUBDIR maintainers can control the
patching process a little and point things to the correct subdirectories.

CARGO_GIT_SUBDIR= <group>:<crate name>:<subdir under ${WRKSRC_group}>

This is needed for alacritty 0.4.0-rc2 where the glutin sources are
under ${WRKSRC_glutin}/glutin and not just ${WRKSRC_glutin}. This
causes the following issue:

error: failed to load source for a dependency on glutin

Caused by:

Unable to update .../x11/alacritty/work/glutin-7e479d

Caused by:

found a virtual manifest at `.../x11/alacritty/work/glutin-7e479d/Cargo.toml` instead of a package manifest

For glutin we would set CARGO_GIT_SUBDIR=glutin:glutin:glutin to
work around this problem and point the build to
.../x11/alacritty/work/glutin-7e479d/glutin instead.

Details

Provenance
tobikAuthored on
Parents
rP517981: Update lang/erlang-runtime21 to version 21.3.8.11.
Branches
Unknown
Tags
Unknown