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