]> Pileus Git - ~andy/sunrise/blob - app-misc/gizmod/gizmod-3.5.ebuild
games-board/qbriscola: Fix qt deps, EAPI bump, add ~amd64 keyword
[~andy/sunrise] / app-misc / gizmod / gizmod-3.5.ebuild
1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI="2"
6
7 inherit cmake-utils linux-info
8
9 DESCRIPTION="Input event scripting utility that has special support for fancy keyboards, mice, USB dials and more"
10 HOMEPAGE="http://gizmod.sourceforge.net"
11 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
12 LICENSE="Apache-2.0"
13 SLOT="0"
14 KEYWORDS="~amd64 ~x86"
15 IUSE="libvisual"
16 RDEPEND="x11-libs/libXext
17         amd64? ( >=dev-libs/boost-1.36[python] )
18         || ( dev-libs/boost:0 dev-libs/boost[python] )
19         x11-libs/libICE
20         media-libs/alsa-lib
21         libvisual? ( media-libs/libvisual )"
22 DEPEND="${RDEPEND}"
23
24 CONFIG_CHECK="INPUT_EVDEV INOTIFY INOTIFY_USER"
25
26 ERROR_INPUT_EVDEV="
27 Gizmo Daemon needs input evdev support from the kernel.
28 Please select \"Event interface\" (CONFIG_INPUT_EVDEV) under
29 \"Device Drivers->Input Device Support->Event interface\".
30 This option can be built directly into the kernel or as
31 a module.
32 "
33
34 ERROR_INOTIFY="
35 Gizmo Daemon needs inotify support built into the kernel.
36 Please select \"Inotify file change notifification\"
37 (CONFIG_INOTIFY) under \"Device Drivers->File systems\". This
38 option can only be built directly into the kernel.
39 "
40
41 ERROR_INOTIFY_USER="
42 Gizmo Daemon needs userspace inotify support built into the kernel.
43 Please select \"Inotify file change notifification\"
44 (CONFIG_INOTIFY) followed by \"Inotify support for userspace\"
45 (CONFIG_INOTIFY_USER) under \"Device Drivers->File systems\". These
46 options can only be built directly into the kernel.
47 "
48
49 src_prepare() {
50         # patch gizmod to properly obey libvisual use flag
51         epatch "${FILESDIR}"/${P}-libvisual.patch
52         # patch for gcc-4.4*
53         epatch "${FILESDIR}"/${P}-gcc44.patch
54         ## straighten up the paths
55         sed -i CMakeLists.txt -e /DefineInstallationPaths/d || die "sed: removal of DefineInstallationPaths failed"
56         sed -i libGizmod/CMakeLists.txt -e 's:lib$:lib${LIB_SUFFIX}:' || die "sed: replacing lib with LIB_INSTALL_DIR failed"
57 }
58
59 src_configure() {
60         local mycmakeargs="
61                 -DSYSCONF_INSTALL_DIR=/etc
62                 $(cmake-utils_use_build libvisual VIS_PLUGIN)
63         "
64         cmake-utils_src_configure
65 }
66
67 src_install() {
68         cmake-utils_src_install
69         newinitd "${FILESDIR}/gizmod.rc" gizmod || die "init script install failed"
70 }