vboot_reference: make the flashrom dependency optional

Container-Optimized OS (COS) maintains a fork of several ChromiumOS
repositories including chromiumos-overlay and
vboot_reference. Currently sys-apps/flashrom is required to build
vboot_reference for tools such as futility. However, since COS doesn't
use futility or flashrom and since both of those have their own set of
dependencies to maintain, the COS team would like to make this
dependency optional in the vboot_reference ebuild.

A new use flag is declared called "flashrom" and is enabled by
default. The sys-apps/flashrom dependency is now only loaded if the
use flag is enabled.

BUG=b/256682063
TEST=presubmit
RELEASE_NOTE=none

Change-Id: I368134069c42664cf3823d72b91d067099ea764d
Reviewed-on: https://cos-review.googlesource.com/c/third_party/overlays/chromiumos-overlay/+/40327
Reviewed-by: Oleksandr Tymoshenko <ovt@google.com>
Tested-by: Cusky Presubmit Bot <presubmit@cos-infra-prod.iam.gserviceaccount.com>
2 files changed