blob: 5f8f3e1cb93017c43dc7dbbbfe6b115275b516e0 [file] [log] [blame]
# Copyright 2022 The ChromiumOS Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
CROS_WORKON_PROJECT=(
"chromiumos/platform2"
"aosp/platform/packages/modules/Bluetooth"
"aosp/platform/packages/modules/Bluetooth"
"aosp/platform/frameworks/proto_logging"
)
CROS_WORKON_LOCALNAME=(
"../platform2"
"../aosp/packages/modules/Bluetooth/local"
"../aosp/packages/modules/Bluetooth/upstream"
"../aosp/frameworks/proto_logging"
)
CROS_WORKON_DESTDIR=(
"${S}/platform2"
"${S}/platform2/bt"
"${S}/platform2/bt"
"${S}/platform2/external/proto_logging"
)
CROS_WORKON_SUBTREE=("common-mk .gn" "" "" "")
CROS_WORKON_EGIT_BRANCH=("main" "main" "upstream/master" "master")
CROS_WORKON_OPTIONAL_CHECKOUT=(
""
"use !floss_upstream"
"use floss_upstream"
""
)
PLATFORM_SUBDIR="bt"
IUSE="floss_upstream"
WANT_LIBCHROME="no"
WANT_LIBBRILLO="no"
inherit cros-workon toolchain-funcs platform
DESCRIPTION="Bluetooth Build Tools"
HOMEPAGE="https://android.googlesource.com/platform/packages/modules/Bluetooth"
# Apache-2.0 for system/bt
# All others from rust crates
LICENSE="
Apache-2.0
MIT BSD ISC
"
KEYWORDS="~*"
DEPEND=""
BDEPEND="
dev-libs/tinyxml2
chromeos-base/libchrome
dev-libs/flatbuffers
sys-devel/bison
sys-devel/flex
"
RDEPEND="${DEPEND}"
src_configure() {
ARCH="$(tc-arch "${CBUILD}")" tc-env_build platform "configure" "--host"
}
src_compile() {
ARCH="$(tc-arch "${CBUILD}")" tc-env_build platform "compile" "tools" "--host"
}
src_install() {
platform_src_install
local bin_dir="$(cros-workon_get_build_dir)/out/Default/"
dobin "${bin_dir}/bluetooth_packetgen"
dobin "${bin_dir}/bluetooth_flatbuffer_bundler"
}