]> Pileus Git - ~andy/sunrise/blob - x11-misc/xneur/xneur-0.9.3.ebuild
x11-misc/xneur: New Ebuild for bug 169494. Too many users want xneur but it still...
[~andy/sunrise] / x11-misc / xneur / xneur-0.9.3.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 if [[ "${PV}" =~ (_p)([0-9]+) ]] ; then
12         inherit subversion
13         SRC_URI=""
14         MTSLPT_REV=${BASH_REMATCH[2]}
15         ESVN_REPO_URI="svn://xneur.ru:3690/xneur/${PN}/@${MTSLPT_REV}"
16 else
17         SRC_URI="http://dists.xneur.ru/release-${PV}/tgz/${P}.tar.bz2"
18 fi
19
20 LICENSE="GPL-2"
21 SLOT="0"
22 KEYWORDS="~amd64 ~x86"
23 IUSE="aplay debug +gstreamer +imlib nls openal xosd +pcre spell xpm"
24
25 # Sound does not works here with media-sound/alsa-utils-1.0.16
26 RDEPEND=">=x11-libs/libX11-1.1
27         x11-libs/libXtst
28         imlib? ( media-libs/imlib2 )
29         !imlib? ( xpm? ( x11-libs/libXpm ) )
30         gstreamer? ( >=media-libs/gstreamer-0.10.6 )
31         !gstreamer? ( openal? ( >=media-libs/freealut-1.0.1 )
32                                   !openal? ( aplay? ( >=media-sound/alsa-utils-1.0.17 ) ) )
33         pcre? ( >=dev-libs/libpcre-5.0 )
34         spell? ( app-text/aspell )
35         xosd? ( x11-libs/xosd )"
36 DEPEND="${RDEPEND}
37         gstreamer? ( media-libs/gst-plugins-good
38                         media-plugins/gst-plugins-alsa )
39         nls? ( sys-devel/gettext )
40         >=dev-util/pkgconfig-0.20"
41
42 src_unpack() {
43         if [[ ${SRC_URI} == "" ]]; then
44                 subversion_src_unpack
45         else
46                 unpack ${A}
47         fi
48 }
49
50 src_prepare() {
51         rm ltmain.sh aclocal.m4 m4/{lt~obsolete,ltoptions,ltsugar,ltversion,libtool}.m4
52         epatch "${FILESDIR}/${P}-CFLAGS.patch"
53         epatch "${FILESDIR}/${P}-build-failure.patch"
54         sed -i -e "s/-Werror -g0//" configure.in
55         eautoreconf
56 }
57
58 src_configure() {
59         local myconf
60
61         if use gstreamer; then
62                 elog "Using gstreamer for sound output."
63                 myconf="--with-sound=gstreamer"
64         elif use openal; then
65                 elog "Using openal for sound output."
66                 myconf="--with-sound=openal"
67         elif use aplay; then
68                 elog "Using aplay for sound output."
69                 myconf="--with-sound=aplay"
70         else
71                 myconf="--with-sound=no"
72         fi
73
74         if use imlib2; then
75                 myconf="${myconf} --with-image=imlib2"
76         elif use xpm; then
77                 myconf="${myconf} --with-image=xpm"
78         else
79                 myconf="${myconf} --with-image=no"
80         fi
81
82         econf ${myconf} \
83                 $(use_with debug) \
84                 $(use_enable nls) \
85                 $(use_with pcre) \
86                 $(use_with spell aspell) \
87                 $(use_with xosd)
88 }
89
90 src_install() {
91         emake install DESTDIR="${D}" || die "emake install failed"
92         dodoc AUTHORS ChangeLog README NEWS TODO || die
93 }
94
95 pkg_postinst() {
96         elog "This is command line tool. If you are looking for GUI frontend just"
97         elog "emerge gxneur, which uses xneur transparently as backend."
98 }