blob: d5ad5f88af79ff6127f851320c77e83ddc86208a [file] [log] [blame]
# Copyright 2020 The Chromium OS Authors. All rights reserved.
# Distributed under the terms of the GNU General Public License v2
EAPI=7
CROS_WORKON_COMMIT=("d640cf36c1cb7d5b90023f4fb26b476a41d26b6f" "35fe21779fddc0d376da13dab49e31fa3491205f")
CROS_WORKON_TREE=("5ce03b99f33d64f242f02a09dcf165bdbad8d7d4" "e7dba8c91c1f3257c34d4a7ffff0ea2537aeb6bb" "fa22c2326c89f0ccbecf5d2e3635701867e62b85")
CROS_WORKON_PROJECT=(
"chromiumos/platform2"
"chromiumos/platform/cbor"
)
CROS_WORKON_LOCALNAME=(
"platform2"
"platform/cbor"
)
CROS_WORKON_DESTDIR=(
"${S}/platform2"
# This needs to be platform2/cbor instead of platform/cbor because we are
# using the platform2 build system.
"${S}/platform2/cbor"
)
CROS_WORKON_SUBTREE=("common-mk .gn" "")
PLATFORM_SUBDIR="cbor"
inherit cros-workon platform
DESCRIPTION="Concise Binary Object Representation (CBOR) library for Chromium OS"
HOMEPAGE="https://chromium.googlesource.com/chromiumos/platform/cbor"
LICENSE="BSD-Google"
SLOT="0"
KEYWORDS="*"
src_install() {
dolib.so "${OUT}"/lib/libcbor.so
insinto /usr/include/chromeos/cbor/
doins ./*.h
insinto "/usr/$(get_libdir)/pkgconfig"
doins "${OUT}"/obj/cbor/cbor.pc
local fuzzer_component_id="923964"
platform_fuzzer_install "${S}/OWNERS" "${OUT}"/reader_fuzzer \
--comp "${fuzzer_component_id}"
}
platform_pkg_test() {
platform_test "run" "${OUT}/cbor_unittests"
}