blob: 6c7ee0ca034da4f831fc21cbe867271a2967408d [file] [log] [blame]
# Copyright 2015 The Chromium OS Authors. All rights reserved.
# Distributed under the terms of the GNU General Public License v2
EAPI=7
CROS_WORKON_COMMIT=("e120a38324e6a4f913141f6cf31bccdb4d17caa2" "c0efdc07edb6044fff866e2c4724229a951a4fbf")
CROS_WORKON_TREE=("eec5ce9cfadd268344b02efdbec7465fbc391a9e" "e7dba8c91c1f3257c34d4a7ffff0ea2537aeb6bb" "207a66b6ccdc5ba610c7117e3e6d9e4e405c9b6c")
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"
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="$(libchrome_ver)"
./preinstall.sh "${OUT}" "${v}"
dolib.so "${OUT}"/lib/libweave-"${v}".so
doins "${OUT}"/lib/libweave-*"${v}".pc
dolib.a "${OUT}"/libweave-test-"${v}".a
# Install header files.
insinto /usr/include/weave/
doins -r include/weave/*
}
platform_pkg_test() {
platform_test "run" "${OUT}/libweave_testrunner"
}