blob: 03e5dbd905761c5cd067d478767dc3d88b5d6463 [file] [log] [blame]
# Copyright 2015 The Chromium OS Authors. All rights reserved.
# Distributed under the terms of the GNU General Public License v2
EAPI="5"
CROS_WORKON_COMMIT=("93dc5eab5bb9aec12e103e29e6e0516d442807c6" "87e56c8b19ceabf3e8e9c75a208b410bd1d3d478")
CROS_WORKON_TREE=("c9338e2c2e898e065dce6d62921e358a85709cd3" "e7dba8c91c1f3257c34d4a7ffff0ea2537aeb6bb" "51aac60e6ead353609541447809777bd142ffff4")
CROS_WORKON_INCREMENTAL_BUILD=1
CROS_WORKON_LOCALNAME=("platform2" "weave/libweave")
CROS_WORKON_PROJECT=("chromiumos/platform2" "weave/libweave")
CROS_WORKON_DESTDIR=("${S}/platform2" "${S}/platform2/libweave")
CROS_WORKON_SUBTREE=("common-mk .gn" "")
PLATFORM_SUBDIR="libweave"
inherit cros-workon libchrome platform
DESCRIPTION="Weave device library"
HOMEPAGE="http://dev.chromium.org/chromium-os/platform"
LICENSE="BSD-Google"
SLOT="0"
KEYWORDS="*"
# libweave-test, which depends on gmock, is built unconditionally, so the gmock
# dependency is always needed.
DEPEND="dev-cpp/gtest:="
src_install() {
insinto "/usr/$(get_libdir)/pkgconfig"
# Install libraries.
local v
for v in "${LIBCHROME_VERS[@]}"; do
./preinstall.sh "${OUT}" "${v}"
dolib.so "${OUT}"/lib/libweave-"${v}".so
doins "${OUT}"/lib/libweave-*"${v}".pc
dolib.a "${OUT}"/libweave-test-"${v}".a
done
# Install header files.
insinto /usr/include/weave/
doins -r include/weave/*
}
platform_pkg_test() {
platform_test "run" "${OUT}/libweave_testrunner"
}