blob: d4da24c4cd724de4f481e13dc202ff8d97a3438b [file] [edit]
# Copyright 2019 The ChromiumOS Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
CROS_WORKON_COMMIT="e63854574f2c053b75c91bc4066b1a32a50d66fc"
CROS_WORKON_TREE=("5863681b50b64ce05c8bece609cb0d408fe7de48" "e391648fe04ff3ee36728e5e73be6b7e8b041c6d" "14bef451b7ad0643325f11123b1739433d3b9eb1" "808455434979e636c42c269d6f786406e2b2be86" "81b98a37471549e915e85559acff067cc6a9590d" "5c31d4b692c7c5a53cdaa2c4d85a01cd090a2178" "689e22c4a45e4348a309c5fdead739e55bc07c44" "64d452aa9dc262e63c824de9d940066218b8ec44" "f5b9b06147bd01a8dee984b7bf2037b6a099c038" "66fc4e5f66284959a624a309d0667b9d6c3778ef" "1a2f71aa9a4e6651eea65cadd5fb84008f242c33" "2b057161abf6075fdd8c20b44befc5d0b1ff7c6f" "70439e546c72e09ccd20dbb1d19138536dd2654a")
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
}