OLD | NEW |
1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
2 # Distributed under the terms of the GNU General Public License v2 | 2 # Distributed under the terms of the GNU General Public License v2 |
3 | 3 |
4 EAPI=2 | 4 EAPI=2 |
5 | 5 |
6 inherit toolchain-funcs | 6 inherit flag-o-matic toolchain-funcs |
7 | 7 |
8 DESCRIPTION="Chrome OS Metrics Collection Utilities" | 8 DESCRIPTION="Chrome OS Metrics Collection Utilities" |
9 HOMEPAGE="http://src.chromium.org" | 9 HOMEPAGE="http://src.chromium.org" |
10 SRC_URI="" | 10 SRC_URI="" |
11 LICENSE="BSD" | 11 LICENSE="BSD" |
12 SLOT="0" | 12 SLOT="0" |
13 KEYWORDS="amd64 x86 arm" | 13 KEYWORDS="amd64 x86 arm" |
14 IUSE="" | 14 IUSE="debug" |
15 | 15 |
16 # TODO(petkov): Remove dependences on metrics_collection and metrics_daemon | 16 # TODO(petkov): Remove dependences on metrics_collection and metrics_daemon |
17 # and the empty ebuilds once the build dust settles. | 17 # and the empty ebuilds once the build dust settles. |
18 RDEPEND="chromeos-base/chromeos-metrics_collection | 18 RDEPEND="chromeos-base/chromeos-metrics_collection |
19 chromeos-base/chromeos-metrics_daemon | 19 chromeos-base/chromeos-metrics_daemon |
20 chromeos-base/libchrome | 20 chromeos-base/libchrome |
| 21 dev-cpp/gflags |
21 >=dev-libs/glib-2.0 | 22 >=dev-libs/glib-2.0 |
22 dev-libs/dbus-glib | 23 dev-libs/dbus-glib |
23 » sys-apps/dbus" | 24 » sys-apps/dbus |
| 25 » " |
24 | 26 |
25 DEPEND="dev-cpp/gflags | 27 DEPEND="${RDEPEND} |
| 28 » dev-cpp/gmock |
26 dev-cpp/gtest | 29 dev-cpp/gtest |
27 » ${RDEPEND}" | 30 » " |
28 | 31 |
29 src_unpack() { | 32 src_unpack() { |
30 local metrics="${CHROMEOS_ROOT}/src/platform/metrics" | 33 local metrics="${CHROMEOS_ROOT}/src/platform/metrics" |
31 elog "Using metrics sources: $metrics" | 34 elog "Using metrics sources: $metrics" |
32 cp -ar "${metrics}" "${S}" || die | 35 cp -ar "${metrics}" "${S}" || die |
33 } | 36 } |
34 | 37 |
35 src_compile() { | 38 src_compile() { |
| 39 use debug || append-flags -DNDEBUG |
36 tc-export CXX AR PKG_CONFIG | 40 tc-export CXX AR PKG_CONFIG |
37 emake || die "metrics compile failed." | 41 emake || die "metrics compile failed." |
38 } | 42 } |
39 | 43 |
40 src_test() { | 44 src_test() { |
41 tc-export CXX AR PKG_CONFIG | 45 tc-export CXX AR PKG_CONFIG |
42 emake tests || die "could not build tests" | 46 emake tests || die "could not build tests" |
43 if ! use x86; then | 47 if ! use x86; then |
44 echo Skipping unit tests on non-x86 platform | 48 echo Skipping unit tests on non-x86 platform |
45 else | 49 else |
46 for test in ./*_test; do | 50 for test in ./*_test; do |
47 "${test}" ${GTEST_ARGS} || die "${test} failed" | 51 "${test}" ${GTEST_ARGS} || die "${test} failed" |
48 done | 52 done |
49 fi | 53 fi |
50 } | 54 } |
51 | 55 |
52 src_install() { | 56 src_install() { |
53 dodir /usr/bin | 57 dodir /usr/bin |
54 dodir /usr/include | 58 dodir /usr/include |
55 dodir /usr/lib | 59 dodir /usr/lib |
56 dodir /usr/sbin | 60 dodir /usr/sbin |
57 emake DESTDIR="${D}" install || die "metrics install failed." | 61 emake DESTDIR="${D}" install || die "metrics install failed." |
58 chmod 0555 "${D}/usr/sbin/omaha_tracker.sh" | 62 chmod 0555 "${D}/usr/sbin/omaha_tracker.sh" |
59 } | 63 } |
OLD | NEW |