blob: c163a78c7ff163651b4ea15ff98a76079f37922a [file] [log] [blame]
# Copyright 2021 The Chromium OS Authors. All rights reserved.
# Distributed under the terms of the GNU General Public License v2
EAPI=7
CROS_WORKON_COMMIT=("fa68100f5be2459da45a73682ce35c3364c79790" "f50d917b6de0e955da4defed02d48a9a45e85d68")
CROS_WORKON_TREE=("a0a198b5a9aa1388d58ee6c18bbae218be5b69d1" "ef118ceb3e8ebcc8b8a4ae6577a71d7ad210a722" "e7dba8c91c1f3257c34d4a7ffff0ea2537aeb6bb")
CROS_GO_PACKAGES=(
"android.googlesource.com/platform/external/perfetto/protos/perfetto/metrics"
"android.googlesource.com/platform/external/perfetto/protos/perfetto/trace"
)
inherit cros-constants
CROS_WORKON_LOCALNAME=("../aosp/external/perfetto" "../platform2")
CROS_WORKON_PROJECT=("platform/external/perfetto" "chromiumos/platform2")
CROS_WORKON_REPO=("${CROS_GIT_AOSP_URL}" "${CROS_GIT_HOST_URL}")
CROS_WORKON_DESTDIR=("${S}/aosp/external/perfetto" "${S}/platform2")
CROS_WORKON_EGIT_BRANCH=("master" "main")
CROS_WORKON_SUBTREE=("" "common-mk .gn")
PLATFORM_SUBDIR="./"
inherit cros-go cros-workon platform
DESCRIPTION="Perfetto go proto for Chrome OS"
HOMEPAGE="https://android.googlesource.com/platform/external/perfetto/+/refs/tags/v15.0/protos/perfetto/metrics/android/"
KEYWORDS="*"
IUSE="cros-debug"
LICENSE="Apache-2.0"
SLOT="0"
# protobuf dep is for using protoc at build-time to generate perfetto's headers.
BDEPEND="
dev-go/protobuf
"
RDEPEND="
!chromeos-base/perfetto_proto
"
src_unpack() {
platform_src_unpack
CROS_GO_WORKSPACE="${OUT}/gen/go"
}
src_prepare() {
default
cp "${FILESDIR}/BUILD.gn" "${S}"
echo 'option go_package = "trace";' >> "${S}/../aosp/external/perfetto/protos/perfetto/trace/perfetto_trace.proto"
}
src_install() {
cros-go_src_install
}