Use https by default
[gentoo.git] / net-im / gajim / gajim-0.16.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.1[${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         xhtml? ( dev-python/docutils[${PYTHON_USEDEP}] )"
75
76 RESTRICT="test"
77
78 S="${WORKDIR}"/${MY_P}
79
80 PATCHES=( "${FILESDIR}"/${P}-desktop.patch )
81
82 src_prepare() {
83         autotools-utils_src_prepare
84         python_copy_sources
85 }
86
87 src_configure() {
88         configuration() {
89                 local myeconfargs=(
90                         $(use_enable nls)
91                         $(use_with X x)
92                         --docdir="/usr/share/doc/${PF}"
93                         --libdir="$(python_get_sitedir)"
94                         --enable-site-packages
95                 )
96                 run_in_build_dir autotools-utils_src_configure
97         }
98         python_foreach_impl configuration
99 }
100
101 src_compile() {
102         compilation() {
103                 run_in_build_dir autotools-utils_src_compile
104         }
105         python_foreach_impl compilation
106 }
107
108 src_test() {
109         testing() {
110                 run_in_build_dir ${PYTHON} test/runtests.py --verbose 3 || die
111         }
112         python_foreach_impl testing
113 }
114
115 src_install() {
116         installation() {
117                 run_in_build_dir autotools-utils_src_install
118                 python_optimize
119         }
120         python_foreach_impl installation
121
122         rm "${ED}/usr/share/doc/${PF}/README.html" || die
123         dohtml README.html
124 }