blob: 8cc32a60165dd9553d1bc32ffb49aa412b3e6ef0 [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=("a27c2e84964615fded123086a7d9b139b6e9e1b4" "a852917ec1d1ada705a0a71deaf419af190f268c")
CROS_WORKON_TREE=("6f3abf0e1487e52593fe1b4fc780df5844fa9cc1" "dc1506ef7c8cfd2c5ffd1809dac05596ec18773c" "982e8b18357e53490140eea1be7fdb0f9840c4d3")
CROS_WORKON_INCREMENTAL_BUILD=1
CROS_WORKON_LOCALNAME=("platform2" "weave/libweave")
CROS_WORKON_PROJECT=("chromiumos/platform2" "weave/libweave")
CROS_WORKON_DESTDIR=("${S}/platform2" "${S}/weave/libweave")
CROS_WORKON_SUBTREE=("common-mk .gn" "")
PLATFORM_SUBDIR="libweave"
PLATFORM_GYP_FILE="libweave.gyp"
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/gmock"
src_unpack() {
local s="${S}"
platform_src_unpack
S="${s}/weave/libweave/"
}
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"
}