blob: efe401c661c15e4b59ce668ce56ca9b27f0881e0 [file] [log] [blame]
# Copyright 2019 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
EAPI=7
CROS_WORKON_COMMIT="b05e4a6b92b2cfe608b6cd8d5d37168680fc080e"
CROS_WORKON_TREE=("52a8a8b6d3bbca5e90d4761aa308a5541d52b1bb" "989d840598227b15d78525d5f92c806011a9c158" "e7dba8c91c1f3257c34d4a7ffff0ea2537aeb6bb")
CROS_WORKON_INCREMENTAL_BUILD=1
CROS_WORKON_LOCALNAME="platform2"
CROS_WORKON_PROJECT="chromiumos/platform2"
CROS_WORKON_OUTOFTREE_BUILD=1
CROS_WORKON_SUBTREE="common-mk libhwsec .gn"
PLATFORM_SUBDIR="libhwsec"
inherit cros-workon platform
DESCRIPTION="Crypto and utility functions used in TPM related daemons."
HOMEPAGE="https://chromium.googlesource.com/chromiumos/platform2/+/master/libhwsec/"
LICENSE="BSD-Google"
KEYWORDS="*"
IUSE="test tpm2"
COMMON_DEPEND="
dev-libs/openssl:0=
!tpm2? ( app-crypt/trousers:= )
"
RDEPEND="${COMMON_DEPEND}"
DEPEND="${COMMON_DEPEND}"
src_install() {
insinto /usr/include/chromeos/libhwsec
doins ./*.h
insinto /usr/include/chromeos/libhwsec/overalls
doins ./overalls/overalls.h
doins ./overalls/overalls_api.h
if ! use tpm2; then
insinto /usr/include/chromeos/libhwsec/test_utils/tpm1
doins ./test_utils/tpm1/*.h
fi
dolib.so "${OUT}"/lib/libhwsec.so
dolib.a "${OUT}"/libhwsec_test.a
}
platform_pkg_test() {
local tests=(
hwsec_testrunner
)
local test_bin
for test_bin in "${tests[@]}"; do
platform_test "run" "${OUT}/${test_bin}"
done
}