# We have a conf and classes directory, but we have classes that should
# override those in oe-core, so prepend to BBPATH
BBPATH =. "${LAYERDIR}:"

# We have a recipes directory, add to BBFILES
BBFILES += "${LAYERDIR}/recipes*/*/*.bb ${LAYERDIR}/recipes*/*/*.bbappend"

BBFILE_COLLECTIONS += "lts-rust-mixin"
BBFILE_PATTERN_lts-rust-mixin := "^${LAYERDIR}/"
BBFILE_PRIORITY_lts-rust-mixin = "6"

LAYERSERIES_COMPAT_lts-rust-mixin = "kirkstone"

LAYERDEPENDS_lts-rust-mixin = "core"

RUSTVERSION ?= "1.75%"

# This is not ideal, but it seems better to mask out the older oe-core
# recipes completely since they will not work with this layer on top,
# and several of them result in parse warnings.
BBMASK:append = " meta/recipes-devtools/cargo/ meta/recipes-devtools/rust/ meta/recipes-gnome/librsvg"

# These are in bitbake.conf in langdale and up, adding them here to make
# using the layer more turn-key seems reasonable.
BB_BASEHASH_IGNORE_VARS:append = " RUST_BUILD_SYS RUST_HOST_SYS RUST_TARGET_SYS"

# Since we cannot overlay the lib/oe version easily, make sure our backport
# of rust.py in lib/mixin is picked up.
OE_EXTRA_IMPORTS:append = " mixin.rust"
