mail-client/evolution: fix automagic net-mail/ytnef dependency
[gentoo.git] / mail-client / evolution / evolution-3.24.5.ebuild
1 # Copyright 1999-2017 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"
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 "
70 DEPEND="${COMMON_DEPEND}
71         app-text/docbook-xml-dtd:4.1.2
72         app-text/yelp-tools
73         dev-util/gdbus-codegen
74         >=dev-util/gtk-doc-am-1.14
75         >=dev-util/intltool-0.40.0
76         >=sys-devel/gettext-0.18.3
77         virtual/pkgconfig
78 "
79 RDEPEND="${COMMON_DEPEND}
80         bogofilter? ( mail-filter/bogofilter )
81         highlight? ( app-text/highlight )
82         spamassassin? ( mail-filter/spamassassin )
83         !gnome-extra/evolution-exchange
84 "
85
86 DISABLE_AUTOFORMATTING="yes"
87 DOC_CONTENTS="To change the default browser if you are not using GNOME, edit
88 ~/.local/share/applications/mimeapps.list so it includes the
89 following content:
90
91 [Default Applications]
92 x-scheme-handler/http=firefox.desktop
93 x-scheme-handler/https=firefox.desktop
94
95 (replace firefox.desktop with the name of the appropriate .desktop
96 file from /usr/share/applications if you use a different browser)."
97
98 src_prepare() {
99         # Leave post-install actions to eclass
100         sed -e "s;\(find_program(GTK_UPDATE_ICON_CACHE\).*;\1 $(type -P true));" \
101                 -i "${S}"/cmake/modules/IconCache.cmake || die
102
103         gnome2_src_prepare
104 }
105
106 src_configure() {
107         # Use NSS/NSPR only if 'ssl' is enabled.
108         local mycmakeargs=(
109                 -DENABLE_SCHEMAS_COMPILE=OFF
110                 -DENABLE_GTK_DOC=OFF
111                 -DWITH_OPENLDAP=$(usex ldap)
112                 -DENABLE_SMIME=$(usex ssl)
113                 -DENABLE_GNOME_DESKTOP=ON
114                 -DENABLE_CANBERRA=ON
115                 -DENABLE_AUTOAR=$(usex archive)
116                 -DWITH_HELP=ON
117                 -DENABLE_LIBCRYPTUI=$(usex crypt)
118                 -DENABLE_YTNEF=OFF
119                 -DWITH_BOGOFILTER=$(usex bogofilter)
120                 -DWITH_SPAMASSASSIN=$(usex spamassassin)
121                 -DENABLE_GTKSPELL=$(usex spell)
122                 -DENABLE_TEXT_HIGHLIGHT=$(usex highlight)
123                 -DENABLE_WEATHER=$(usex weather)
124                 -DENABLE_CONTACT_MAPS=$(usex geolocation)
125                 -DENABLE_PST_IMPORT=OFF
126                 -DWITH_GLADE_CATALOG=OFF
127         )
128
129         cmake-utils_src_configure
130 }
131
132 src_compile() {
133         cmake-utils_src_compile
134 }
135
136 src_test() {
137         cmake-utils_src_test
138 }
139
140 src_install() {
141         cmake-utils_src_install
142
143         # Problems with prelink:
144         # https://bugzilla.gnome.org/show_bug.cgi?id=731680
145         # https://bugzilla.gnome.org/show_bug.cgi?id=732148
146         # https://bugzilla.redhat.com/show_bug.cgi?id=1114538
147         echo PRELINK_PATH_MASK=/usr/bin/evolution > ${T}/99${PN}
148         doenvd "${T}"/99${PN}
149
150         readme.gentoo_create_doc
151 }
152
153 pkg_postinst() {
154         gnome2_pkg_postinst
155         readme.gentoo_print_elog
156 }