blob: bb13d2e34a4e54b928b310db844a44b7be32ab76 [file] [log] [blame]
# Copyright 2019 The Chromium OS Authors. All rights reserved.
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
CROS_WORKON_COMMIT="2a85ee3e727f23f61cb62a6ce642da7e18c9f50a"
CROS_WORKON_TREE="d3de0c7d6ef905e1a802f5f40b6848be14b6df0d"
CROS_WORKON_LOCALNAME="adhd"
CROS_WORKON_PROJECT="chromiumos/third_party/adhd"
# We don't use CROS_WORKON_OUTOFTREE_BUILD here since audio_streams/Cargo.toml
# is using "provided by ebuild" macro which supported by cros-rust
CROS_WORKON_INCREMENTAL_BUILD=1
CROS_WORKON_SUBTREE="audio_streams"
inherit cros-workon cros-rust
DESCRIPTION="Crate provides a basic interface for playing audio."
HOMEPAGE="https://chromium.googlesource.com/chromiumos/third_party/adhd/+/master/audio_streams"
LICENSE="BSD-Google"
KEYWORDS="*"
IUSE="test"
DEPEND="
dev-rust/sync:=
dev-rust/sys_util:=
"
RDEPEND="!<=media-sound/audio_streams-0.1.0-r7"
src_unpack() {
cros-workon_src_unpack
S+="/audio_streams"
cros-rust_src_unpack
}
src_compile() {
use test && ecargo_test --no-run
}
src_test() {
if use x86 || use amd64; then
ecargo_test
else
elog "Skipping rust unit tests on non-x86 platform"
fi
}
src_install() {
cros-rust_publish "${PN}" "$(cros-rust_get_crate_version)"
}