The IUSE was accidentally dropped during package QA tidyup.
Instead of restoring it we will drop it as superfluous;
the fix it applies should not hurt anything and is now
unconditional.
Signed-off-by: Matt Jolly <kangie@gentoo.org>
This path still used legacy llvm eclass get_llvm_prefix calls that
included a slot. This is not supported by llvm-r1.
Signed-off-by: Matt Jolly <kangie@gentoo.org>
Reported by mgorny (and suggested fix is by him): unpack just cargo.bashcomp.sh
from the distfile instead of the whole thing, that way we don't need
chcek-reqs.eclass.
Signed-off-by: Sam James <sam@gentoo.org>
* Use just :0 to simplify and shorten the blockers.
By doing this, we also cover upgrading from older versions than those
listed too.
* Include dev-lang/rust too.
Signed-off-by: Sam James <sam@gentoo.org>
* Use just :0 to simplify and shorten the blockers.
By doing this, we also cover upgrading from older versions than those
listed too.
* Include dev-lang/rust-bin too.
Signed-off-by: Sam James <sam@gentoo.org>
* Use just :0 to simplify and shorten the blockers.
By doing this, we also cover upgrading from older versions than those
listed too.
* Include dev-lang/rust-bin too.
Signed-off-by: Sam James <sam@gentoo.org>
Tidyups:
- $(cargo_crate_uris)
- Rust BDEPENDS come from the eclass except in very rare
circumstances (RUST_OPTIONAL=1)
- RUST_M{AX,IN}_VER where required.
- Suboptimal crate separator (`-` -> `@`)
Signed-off-by: Matt Jolly <kangie@gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/39218
Signed-off-by: Matt Jolly <kangie@gentoo.org>
Port to llvm-r1 to gain the fancy new `llvm_slot_{x}` USE flags
which we use in the rust eclass to force a closer dependency on
specific LLVM slots.
Since Rust in Gentoo is only ever built against the one LLVM slot
we are able to simplify the LLVM logic in the Rust ebuilds and use
our knowledge of the LLVM -> Rust version mapping to enable
slots for dev-lang/rust in a usable manner.
Since Rust is now slotted and not managed entirely by eselect-rust
each slot needs to be added to LDPATH.
We also drop the `profiler` USE as it's inconsistent with what
upstream ship by default and casues issues where other package's
build systems assume that it exists.
This commit also introduces dev-lang/rust-common which handles bash
completions for slotted Rust.
dev-lang/rust-bin:
`LLVM_OPTIONAL` is used as we don't need to consume LLVM,
we really just want the free IUSE.
Closes: https://bugs.gentoo.org/941146
Signed-off-by: Matt Jolly <kangie@gentoo.org>
Inherit the rust eclass and take advantage of eclass features like
`RUST_MIN_VER`.
`RUST_DEPEND` was moved into the rust eclass in the previous commit
and is now prowided via this mechanism
`CARGO_OPTIONAL` now sets `RUST_OPTIONAL`, requiring ebuilds to
set `RUST_DEPEND` manually and manage both cargo and rust eclass
functions.
Replace calls to `cargo` with the rust eclass exported ${CARGO}.
Signed-off-by: Matt Jolly <kangie@gentoo.org>
The rust eclass acts similarly to the llvm eclass.
It works with optional `RUST_{MAX,MIN}_SLOT` variables to
enable ebuilds to trivially dependencies on appropriate
Rust SLOTs.
A `RUST_NEEDS_LLVM` variable can be set to have the eclass read
`LLVM_COMPAT` and generate an llvm-r1-USE-gated dependency string.
`RUST_USEDEP`, if set will be included in the dependency string
and checks against installed packages.
In either case these are stored in `RUST_DEPEND` for consumpion
in the ebuild, and added to BDEPEND unless unless `RUST_OPTIONAL`
is set. `RUST_DEPEND` will only ever include in-tree slots; there
is no need to set `RUST_MIN_VER` if all in-tree versions are suitable.
If `RUST_MIN_VER` is set to a value older than the oldest in-tree slot
it is treated as if it is set to the lowest available.
The default `rust_pkg_setup` will prefix the selected slot to
`PATH` and export `RUSTC` and `CARGO` variables pointing to that
slot for ease-of-use.
This should prevent issues like:
Bug: https://bugs.gentoo.org/907492
Bug: https://bugs.gentoo.org/942444
Signed-off-by: Matt Jolly <kangie@gentoo.org>