sys-process/glances: 3.1.4.1-r1 amd64 stable, bug #720368
[gentoo.git] / net-mail / mu / mu-1.4.4.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 inherit autotools elisp-common
7
8 DESCRIPTION="Set of tools to deal with Maildirs, in particular, searching and indexing"
9 HOMEPAGE="https://www.djcbsoftware.nl/code/mu/ https://github.com/djcb/mu"
10 SRC_URI="https://github.com/djcb/mu/archive/${PV}.tar.gz -> ${P}.tar.gz"
11
12 LICENSE="GPL-3+"
13 SLOT="0"
14 KEYWORDS="~amd64 ~x86"
15 IUSE="emacs guile mug"
16
17 DEPEND="
18         dev-libs/glib:2
19         dev-libs/gmime:3.0
20         >=dev-libs/xapian-1.4
21         emacs? ( >=app-editors/emacs-24.4:* )
22         guile? ( >=dev-scheme/guile-2.2 )
23         mug? (
24                 net-libs/webkit-gtk:4
25                 x11-libs/gtk+:3
26         )"
27 RDEPEND="${DEPEND}"
28 BDEPEND="virtual/pkgconfig"
29
30 SITEFILE="70mu-gentoo-autoload.el"
31
32 src_prepare() {
33         default
34         eautoreconf
35 }
36
37 src_configure() {
38         local myeconfargs=(
39                 $(use_enable emacs mu4e)
40                 $(use_enable mug gtk)
41                 $(use_enable mug webkit)
42                 $(use_enable guile)
43         )
44
45         econf "${myeconfargs[@]}"
46 }
47
48 src_install() {
49         dobin mu/mu
50         dodoc AUTHORS HACKING NEWS NEWS.org TODO README ChangeLog
51         if use emacs; then
52                 elisp-install ${PN} mu4e/*.el mu4e/*.elc
53                 elisp-site-file-install "${FILESDIR}/${SITEFILE}"
54                 doinfo mu4e/mu4e.info
55         fi
56
57         doman man/mu-*.*
58
59         if use guile; then
60                   doinfo guile/mu-guile.info
61         fi
62
63         if use mug; then
64                   dobin toys/mug/mug
65         fi
66 }
67
68 src_test() {
69         emake check
70 }
71
72 pkg_preinst() {
73         if [[ -n ${REPLACING_VERSIONS} ]]; then
74                 elog "After upgrading from an old major version, you should"
75                 elog "rebuild your mail index."
76         fi
77 }
78
79 pkg_postinst() {
80         if use emacs; then
81                 einfo "To use mu4e you need to configure it in your .emacs file"
82                 einfo "See the manual for more information:"
83                 einfo "https://www.djcbsoftware.nl/code/mu/mu4e/"
84         fi
85
86         use emacs && elisp-site-regen
87 }
88
89 pkg_postrm() {
90         use emacs && elisp-site-regen
91 }