# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils linux-info DESCRIPTION="Input event scripting utility that has special support for fancy keyboards and mice, USB dials, LIRC and USB remotes, and more." HOMEPAGE="http://gizmod.sourceforge.net" SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2" LICENSE="Apache-2.0" SLOT="0" KEYWORDS="~x86 ~amd64" IUSE="libvisual" RDEPEND=">=dev-util/cmake-2.4 x11-libs/libX11 dev-lang/python media-libs/alsa-lib >=dev-libs/boost-1.34.0 libvisual? ( >=media-libs/libvisual-0.4.0 )" DEPEND="${RDEPEND} x11-proto/xproto" CONFIG_CHECK="INPUT_EVDEV INOTIFY INOTIFY_USER" ERROR_INPUT_EVDEV=" Gizmo Daemon needs input evdev support from the kernel. Please select \"Event interface\" (CONFIG_INPUT_EVDEV) under \"Device Drivers->Input Device Support->Event interface\". This option can be built directly into the kernel or as a module. " ERROR_INOTIFY=" Gizmo Daemon needs inotify support built into the kernel. Please select \"Inotify file change notifification\" (CONFIG_INOTIFY) under \"Device Drivers->File systems\". This option can only be built directly into the kernel. " ERROR_INOTIFY_USER=" Gizmo Daemon needs user space inotify support built into the kernel. Please select \"Inotify file change notifification\" (CONFIG_INOTIFY) followed by \"Inotify support for userspace\" (CONFIG_INOTIFY_USER) under \"Device Drivers->File systems\". These options can only be built directly into the kernel. " src_unpack() { unpack ${A}; cd "${S}" epatch "${FILESDIR}"/${P}-werror.patch epatch "${FILESDIR}"/${P}-libH-Utils.patch epatch "${FILESDIR}"/${P}-alsa_limits.patch epatch "${FILESDIR}"/${P}-exception.patch } src_compile() { if use libvisual ; then BUILD_VIS_PLUGIN="True" else BUILD_VIS_PLUGIN="False" fi cmake \ -DCMAKE_C_COMPILER=$(type -P $(tc-getCC)) \ -DCMAKE_C_FLAGS="${CFLAGS}" \ -DCMAKE_CXX_COMPILER=$(type -P $(tc-getCXX)) \ -DCMAKE_CXX_FLAGS="${CXXFLAGS}" \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=/usr \ -DBUILD_VIS_PLUGIN=${BUILD_VIS_PLUGIN} \ || die "cmake failed" emake || die "emake failed." } src_install() { emake DESTDIR="${D}" install || die "emake install failed." }