blob: 251e87e6e40a691a82759a91ca0de941f99c96f8 [file] [log] [blame]
# Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
# Distributed under the terms of the GNU General Public License v2
EAPI=4
CROS_WORKON_COMMIT="93e94b1b79c34bc4653962cb5ccc897939fe33c2"
CROS_WORKON_TREE="297dee95da3a766ff0b2f85b8d0d9a8581834e34"
CROS_WORKON_PROJECT="chromiumos/platform/mist"
CROS_WORKON_OUTOFTREE_BUILD=1
inherit cros-debug cros-workon udev
DESCRIPTION="Chromium OS Modem Interface Switching Tool"
HOMEPAGE="http://www.chromium.org/"
LICENSE="BSD"
SLOT="0"
KEYWORDS="alpha amd64 arm hppa ia64 m68k mips ppc ppc64 s390 sh sparc x86"
IUSE="-asan -clang platform2 test"
REQUIRED_USE="asan? ( clang )"
LIBCHROME_VERS="180609"
RDEPEND="
chromeos-base/libchrome:${LIBCHROME_VERS}[cros-debug=]
chromeos-base/libchromeos
chromeos-base/metrics
chromeos-base/platform2
dev-libs/protobuf
sys-fs/udev
virtual/libusb:1
"
DEPEND="
${RDEPEND}
test? ( dev-cpp/gmock )
test? ( dev-cpp/gtest )
"
RDEPEND="!platform2? ( ${RDEPEND} )"
DEPEND="!platform2? ( ${DEPEND} )"
src_prepare() {
if use platform2; then
printf '\n\n\n'
ewarn "This package doesn't install anything with USE=platform2."
ewarn "You want to use the new chromeos-base/platform2 package."
printf '\n\n\n'
return 0
fi
cros-workon_src_prepare
}
src_configure() {
use platform2 && return 0
clang-setup-env
cros-workon_src_configure
}
src_compile() {
use platform2 && return 0
cros-workon_src_compile
}
src_test() {
use platform2 && return 0
cros-workon_src_test
}
src_install() {
use platform2 && return 0
cros-workon_src_install
dobin "${OUT}"/mist
insinto /usr/share/mist
doins default.conf
udev_dorules 51-mist.rules
}