blob: 8075d9f2a0cda3bb3a0edb5480e4b7e5ec538dc8 [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=7
CROS_WORKON_COMMIT="0f66f2bb008707c79d5f34f700ccddc75a64aad6"
CROS_WORKON_TREE="f61862266364ee29a7990560bf5e6b7b6e151873"
CROS_WORKON_PROJECT="chromiumos/platform/gestures"
CROS_WORKON_LOCALNAME="platform/gestures"
CROS_WORKON_USE_VCSID=1
inherit toolchain-funcs cros-debug cros-sanitizers cros-workon
DESCRIPTION="Gesture recognizer library"
HOMEPAGE="https://chromium.googlesource.com/chromiumos/platform/gestures/"
SRC_URI=""
LICENSE="BSD-Google"
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() {
cros_optimize_package_for_speed
sanitizers-setup-env
export USE_X11=$(usex X 1 0)
tc-export CXX PKG_CONFIG
cros-debug-add-NDEBUG
default
}
src_compile() {
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
}