net-im/gajim: 0.16.5 stable on x86 as per bug 569936
[gentoo.git] / net-im / gajim / gajim-0.16.5.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6
7 PYTHON_COMPAT=( python2_7 )
8 PYTHON_REQ_USE="sqlite,xml"
9
10 AUTOTOOLS_AUTORECONF=true
11
12 inherit autotools-utils python-r1 versionator
13
14 MY_PV=${PV/_/-}
15 MY_P="${PN}-${MY_PV}"
16
17 DESCRIPTION="Jabber client written in PyGTK"
18 HOMEPAGE="http://www.gajim.org/"
19 SRC_URI="
20         http://www.gajim.org/downloads/$(get_version_component_range 1-2)/${MY_P}.tar.bz2"
21 #       test? ( https://dev.gentoo.org/~jlec/distfiles/${PN}-tests-${PV}.tar.xz )"
22
23 LICENSE="GPL-3"
24 SLOT="0"
25 KEYWORDS="amd64 arm ppc ppc64 x86 ~x86-fbsd"
26 IUSE="avahi crypt dbus gnome gnome-keyring kde idle jingle libnotify networkmanager nls spell +srv test X xhtml"
27
28 REQUIRED_USE="
29         ${PYTHON_REQUIRED_USE}
30         libnotify? ( dbus )
31         avahi? ( dbus )
32         gnome? ( gnome-keyring )"
33
34 COMMON_DEPEND="
35         ${PYTHON_DEPS}
36         dev-python/pygtk:2[${PYTHON_USEDEP}]
37         x11-libs/gtk+:2"
38 DEPEND="${COMMON_DEPEND}
39         >=dev-util/intltool-0.40.1
40         virtual/pkgconfig
41         >=sys-devel/gettext-0.17-r1"
42 RDEPEND="${COMMON_DEPEND}
43         dev-python/pyasn1[${PYTHON_USEDEP}]
44         >=dev-python/pyopenssl-0.14[${PYTHON_USEDEP}]
45         >=dev-python/python-nbxmpp-0.5.3[${PYTHON_USEDEP}]
46         crypt? (
47                 app-crypt/gnupg
48                 dev-python/pycrypto[${PYTHON_USEDEP}]
49                 )
50         dbus? (
51                 dev-python/dbus-python[${PYTHON_USEDEP}]
52                 dev-libs/dbus-glib
53                 libnotify? ( dev-python/notify-python[${PYTHON_USEDEP}] )
54                 avahi? ( net-dns/avahi[dbus,gtk,python,${PYTHON_USEDEP}] )
55                 )
56         gnome? (
57                 dev-python/libgnome-python[${PYTHON_USEDEP}]
58                 dev-python/egg-python[${PYTHON_USEDEP}]
59                 )
60         gnome-keyring? ( dev-python/gnome-keyring-python[${PYTHON_USEDEP}] )
61         idle? ( x11-libs/libXScrnSaver )
62         jingle? ( net-libs/farstream:0.1[python,${PYTHON_USEDEP}] )
63         kde? ( kde-apps/kwalletmanager )
64         networkmanager? (
65                         dev-python/dbus-python[${PYTHON_USEDEP}]
66                         net-misc/networkmanager
67                 )
68         spell? ( app-text/gtkspell:2 )
69         srv? (
70                 || (
71                         dev-python/libasyncns-python[${PYTHON_USEDEP}]
72                         net-dns/bind-tools
73                         )
74                 )
75         xhtml? ( dev-python/docutils[${PYTHON_USEDEP}] )"
76
77 RESTRICT="test"
78
79 S="${WORKDIR}"/${MY_P}
80
81 PATCHES=(
82         "${FILESDIR}"/${P}-desktop.patch
83         )
84
85 src_prepare() {
86         autotools-utils_src_prepare
87         python_copy_sources
88 }
89
90 src_configure() {
91         configuration() {
92                 local myeconfargs=(
93                         $(use_enable nls)
94                         $(use_with X x)
95                         --docdir="/usr/share/doc/${PF}"
96                         --libdir="$(python_get_sitedir)"
97                         --enable-site-packages
98                 )
99                 run_in_build_dir autotools-utils_src_configure
100         }
101         python_foreach_impl configuration
102 }
103
104 src_compile() {
105         compilation() {
106                 run_in_build_dir autotools-utils_src_compile
107         }
108         python_foreach_impl compilation
109 }
110
111 src_test() {
112         testing() {
113                 run_in_build_dir ${PYTHON} test/runtests.py --verbose 3 || die
114         }
115         python_foreach_impl testing
116 }
117
118 src_install() {
119         installation() {
120                 run_in_build_dir autotools-utils_src_install
121                 python_optimize
122         }
123         python_foreach_impl installation
124
125         rm "${ED}/usr/share/doc/${PF}/README.html" || die
126         dohtml README.html
127 }