]> Pileus Git - ~andy/sunrise/blob - x11-misc/xneur/xneur-0.9.7.ebuild
x11-misc/xneur: Version bump. Patch substituted with shell magic. Imlib/xpm support...
[~andy/sunrise] / x11-misc / xneur / xneur-0.9.7.ebuild
1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI="2"
6
7 inherit eutils autotools
8
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"
12
13 LICENSE="GPL-2"
14 SLOT="0"
15 KEYWORDS="~amd64 ~x86"
16 IUSE="aplay debug gstreamer libnotify nls openal xosd pcre +spell"
17
18 # Sound does not works here with media-sound/alsa-utils-1.0.16
19 RDEPEND="sys-libs/zlib
20         >=x11-libs/libX11-1.1
21         x11-libs/libXtst
22         gstreamer? ( >=media-libs/gstreamer-0.10.6 )
23         !gstreamer? ( openal? ( >=media-libs/freealut-1.0.1 )
24                                   !openal? ( aplay? ( >=media-sound/alsa-utils-1.0.17 ) ) )
25         pcre? ( >=dev-libs/libpcre-5.0 )
26         spell? ( app-text/aspell )
27         xosd? ( x11-libs/xosd )
28         libnotify? ( >=x11-libs/libnotify-0.4.0 )"
29 DEPEND="${RDEPEND}
30         gstreamer? ( media-libs/gst-plugins-good
31                         media-plugins/gst-plugins-alsa )
32         nls? ( sys-devel/gettext )
33         >=dev-util/pkgconfig-0.20"
34
35 src_prepare() {
36         # Fixes error/warning: no newline at end of file
37         find . -name '*.c' -exec sed '${/[^ ]/s:$:\n:}' -i '{}' \;
38         rm ltmain.sh aclocal.m4 m4/{lt~obsolete,ltoptions,ltsugar,ltversion,libtool}.m4
39         sed -i -e "s/-Werror -g0//" configure.in
40         eautoreconf
41 }
42
43 src_configure() {
44         local myconf
45
46         if use gstreamer; then
47                 elog "Using gstreamer for sound output."
48                 myconf="--with-sound=gstreamer"
49         elif use openal; then
50                 elog "Using openal for sound output."
51                 myconf="--with-sound=openal"
52         elif use aplay; then
53                 elog "Using aplay for sound output."
54                 myconf="--with-sound=aplay"
55         else
56                 elog "Sound support disabled."
57                 myconf="--with-sound=no"
58         fi
59
60         econf ${myconf} \
61                 $(use_with debug) \
62                 $(use_enable nls) \
63                 $(use_with pcre) \
64                 $(use_with spell aspell) \
65                 $(use_with xosd) \
66                 $(use_with libnotify)
67 }
68
69 src_install() {
70         emake install DESTDIR="${D}" || die "emake install failed"
71         dodoc AUTHORS ChangeLog README NEWS TODO || die
72 }
73
74 pkg_postinst() {
75         elog "This is command line tool. If you are looking for GUI frontend just"
76         elog "emerge gxneur, which uses xneur transparently as backend."
77
78         ewarn "If you upgraded from <=xneur-0.9.3, you need to remove"
79         ewarn "dictionary files in the home directory:"
80         ewarn " $ rm ~/.xneur/{ru,en,be,etc.}/dict"
81 }