a56a29bac8e725dca771524d4a246b44471d7b83
[gentoo.git] / mail-client / evolution / evolution-3.24.6.ebuild
1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 GNOME2_LA_PUNT="yes"
6
7 inherit cmake-utils gnome2 flag-o-matic readme.gentoo-r1
8
9 DESCRIPTION="Integrated mail, addressbook and calendaring functionality"
10 HOMEPAGE="https://wiki.gnome.org/Apps/Evolution"
11
12 # Note: explicitly "|| ( LGPL-2 LGPL-3 )", not "LGPL-2+".
13 LICENSE="|| ( LGPL-2 LGPL-3 ) CC-BY-SA-3.0 FDL-1.3+ OPENLDAP"
14 SLOT="2.0"
15
16 IUSE="archive +bogofilter crypt geolocation highlight ldap spamassassin spell ssl +weather ytnef"
17
18 KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~ppc64 ~x86"
19
20 # We need a graphical pinentry frontend to be able to ask for the GPG
21 # password from inside evolution, bug 160302
22 PINENTRY_DEPEND="|| ( app-crypt/pinentry[gnome-keyring] app-crypt/pinentry[gtk] app-crypt/pinentry[qt4] app-crypt/pinentry[qt5] )"
23
24 # glade-3 support is for maintainers only per configure.ac
25 # pst is not mature enough and changes API/ABI frequently
26 # dconf explicitely needed for backup plugin
27 # gnome-desktop support is optional with --enable-gnome-desktop
28 COMMON_DEPEND="
29         >=app-crypt/gcr-3.4:=[gtk]
30         >=app-text/enchant-1.1.7
31         >=dev-libs/glib-2.46:2[dbus]
32         >=dev-libs/libxml2-2.7.3:2
33         >=gnome-base/gnome-desktop-2.91.3:3=
34         >=gnome-base/gsettings-desktop-schemas-2.91.92
35         >=gnome-extra/evolution-data-server-${PV}:=[gtk,weather?]
36         >=media-libs/libcanberra-0.25[gtk3]
37         >=net-libs/libsoup-2.42:2.4
38         >=net-libs/webkit-gtk-2.13.90:4
39         >=x11-libs/cairo-1.9.15:=[glib]
40         >=x11-libs/gdk-pixbuf-2.24:2
41         >=x11-libs/gtk+-3.10:3
42         >=x11-libs/libnotify-0.7:=
43         >=x11-misc/shared-mime-info-0.22
44
45         >=app-text/iso-codes-0.49
46         dev-libs/atk
47         gnome-base/dconf
48         dev-libs/libical:=
49         x11-libs/libSM
50         x11-libs/libICE
51
52         archive? ( >=app-arch/gnome-autoar-0.1.1[gtk] )
53         crypt? (
54                 >=app-crypt/gnupg-1.4
55                 ${PINENTRY_DEPEND}
56                 x11-libs/libcryptui )
57         geolocation? (
58                 >=media-libs/libchamplain-0.12:0.12[gtk]
59                 >=media-libs/clutter-1.0.0:1.0
60                 >=media-libs/clutter-gtk-0.90:1.0
61                 >=sci-geosciences/geocode-glib-3.10.0
62                 x11-libs/mx:1.0 )
63         ldap? ( >=net-nds/openldap-2:= )
64         spell? ( app-text/gtkspell:3 )
65         ssl? (
66                 >=dev-libs/nspr-4.6.1:=
67                 >=dev-libs/nss-3.11:= )
68         weather? ( >=dev-libs/libgweather-3.10:2= )
69         ytnef? ( net-mail/ytnef )
70 "
71 DEPEND="${COMMON_DEPEND}
72         app-text/docbook-xml-dtd:4.1.2
73         app-text/yelp-tools
74         dev-util/gdbus-codegen
75         >=dev-util/gtk-doc-am-1.14
76         >=dev-util/intltool-0.40.0
77         >=sys-devel/gettext-0.18.3
78         virtual/pkgconfig
79 "
80 RDEPEND="${COMMON_DEPEND}
81         bogofilter? ( mail-filter/bogofilter )
82         highlight? ( app-text/highlight )
83         spamassassin? ( mail-filter/spamassassin )
84         !gnome-extra/evolution-exchange
85 "
86
87 DISABLE_AUTOFORMATTING="yes"
88 DOC_CONTENTS="To change the default browser if you are not using GNOME, edit
89 ~/.local/share/applications/mimeapps.list so it includes the
90 following content:
91
92 [Default Applications]
93 x-scheme-handler/http=firefox.desktop
94 x-scheme-handler/https=firefox.desktop
95
96 (replace firefox.desktop with the name of the appropriate .desktop
97 file from /usr/share/applications if you use a different browser)."
98
99 PATCHES=(
100         "${FILESDIR}"/${PV}-DESTDIR-honoring.patch
101         "${FILESDIR}"/${PV}-libical3-compat.patch
102 )
103
104 src_prepare() {
105         # Leave post-install actions to eclass
106         sed -e "s;\(find_program(GTK_UPDATE_ICON_CACHE\).*;\1 $(type -P true));" \
107                 -i "${S}"/cmake/modules/IconCache.cmake || die
108
109         gnome2_src_prepare
110 }
111
112 src_configure() {
113         # Use NSS/NSPR only if 'ssl' is enabled.
114         local mycmakeargs=(
115                 -DENABLE_SCHEMAS_COMPILE=OFF
116                 -DENABLE_GTK_DOC=OFF
117                 -DWITH_OPENLDAP=$(usex ldap)
118                 -DENABLE_SMIME=$(usex ssl)
119                 -DENABLE_GNOME_DESKTOP=ON
120                 -DENABLE_CANBERRA=ON
121                 -DENABLE_AUTOAR=$(usex archive)
122                 -DWITH_HELP=ON
123                 -DENABLE_LIBCRYPTUI=$(usex crypt)
124                 -DENABLE_YTNEF=OFF
125                 -DWITH_BOGOFILTER=$(usex bogofilter)
126                 -DWITH_SPAMASSASSIN=$(usex spamassassin)
127                 -DENABLE_GTKSPELL=$(usex spell)
128                 -DENABLE_TEXT_HIGHLIGHT=$(usex highlight)
129                 -DENABLE_WEATHER=$(usex weather)
130                 -DENABLE_CONTACT_MAPS=$(usex geolocation)
131                 -DENABLE_YTNEF=$(usex ytnef)
132                 -DENABLE_PST_IMPORT=OFF
133                 -DWITH_GLADE_CATALOG=OFF
134         )
135
136         cmake-utils_src_configure
137 }
138
139 src_compile() {
140         cmake-utils_src_compile
141 }
142
143 src_test() {
144         cmake-utils_src_test
145 }
146
147 src_install() {
148         cmake-utils_src_install
149
150         # Problems with prelink:
151         # https://bugzilla.gnome.org/show_bug.cgi?id=731680
152         # https://bugzilla.gnome.org/show_bug.cgi?id=732148
153         # https://bugzilla.redhat.com/show_bug.cgi?id=1114538
154         echo PRELINK_PATH_MASK=/usr/bin/evolution > ${T}/99${PN}
155         doenvd "${T}"/99${PN}
156
157         readme.gentoo_create_doc
158 }
159
160 pkg_postinst() {
161         gnome2_pkg_postinst
162         readme.gentoo_print_elog
163 }