blob: 7e5a15b4ad3b50d5da89b0b7d8ff49e6e46a33b0 [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="143f6f59e6002c02e58f4daefbd75cc49830d6ae"
CROS_WORKON_TREE=("791c6808b4f4f5f1c484108d66ff958d65f8f1e3" "81dfbbc1756a3b4224b447e7bf10a916d97c4f66" "0b612d0f1e8dbe59a5549b476f1e681e0b7fe94e" "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 libhwsec-foundation .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="
chromeos-base/libhwsec-foundation
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
}