blob: 9ac1ffccc3fe6a3c4993564488a91d94cbda989b [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=("f34cf3a06f7b17b7829185630d886a5d9d3f0e75" "b2178e35e0c0a881c7c6625c1a2ea31937033c9c")
CROS_WORKON_TREE=("791c6808b4f4f5f1c484108d66ff958d65f8f1e3" "e7dba8c91c1f3257c34d4a7ffff0ea2537aeb6bb" "df427d17d5cd6ed4c37b18d24c5f876f2ff665ce")
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.so
doins "${OUT}"/lib/libweave{,-test}.pc
dolib.a "${OUT}"/libweave-test.a
# Install header files.
insinto /usr/include/weave/
doins -r include/weave/*
}
platform_pkg_test() {
platform_test "run" "${OUT}/libweave_testrunner"
}