blob: 3edfd0b657fdc81056d76d5b9643c6e9a2e93484 [file] [edit]
# Copyright 2019 The ChromiumOS Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
CROS_RUST_SUBDIR="system_api"
CROS_WORKON_PROJECT="chromiumos/platform2"
CROS_WORKON_LOCALNAME="../platform2"
CROS_WORKON_SUBTREE="${CROS_RUST_SUBDIR} cryptohome/dbus_bindings debugd/dbus_bindings dlcservice/dbus_adaptors login_manager/dbus_bindings shill/dbus_bindings spaced/dbus_bindings permission_broker/dbus_bindings power_manager/dbus_bindings printscanmgr/dbus_bindings swap_management/dbus_bindings vm_tools/dbus_bindings vtpm"
inherit cros-workon cros-rust cros-protobuf
DESCRIPTION="Chrome OS system API D-Bus bindings for Rust."
HOMEPAGE="https://chromium.googlesource.com/chromiumos/platform2/+/HEAD/system_api/"
LICENSE="BSD-Google"
SLOT="0/${PVR}"
KEYWORDS="~*"
DEPEND="
cros_host? ( dev-libs/protobuf:= )
dev-rust/third-party-crates-src:=
dev-rust/chromeos-dbus-bindings:=
sys-apps/dbus:=
"
# (crbug.com/1182669): build-time only deps need to be in RDEPEND so they are pulled in when
# installing binpkgs since the full source tree is required to use the crate.
RDEPEND="${DEPEND}
!chromeos-base/system_api-rust
"
BDEPEND="
dev-rust/chromeos-dbus-bindings
"
src_install() {
# We don't want the build.rs to get packaged with the crate. Otherwise
# we will try and regenerate the bindings.
rm build.rs || die "Cannot remove build.rs"
cros-rust_src_install
}