blob: 33342ded47a297eec75680bddabf9bf9de2099d7 [file] [log] [blame]
# Copyright 2019 The ChromiumOS Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
CROS_WORKON_COMMIT="89ccff35e79a0d7ba46339b9364d496eb35c58d1"
CROS_WORKON_TREE=("6c90099ac14f834f71c81a3bfd87cc761be8f863" "a0d8550678a1ed2a4ab62782049032a024bf40df" "e7bb2927613abf42e9e633c010993a1c10182441" "21b5ff9b264359a7cddb0906219da24b04491862" "956c30347917fccc691a79addf055f199b675da1" "4ed4526d1cebc4021dde19b74452bc06716c3fec" "f8294a653aecfb61077b1f91d79f13365b6549bd" "3a7df68f70c7d697449fd6a965342139eb4dce18" "433baf0de74de8f33b68fd0bec974e95440ecd74")
CROS_RUST_SUBDIR="system_api"
CROS_WORKON_PROJECT="chromiumos/platform2"
CROS_WORKON_LOCALNAME="../platform2"
CROS_WORKON_SUBTREE="${CROS_RUST_SUBDIR} authpolicy/dbus_bindings cryptohome/dbus_bindings debugd/dbus_bindings dlcservice/dbus_adaptors login_manager/dbus_bindings shill/dbus_bindings power_manager/dbus_bindings vtpm"
inherit cros-workon cros-rust
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="*"
BDEPEND="dev-libs/protobuf"
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
"
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
}