Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-mail/notmuch/
Date: Wed, 30 Sep 2020 02:14:42
Message-Id: 1601431812.2fecb2f18a2d2fb688fafb288972326f320d6813.sam@gentoo
1 commit: 2fecb2f18a2d2fb688fafb288972326f320d6813
2 Author: Ralph Seichter <github <AT> seichter <DOT> de>
3 AuthorDate: Mon Sep 14 00:04:11 2020 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Wed Sep 30 02:10:12 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2fecb2f1
7
8 net-mail/notmuch: Unconditionally install man-pages
9
10 Installation of man-pages no longer depends on the "doc" use flag.
11
12 Package-Manager: Portage-3.0.4, Repoman-3.0.1
13 Signed-off-by: Ralph Seichter <gentoo <AT> seichter.de>
14 Closes: https://github.com/gentoo/gentoo/pull/17533
15 Signed-off-by: Sam James <sam <AT> gentoo.org>
16
17 net-mail/notmuch/notmuch-0.31-r1.ebuild | 213 ++++++++++++++++++++++++++++++++
18 1 file changed, 213 insertions(+)
19
20 diff --git a/net-mail/notmuch/notmuch-0.31-r1.ebuild b/net-mail/notmuch/notmuch-0.31-r1.ebuild
21 new file mode 100644
22 index 00000000000..bd42a123206
23 --- /dev/null
24 +++ b/net-mail/notmuch/notmuch-0.31-r1.ebuild
25 @@ -0,0 +1,213 @@
26 +# Copyright 1999-2020 Gentoo Authors
27 +# Distributed under the terms of the GNU General Public License v2
28 +
29 +EAPI=7
30 +
31 +DISTUTILS_OPTIONAL=1
32 +NEED_EMACS="24.1"
33 +PYTHON_COMPAT=( python3_{6,7,8} )
34 +
35 +inherit bash-completion-r1 distutils-r1 elisp-common eutils flag-o-matic \
36 + pax-utils toolchain-funcs
37 +
38 +DESCRIPTION="Thread-based e-mail indexer, supporting quick search and tagging"
39 +HOMEPAGE="https://notmuchmail.org/"
40 +SRC_URI="https://notmuchmail.org/releases/${P}.tar.xz
41 + test? ( https://notmuchmail.org/releases/test-databases/database-v1.tar.xz )"
42 +
43 +LICENSE="GPL-3"
44 +# Sub-slot corresponds to major wersion of libnotmuch.so.X.Y. Bump of Y is
45 +# meant to be binary backward compatible.
46 +SLOT="0/5"
47 +KEYWORDS="~alpha ~amd64 ~arm64 ~ppc64 ~x86"
48 +REQUIRED_USE="
49 + nmbug? ( python )
50 + python? ( ${PYTHON_REQUIRED_USE} )
51 + test? ( crypt emacs python valgrind )
52 +"
53 +IUSE="crypt doc emacs mutt nmbug python test valgrind"
54 +RESTRICT="!test? ( test )"
55 +
56 +BDEPEND="
57 + virtual/pkgconfig
58 + doc? (
59 + app-doc/doxygen
60 + dev-python/mock[${PYTHON_USEDEP}]
61 + dev-python/sphinx
62 + sys-apps/texinfo
63 + )
64 +"
65 +COMMON_DEPEND="
66 + dev-libs/glib
67 + dev-libs/gmime:3.0[crypt]
68 + dev-libs/xapian:=
69 + sys-libs/talloc
70 + sys-libs/zlib
71 + emacs? ( >=app-editors/emacs-${NEED_EMACS}:* )
72 + python? (
73 + ${PYTHON_DEPS}
74 + dev-python/cffi
75 + )
76 +"
77 +DEPEND="${COMMON_DEPEND}
78 + test? (
79 + >=app-editors/emacs-${NEED_EMACS}:*[libxml2]
80 + app-misc/dtach
81 + sys-devel/gdb
82 + crypt? (
83 + app-crypt/gnupg
84 + dev-libs/openssl
85 + )
86 + )
87 + valgrind? ( dev-util/valgrind )
88 +"
89 +RDEPEND="${COMMON_DEPEND}
90 + crypt? ( app-crypt/gnupg )
91 + mutt? (
92 + dev-perl/File-Which
93 + dev-perl/Mail-Box
94 + dev-perl/MailTools
95 + dev-perl/String-ShellQuote
96 + dev-perl/Term-ReadLine-Gnu
97 + virtual/perl-Digest-SHA
98 + virtual/perl-File-Path
99 + virtual/perl-Getopt-Long
100 + virtual/perl-Pod-Parser
101 + )
102 + nmbug? ( dev-vcs/git )
103 +"
104 +
105 +DOCS=( AUTHORS NEWS README )
106 +SITEFILE="50${PN}-gentoo.el"
107 +
108 +bindings() {
109 + local rc=0
110 + if use python; then
111 + # CFFI based bindings (recommended)
112 + pushd bindings/python-cffi || die
113 + ${@}
114 + rc=${?}
115 + popd || die
116 +
117 + # Old deprecated bindings, #736204. These are known to cause
118 + # memory loss and other issues. Avoid if at all possible.
119 + pushd bindings/python || die
120 + ${@}
121 + rc=${?}
122 + popd || die
123 + fi
124 + return ${rc}
125 +}
126 +
127 +pkg_setup() {
128 + use emacs && elisp-check-emacs-version
129 +}
130 +
131 +src_unpack() {
132 + unpack "${P}".tar.xz
133 + if use test; then
134 + mkdir -p "${S}"/test/test-databases || die
135 + cp "${DISTDIR}"/database-v1.tar.xz "${S}"/test/test-databases/ || die
136 + fi
137 +}
138 +
139 +src_prepare() {
140 + local _deps=""
141 + default
142 +
143 + # Python bindings
144 + bindings distutils-r1_src_prepare
145 + mv contrib/notmuch-mutt/README contrib/notmuch-mutt/README-mutt || die
146 +
147 + # Override dependencies for 'install' target
148 + use doc && _deps="install-info"
149 + sed -e "s/^install:.\+/install: all ${_deps}/" -i Makefile.local || die
150 +
151 + if use test; then
152 + append-cflags -g
153 + append-cxxflags -g
154 + fi
155 +
156 + if [[ ${CHOST} == *-solaris* ]] ; then
157 + # Non-autoconf configure
158 + append-ldflags -lnsl -lsocket
159 + fi
160 +}
161 +
162 +src_configure() {
163 + python_setup # For sphinx
164 + local _args=(
165 + --bashcompletiondir="$(get_bashcompdir)"
166 + --emacslispdir="${EPREFIX}/${SITELISP}/${PN}"
167 + --emacsetcdir="${EPREFIX}/${SITEETC}/${PN}"
168 + --without-desktop
169 + --without-ruby
170 + --zshcompletiondir="${EPREFIX}/usr/share/zsh/site-functions"
171 + $(use_with emacs)
172 + $(use_with doc api-docs)
173 + )
174 + tc-export CC CXX
175 + econf "${_args[@]}"
176 +}
177 +
178 +src_compile() {
179 + python_setup # For sphinx
180 + V=1 default
181 + bindings distutils-r1_src_compile
182 +
183 + if use mutt; then
184 + pushd contrib/notmuch-mutt || die
185 + emake notmuch-mutt.1
186 + popd || die
187 + fi
188 +}
189 +
190 +src_test() {
191 + pax-mark -m notmuch
192 + LD_LIBRARY_PATH="${WORKDIR}/${P}/lib" V=1 default
193 + pax-mark -ze notmuch
194 +}
195 +
196 +src_install() {
197 + default
198 + doman doc/_build/man/man?/*.?
199 +
200 + if use emacs; then
201 + elisp-site-file-install "${FILESDIR}/${SITEFILE}" || die
202 + fi
203 +
204 + if use nmbug; then
205 + dobin devel/nmbug/nmbug
206 + dobin devel/nmbug/notmuch-report
207 + fi
208 +
209 + if use mutt; then
210 + pushd contrib/notmuch-mutt || die
211 + dobin notmuch-mutt
212 + doman notmuch-mutt.1
213 + insinto /etc/mutt
214 + doins notmuch-mutt.rc
215 + dodoc README-mutt
216 + popd || die
217 + fi
218 +
219 + DOCS="" bindings distutils-r1_src_install
220 +}
221 +
222 +pkg_preinst() {
223 + local _rcfile="/etc/mutt/notmuch-mutt.rc"
224 + if use mutt && ! [[ -e ${ROOT}${_rcfile} ]]; then
225 + elog "To enable notmuch support in mutt, add the following line"
226 + elog "to your mutt config file:"
227 + elog ""
228 + elog " source ${_rcfile}"
229 + fi
230 +}
231 +
232 +pkg_postinst() {
233 + use emacs && elisp-site-regen
234 +}
235 +
236 +pkg_postrm() {
237 + use emacs && elisp-site-regen
238 +}