blob: 4b231ecbc1d5ee86dfcd75cb96c2572948ad9156 [file] [log] [blame]
# Copyright 2022 The ChromiumOS Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
CROS_WORKON_COMMIT=("63150342c81b7d2c6e55b02852c0837a782f27f6" "2b34585b049b7631adadabf07791f850d5bfb13f" "ac9bc7b5de05ea73dfd9a732d4ac83a88de40916" "a7d6a7cd435acb9fd405f96b83ff5e43f8cc966f")
CROS_WORKON_TREE=("41d899585b7a07ea908a0cca2944a7b8a4d13655" "f91b6afd5f2ae04ee9a2c19109a3a4a36f7659e6" "07db639a32655a8f9a570bfa340fcb604a92366d" "0ab5ab31e04e6acb1a36c06e9572d3bc6b6e698b" "e65e1a07161a4bd8d6aef57c91726d815fff444f")
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"
}