Use https by default
[gentoo.git] / gnome-extra / zeitgeist / zeitgeist-0.9.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 AUTOTOOLS_AUTORECONF=true
8 PYTHON_COMPAT=( python2_7 )
9 VALA_MIN_API_VERSION=0.22
10
11 inherit autotools-utils bash-completion-r1 eutils python-r1 vala versionator
12
13 DIR_PV=$(get_version_component_range 1-2)
14
15 DESCRIPTION="Service to log activities and present to other apps"
16 HOMEPAGE="http://launchpad.net/zeitgeist/"
17 SRC_URI="http://launchpad.net/zeitgeist/${DIR_PV}/${PV}/+download/${P}.tar.xz
18         https://dev.gentoo.org/~eva/distfiles/${PN}/${P}.tar.xz"
19
20 LICENSE="LGPL-2+ LGPL-3+ GPL-2+"
21 SLOT="0"
22 KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86"
23 IUSE="+datahub downloads-monitor extensions +fts icu introspection nls plugins sql-debug telepathy"
24
25 REQUIRED_USE="
26         ${PYTHON_REQUIRED_USE}
27         downloads-monitor? ( datahub )"
28
29 RDEPEND="
30         ${PYTHON_DEPS}
31         !gnome-extra/zeitgeist-datahub
32         dev-libs/json-glib
33         dev-python/dbus-python[${PYTHON_USEDEP}]
34         dev-python/pygobject:2[${PYTHON_USEDEP}]
35         dev-python/pyxdg[${PYTHON_USEDEP}]
36         dev-python/rdflib[${PYTHON_USEDEP}]
37         media-libs/raptor:2
38         >=dev-libs/glib-2.35.4:2
39         >=dev-db/sqlite-3.7.11:3
40         sys-apps/dbus
41         datahub? ( x11-libs/gtk+:3 )
42         extensions? ( gnome-extra/zeitgeist-extensions  )
43         fts? ( dev-libs/xapian[inmemory] )
44         icu? ( dev-libs/dee[icu?,${PYTHON_USEDEP}] )
45         introspection? ( dev-libs/gobject-introspection )
46         plugins? ( gnome-extra/zeitgeist-datasources )
47         telepathy? ( net-libs/telepathy-glib )
48 "
49 DEPEND="${RDEPEND}
50         $(vala_depend)
51         >=dev-util/intltool-0.35
52         virtual/pkgconfig
53 "
54
55 src_prepare() {
56         # pure-python module is better managed manually, see src_install
57         sed -e 's:python::g' \
58                 -i Makefile.am || die
59
60         # Fix direct invocation of python in configure
61         epatch "${FILESDIR}"/${PN}-0.9.15-python-detection.patch
62
63         autotools-utils_src_prepare
64         vala_src_prepare
65 }
66
67 src_configure() {
68         local myeconfargs=(
69                 --docdir="${EPREFIX}/usr/share/doc/${PF}"
70                 --with-session-bus-services-dir="${EPREFIX}/usr/share/dbus-1/services"
71                 $(use_enable sql-debug explain-queries)
72                 $(use_enable datahub)
73                 $(use_enable downloads-monitor)
74                 $(use_enable telepathy)
75                 $(use_enable introspection)
76                 $(use_with icu dee-icu)
77         )
78
79         use nls || myeconfargs+=( --disable-nls )
80         use fts && myeconfargs+=( --enable-fts )
81
82         python_setup
83         autotools-utils_src_configure
84 }
85
86 src_test() {
87         autotools-utils_src_test TESTS_ENVIRONMENT="dbus-run-session"
88 }
89
90 src_install() {
91         dobashcomp data/completions/zeitgeist-daemon
92         autotools-utils_src_install
93         cd python || die
94         python_moduleinto ${PN}
95         python_foreach_impl python_domodule *py
96
97         # Redundant NEWS/AUTHOR installation
98         rm -r "${D}"/usr/share/zeitgeist/doc/ || die
99 }