Merge remote-tracking branch 'github/pr/847'.
[gentoo.git] / gnome-extra / evolution-data-server / evolution-data-server-3.18.4.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 GCONF_DEBUG="no"
7 GNOME2_LA_PUNT="yes"
8 PYTHON_COMPAT=( python2_7 python3_{4,5} pypy )
9 VALA_MIN_API_VERSION="0.22"
10 VALA_USE_DEPEND="vapigen"
11
12 inherit db-use flag-o-matic gnome2 python-any-r1 vala virtualx
13
14 DESCRIPTION="Evolution groupware backend"
15 HOMEPAGE="https://wiki.gnome.org/Apps/Evolution"
16
17 # Note: explicitly "|| ( LGPL-2 LGPL-3 )", not "LGPL-2+".
18 LICENSE="|| ( LGPL-2 LGPL-3 ) BSD Sleepycat"
19 SLOT="0/54" # subslot = libcamel-1.2 soname version
20
21 IUSE="api-doc-extras +gnome-online-accounts +gtk +introspection ipv6 ldap kerberos vala +weather"
22 REQUIRED_USE="vala? ( introspection )"
23
24 KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~x86-solaris"
25
26 # sys-libs/db is only required for migrating from <3.13 versions
27 # gdata-0.15.1 is required for google tasks
28 RDEPEND="
29         >=app-crypt/gcr-3.4
30         >=app-crypt/libsecret-0.5[crypt]
31         >=dev-db/sqlite-3.7.17:=
32         >=dev-libs/glib-2.40:2
33         >=dev-libs/libgdata-0.10:=
34         >=dev-libs/libical-0.43:=
35         >=net-libs/libsoup-2.42:2.4
36         >=dev-libs/libxml2-2
37         >=dev-libs/nspr-4.4:=
38         >=dev-libs/nss-3.9:=
39         >=sys-libs/db-4:=
40
41         dev-libs/icu:=
42         sys-libs/zlib:=
43         virtual/libiconv
44
45         gtk? (
46                 >=app-crypt/gcr-3.4[gtk]
47                 >=x11-libs/gtk+-3.10:3
48         )
49         gnome-online-accounts? ( >=net-libs/gnome-online-accounts-3.8 )
50         introspection? ( >=dev-libs/gobject-introspection-0.9.12:= )
51         kerberos? ( virtual/krb5:= )
52         ldap? ( >=net-nds/openldap-2:= )
53         weather? ( >=dev-libs/libgweather-3.10:2= )
54 "
55 DEPEND="${RDEPEND}
56         ${PYTHON_DEPS}
57         dev-util/gdbus-codegen
58         dev-util/gperf
59         >=dev-util/gtk-doc-am-1.14
60         >=dev-util/intltool-0.35.5
61         >=gnome-base/gnome-common-3.5.5
62         >=sys-devel/gettext-0.17
63         virtual/pkgconfig
64         vala? ( $(vala_depend) )
65 "
66
67 # eautoreconf needs:
68 #       >=gnome-base/gnome-common-2
69
70 # Some tests fail due to missings locales.
71 # Also, dbus tests are flacky, bugs #397975 #501834
72 # It looks like a nightmare to disable those for now.
73 RESTRICT="test"
74
75 pkg_setup() {
76         python-any-r1_pkg_setup
77 }
78
79 src_prepare() {
80         use vala && vala_src_prepare
81
82         # Fix relink issues in src_install
83         ELTCONF="--reverse-deps"
84
85         gnome2_src_prepare
86 }
87
88 src_configure() {
89         # /usr/include/db.h is always db-1 on FreeBSD
90         # so include the right dir in CPPFLAGS
91         append-cppflags "-I$(db_includedir)"
92
93         # phonenumber does not exist in tree
94         gnome2_src_configure \
95                 $(use_enable api-doc-extras gtk-doc) \
96                 $(use_with api-doc-extras private-docs) \
97                 $(use_enable gnome-online-accounts goa) \
98                 $(use_enable gtk) \
99                 $(use_enable introspection) \
100                 $(use_enable ipv6) \
101                 $(use_with kerberos krb5 "${EPREFIX}"/usr) \
102                 $(use_with kerberos krb5-libs "${EPREFIX}"/usr/$(get_libdir)) \
103                 $(use_with ldap openldap) \
104                 $(use_enable vala vala-bindings) \
105                 $(use_enable weather) \
106                 --enable-google \
107                 --enable-largefile \
108                 --enable-smime \
109                 --with-libdb="${EPREFIX}"/usr \
110                 --without-phonenumber \
111                 --disable-examples \
112                 --disable-uoa
113 }
114
115 src_install() {
116         gnome2_src_install
117
118         if use ldap; then
119                 insinto /etc/openldap/schema
120                 doins "${FILESDIR}"/calentry.schema
121                 dosym /usr/share/${PN}/evolutionperson.schema /etc/openldap/schema/evolutionperson.schema
122         fi
123 }
124
125 src_test() {
126         unset ORBIT_SOCKETDIR
127         unset SESSION_MANAGER
128         unset DISPLAY
129         Xemake check
130 }