1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 inherit autotools eutils
9 DESCRIPTION="In-place conversion of text typed in with a wrong keyboard layout (Punto Switcher replacement)"
10 HOMEPAGE="http://www.xneur.ru/"
11 SRC_URI="http://dists.xneur.ru/release-${PV}/tgz/${P}.tar.bz2"
15 KEYWORDS="~amd64 ~x86"
16 IUSE="aplay debug gstreamer keylogger libnotify nls openal openmp xosd +spell"
18 COMMON_DEPEND=">=dev-libs/libpcre-5.0
22 gstreamer? ( >=media-libs/gstreamer-0.10.6 )
24 openal? ( >=media-libs/freealut-1.0.1 )
26 aplay? ( >=media-sound/alsa-utils-1.0.17 ) ) )
27 libnotify? ( >=x11-libs/libnotify-0.4.0 )
28 spell? ( app-text/enchant )
29 xosd? ( x11-libs/xosd )"
30 RDEPEND="${COMMON_DEPEND}
31 gstreamer? ( media-libs/gst-plugins-good
32 media-plugins/gst-plugins-alsa )
33 nls? ( virtual/libintl )"
34 DEPEND="${COMMON_DEPEND}
36 openmp? ( sys-devel/gcc[openmp] )
37 nls? ( sys-devel/gettext )"
40 # Fixes error/warning: no newline at end of file
41 find -name '*.c' -exec sed -i -e '${/[^ ]/s:$:\n:}' {} + || die
42 rm -f m4/{lt~obsolete,ltoptions,ltsugar,ltversion,libtool}.m4 \
43 ltmain.sh aclocal.m4 || die
45 sed -i -e "s/-Werror -g0//" configure.in
46 epatch "${FILESDIR}/${P}-libnotify-0.7.patch"
53 if use gstreamer; then
54 elog "Using gstreamer for sound output."
55 myconf="--with-sound=gstreamer"
57 elog "Using openal for sound output."
58 myconf="--with-sound=openal"
60 elog "Using aplay for sound output."
61 myconf="--with-sound=aplay"
63 elog "Sound support disabled."
64 myconf="--with-sound=no"
69 $(use_enable openmp) \
73 $(use_with libnotify) \
78 emake DESTDIR="${D}" install || die
79 dodoc AUTHORS ChangeLog README NEWS TODO || die
83 elog "This is command line tool. If you are looking for GUI frontend just"
84 elog "emerge gxneur, which uses xneur transparently as backend."
86 ewarn "If you upgraded from <=xneur-0.9.3, you need to remove"
87 ewarn "dictionary files in the home directory:"
88 ewarn " $ rm ~/.xneur/{ru,en,be,etc.}/dict"
91 ewarn "Note: if xneur became slow, try to comment out AddBind options in config file."