blob: da23880c0b089d99440fa40819ffd9a2b2de41b1 [file] [log] [blame]
# Copyright 2022 The ChromiumOS Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
CROS_WORKON_COMMIT="3eb0992ede75aeabfae0202ee4064b17675c2b84"
CROS_WORKON_TREE="b661f320386100bde2ceb1960bf3de474d09e075"
CROS_RUST_SUBDIR="common/balloon_control"
CROS_WORKON_LOCALNAME="../platform/crosvm"
CROS_WORKON_PROJECT="chromiumos/platform/crosvm"
CROS_WORKON_EGIT_BRANCH="chromeos"
CROS_WORKON_INCREMENTAL_BUILD=1
CROS_WORKON_SUBTREE="${CROS_RUST_SUBDIR}"
CROS_WORKON_SUBDIRS_TO_COPY="${CROS_RUST_SUBDIR}"
inherit cros-workon cros-rust
DESCRIPTION="APIs to allow external control of a virtio balloon device"
HOMEPAGE="https://chromium.googlesource.com/chromiumos/platform/crosvm/+/HEAD/common/balloon_control"
LICENSE="BSD-Google"
KEYWORDS="*"
IUSE="test"
DEPEND="dev-rust/third-party-crates-src:="
RDEPEND="${DEPEND}"
src_unpack() {
# Copy the CROS_RUST_SUBDIR to a new location in the $S dir to make sure cargo will not
# try to build it as apart of the crosvm workspace.
cros-workon_src_unpack
if [ ! -e "${S}/${PN}" ]; then
(cd "${S}" && ln -s "./${CROS_RUST_SUBDIR}" "./${PN}") || die
fi
S+="/${PN}"
cros-rust_src_unpack
}