| # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
| # Distributed under the terms of the GNU General Public License v2 |
| |
| EAPI="4" |
| CROS_WORKON_COMMIT="e9c2f9569d80ffe6392a492ce848ae3dff751f8c" |
| CROS_WORKON_TREE="dea6200aaa61bbe1e665ff07bd2c3d0fddbffa49" |
| CROS_WORKON_PROJECT="chromiumos/platform/image-burner" |
| CROS_WORKON_LOCALNAME=${CROS_WORKON_PROJECT##*/} |
| |
| inherit cros-debug cros-workon |
| |
| DESCRIPTION="Image-burning service for Chromium OS" |
| HOMEPAGE="http://www.chromium.org/" |
| SRC_URI="" |
| |
| LICENSE="BSD" |
| SLOT="0" |
| KEYWORDS="alpha amd64 arm hppa ia64 m68k mips ppc ppc64 s390 sh sparc x86" |
| IUSE="-asan -clang test" |
| REQUIRED_USE="asan? ( clang )" |
| |
| LIBCHROME_VERS="180609" |
| |
| RDEPEND=" |
| chromeos-base/libchrome:${LIBCHROME_VERS}[cros-debug=] |
| chromeos-base/platform2 |
| dev-libs/dbus-glib |
| dev-libs/glib |
| sys-apps/rootdev |
| " |
| DEPEND="${RDEPEND} |
| test? ( |
| dev-cpp/gmock |
| dev-cpp/gtest |
| )" |
| |
| src_configure() { |
| cros-workon_src_configure |
| } |
| |
| src_compile() { |
| tc-export CXX PKG_CONFIG |
| cros-debug-add-NDEBUG |
| clang-setup-env |
| emake image_burner |
| } |
| |
| src_test() { |
| tc-export CXX CC OBJCOPY PKG_CONFIG STRIP |
| emake unittest_runner |
| if ! use x86 && ! use amd64 ; then |
| einfo Skipping unit tests on non-x86 platform |
| else |
| "${S}/unittest_runner" || die "imageburner unittests failed." |
| fi |
| } |
| |
| src_install() { |
| dosbin image_burner |
| |
| insinto /etc/dbus-1/system.d |
| doins ImageBurner.conf |
| |
| insinto /usr/share/dbus-1/system-services |
| doins org.chromium.ImageBurner.service |
| } |