blob: 655ea36d5f63c54c7542dda8400118becbf59986 [file] [log] [blame]
# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
# Distributed under the terms of the GNU General Public License v2
EAPI="4"
CROS_WORKON_COMMIT="50a0d232ae092f34a9be34aff0f3336c4f893aee"
CROS_WORKON_TREE="822337aaa546487bc91d40f0b02ac66327ef734b"
CROS_WORKON_PROJECT="chromiumos/platform/gestures"
CROS_WORKON_USE_VCSID=1
inherit toolchain-funcs multilib cros-debug cros-workon
DESCRIPTION="Gesture recognizer library"
HOMEPAGE="http://www.chromium.org/"
SRC_URI=""
LICENSE="BSD"
SLOT="0"
KEYWORDS="*"
IUSE="-asan +X"
RDEPEND="chromeos-base/gestures-conf
chromeos-base/libevdev
dev-libs/jsoncpp
virtual/udev"
DEPEND="dev-cpp/gtest
X? ( x11-libs/libXi )
${RDEPEND}"
# The last dir must be named "gestures" for include path reasons.
S="${WORKDIR}/gestures"
src_configure() {
asan-setup-env
cros-workon_src_configure
export USE_X11=$(usex X 1 0)
}
src_compile() {
tc-export CXX
cros-debug-add-NDEBUG
emake clean # TODO(adlr): remove when a better solution exists
emake
}
src_test() {
emake test
if ! use x86 && ! use amd64 ; then
einfo "Skipping tests on non-x86 platform..."
else
# This is an ugly hack that happens to work, but should not be copied.
LD_LIBRARY_PATH="${SYSROOT}/usr/$(get_libdir)" \
./test || die
fi
}
src_install() {
emake DESTDIR="${D}" LIBDIR="/usr/$(get_libdir)" install
}