blob: 4865c7f4bf64621d7544bca50ba500d700a895de [file] [log] [blame]
Allen Webb3949eebe2019-09-25 13:40:37 -07001# Copyright 2019 The Chromium OS Authors. All rights reserved.
2# Distributed under the terms of the GNU General Public License v2
3
Allen Webb798524a2020-08-27 08:37:40 -05004EAPI=7
Allen Webb3949eebe2019-09-25 13:40:37 -07005
6CROS_WORKON_PROJECT="chromiumos/platform2"
7CROS_WORKON_LOCALNAME="platform2"
8CROS_WORKON_SUBTREE="authpolicy/dbus_bindings debugd/dbus_bindings login_manager/dbus_bindings system_api"
9
10START_DIR="system_api"
11
12inherit cros-workon cros-rust
13
Allen Webb935359b2019-10-21 15:24:04 -070014CROS_RUST_CRATE_NAME="system_api"
Allen Webb3949eebe2019-09-25 13:40:37 -070015DESCRIPTION="Chrome OS system API D-Bus bindings for Rust."
16HOMEPAGE="https://chromium.googlesource.com/chromiumos/platform2/+/master/system_api/"
17
18LICENSE="BSD-Google"
19SLOT="0/${PVR}"
20KEYWORDS="~*"
21
22RDEPEND=""
23
24DEPEND="${RDEPEND}
Allen Webb277a8da2020-09-17 18:42:11 -050025 >chromeos-base/chromeos-dbus-bindings-rust-0.24.52-r16:=
26 =dev-rust/dbus-0.8*:=
Allen Webb3949eebe2019-09-25 13:40:37 -070027"
28
29src_unpack() {
30 cros-workon_src_unpack
31 S+="/${START_DIR}"
32
33 cros-rust_src_unpack
34}
35
36src_compile() {
37 ecargo_build
38 use test && ecargo_test --no-run
39}
40
41src_test() {
42 if use x86 || use amd64; then
43 ecargo_test
44 else
45 elog "Skipping rust unit tests on non-x86 platform"
46 fi
47}