Gentoo Archives: gentoo-commits

From: Joonas Niilola <juippis@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-mail/mu/, net-mail/mu/files/
Date: Thu, 20 Feb 2020 13:27:36
Message-Id: 1582204948.770e1fccb119fbce8ba6d16021a3598123f212ff.juippis@gentoo
1 commit: 770e1fccb119fbce8ba6d16021a3598123f212ff
2 Author: Matt Smith <matt <AT> offtopica <DOT> uk>
3 AuthorDate: Wed Feb 12 14:13:32 2020 +0000
4 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
5 CommitDate: Thu Feb 20 13:22:28 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=770e1fcc
7
8 net-mail/mu: Use autoload instead of require
9
10 Closes: https://bugs.gentoo.org/709344
11 Signed-off-by: Matt Smith <matt <AT> offtopica.uk>
12 Package-Manager: Portage-2.3.88, Repoman-2.3.20
13 Closes: https://github.com/gentoo/gentoo/pull/14639
14 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
15
16 net-mail/mu/files/70mu-gentoo-autoload.el | 2 +
17 net-mail/mu/mu-1.3.6-r1.ebuild | 99 +++++++++++++++++++++++++++++++
18 2 files changed, 101 insertions(+)
19
20 diff --git a/net-mail/mu/files/70mu-gentoo-autoload.el b/net-mail/mu/files/70mu-gentoo-autoload.el
21 new file mode 100644
22 index 00000000000..d868bf30334
23 --- /dev/null
24 +++ b/net-mail/mu/files/70mu-gentoo-autoload.el
25 @@ -0,0 +1,2 @@
26 +(add-to-list 'load-path "@SITELISP@")
27 +(autoload 'mu4e "mu4e" nil t)
28
29 diff --git a/net-mail/mu/mu-1.3.6-r1.ebuild b/net-mail/mu/mu-1.3.6-r1.ebuild
30 new file mode 100644
31 index 00000000000..44a758d9183
32 --- /dev/null
33 +++ b/net-mail/mu/mu-1.3.6-r1.ebuild
34 @@ -0,0 +1,99 @@
35 +# Copyright 1999-2020 Gentoo Authors
36 +# Distributed under the terms of the GNU General Public License v2
37 +
38 +EAPI=7
39 +
40 +inherit autotools elisp-common
41 +
42 +DESCRIPTION="Set of tools to deal with Maildirs, in particular, searching and indexing"
43 +HOMEPAGE="http://www.djcbsoftware.nl/code/mu/ https://github.com/djcb/mu"
44 +SRC_URI="https://github.com/djcb/mu/archive/${PV}.tar.gz -> ${P}.tar.gz"
45 +
46 +LICENSE="GPL-3+"
47 +SLOT="0"
48 +KEYWORDS="~amd64 ~x86"
49 +IUSE="emacs guile mug"
50 +
51 +DEPEND="
52 + dev-libs/glib:2
53 + dev-libs/gmime:3.0
54 + >=dev-libs/xapian-1.4
55 + emacs? ( >=app-editors/emacs-24.4:* )
56 + guile? ( >=dev-scheme/guile-2.0 )
57 + mug? (
58 + net-libs/webkit-gtk:4
59 + x11-libs/gtk+:3
60 + )"
61 +# net-mail/mailutils also installes /usr/bin/mu. Block it until somebody
62 +# really wants both installed at the same time.
63 +RDEPEND="
64 + ${DEPEND}
65 + !net-mail/mailutils"
66 +BDEPEND="virtual/pkgconfig"
67 +
68 +SITEFILE="70mu-gentoo-autoload.el"
69 +
70 +src_prepare() {
71 + default
72 + eautoreconf
73 +}
74 +
75 +src_configure() {
76 + local myeconfargs=(
77 + $(use_enable emacs mu4e)
78 + $(use_enable mug gtk)
79 + $(use_enable mug webkit)
80 + $(use_enable guile)
81 + )
82 +
83 + econf "${myeconfargs[@]}"
84 +}
85 +
86 +src_install() {
87 + dobin mu/mu
88 + dodoc AUTHORS HACKING NEWS NEWS.org TODO README README.org ChangeLog
89 + if use emacs; then
90 + elisp-install ${PN} mu4e/*.el mu4e/*.elc
91 + elisp-site-file-install "${FILESDIR}/${SITEFILE}"
92 + doinfo mu4e/mu4e.info
93 + fi
94 +
95 + doman man/mu-add.1 man/mu-bookmarks.5 man/mu-cfind.1 man/mu-easy.1 \
96 + man/mu-extract.1 man/mu-find.1 man/mu-help.1 man/mu-index.1 \
97 + man/mu-mkdir.1 man/mu-query.7 man/mu-remove.1 \
98 + man/mu-script.1 man/mu-server.1 man/mu-verify.1 \
99 + man/mu-view.1 man/mu.1
100 +
101 + if use guile; then
102 + doinfo guile/mu-guile.info
103 + fi
104 +
105 + if use mug; then
106 + dobin toys/mug/mug
107 + fi
108 +}
109 +
110 +src_test() {
111 + emake check
112 +}
113 +
114 +pkg_preinst() {
115 + if [[ -n ${REPLACING_VERSIONS} ]]; then
116 + elog "After upgrading from an old major version, you should"
117 + elog "rebuild your mail index."
118 + fi
119 +}
120 +
121 +pkg_postinst() {
122 + if use emacs; then
123 + einfo "To use mu4e you need to configure it in your .emacs file"
124 + einfo "See the manual for more information:"
125 + einfo "http://www.djcbsoftware.nl/code/mu/mu4e/"
126 + fi
127 +
128 + use emacs && elisp-site-regen
129 +}
130 +
131 +pkg_postrm() {
132 + use emacs && elisp-site-regen
133 +}