blob: e34fee870e6a077af1d749071e43b3d043cb294f [file] [log] [blame]
# Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
# Distributed under the terms of the GNU General Public License v2
EAPI=7
CROS_WORKON_COMMIT="59c19b3c31c8e1e4c0c31c12e8ab94dfc15ab644"
CROS_WORKON_TREE=("e4f1feab5ccbe364f0e8b96b8a416ab2ad796291" "efea34ea2aa033f5673aefafaf480dd64c797d61" "271149b9f1e2617df41a5968210b918f9c716bd3")
CROS_WORKON_PROJECT="chromiumos/third_party/kernel"
CROS_WORKON_LOCALNAME="kernel/v5.4"
CROS_WORKON_EGIT_BRANCH="chromeos-5.4"
CROS_WORKON_INCREMENTAL_BUILD=1
CROS_WORKON_OUTOFTREE_BUILD=1
# Narrow the workon scope to just files referenced by the turbostat
# Makefile:
# https://chromium.googlesource.com/chromiumos/third_party/kernel/+/chromeos-4.14/tools/power/x86/turbostat/Makefile#12
CROS_WORKON_SUBTREE="arch/x86/include/asm tools/include tools/power/x86/turbostat"
inherit cros-sanitizers cros-workon toolchain-funcs
HOMEPAGE="https://www.kernel.org/"
DESCRIPTION="Intel processor C-state and P-state reporting tool"
LICENSE="GPL-2"
SLOT="0/0"
KEYWORDS="*"
IUSE="-asan"
RDEPEND="sys-libs/libcap:="
DEPEND="${RDEPEND}"
domake() {
emake -C tools/power/x86/turbostat \
BUILD_OUTPUT="$(cros-workon_get_build_dir)" DESTDIR="${D}" \
CC="$(tc-getCC)" "$@"
}
src_configure() {
sanitizers-setup-env
default
}
src_compile() {
domake
}
src_install() {
domake install
}