| # 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} 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 |
| } |