Gentoo Archives: gentoo-commits

From: Georgy Yakovlev <gyakovlev@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-mail/notmuch/
Date: Tue, 29 Jun 2021 15:40:48
Message-Id: 1624981218.45048aa34b393539dca583fc557ab9e76a655819.gyakovlev@gentoo
1 commit: 45048aa34b393539dca583fc557ab9e76a655819
2 Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jun 29 15:39:54 2021 +0000
4 Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
5 CommitDate: Tue Jun 29 15:40:18 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=45048aa3
7
8 net-mail/notmuch: add 0.32.2
9
10 Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
11
12 net-mail/notmuch/Manifest | 1 +
13 net-mail/notmuch/notmuch-0.32.2.ebuild | 292 +++++++++++++++++++++++++++++++++
14 2 files changed, 293 insertions(+)
15
16 diff --git a/net-mail/notmuch/Manifest b/net-mail/notmuch/Manifest
17 index a3ebf895d3a..06ca7dc2a96 100644
18 --- a/net-mail/notmuch/Manifest
19 +++ b/net-mail/notmuch/Manifest
20 @@ -1,3 +1,4 @@
21 DIST database-v1.tar.xz 204876 BLAKE2B 846a8d2f17edb61ed1c3d3c655becd1f60b4046772058706f13d516f65421a5105593660f1c556907bb2bb9607a3c2521243d1be07bffb70817ad3b8461680ca SHA512 e2d87373e00b65756d7fea40c54fb236d7a37ce839145c3afd99ab26efdc17796e540c021e2c24e521df2d0a01ccbf918994f87a0d83235ff9b109a51555b3d0
22 DIST notmuch-0.31.3.tar.xz 713900 BLAKE2B 64aa5c707a74544d31f1dce4e49f3e19cf8c733dfe6f0761dec5522eae94bacf0c01ab7c8212373f1857eeecbad569482365a53a10f56dfee72cefc8d3f4f05a SHA512 99119216b7ef7f9e336b11d03ebb61d9667a8fbddcf6fccc49b17d07f07867f0342b2766375e164b58eaa9a43237ec4d6567d616fe8813b929d28b203aedfa44
23 DIST notmuch-0.32.1.tar.xz 725196 BLAKE2B 6163f512e88f1b9415b93f7c4a146dc1af6e41bacdbbd29bdb48706af4af4822b626a719d50146f0cfe4d35508d8aa767b0e75eadebf9d619912f3ee6ba0e59e SHA512 c561658919a3c19bfe282e28a5c95db5d58030f044307fdfcaee02d3bf6fc15c9ae9d6d9d8a948c9e6f9b54f563dc82cde757a26a7d7c33eb976b3cfe7ce8c36
24 +DIST notmuch-0.32.2.tar.xz 725652 BLAKE2B 02801f57bd62b8020298babcc8243276f95fb535621178b2b0b8dfb58d14e8123b7b1fa7d2c246c9e005ca2c7c2d594aeea710408c3d14f26ffcd550c03b4d9a SHA512 e4151cb3ba0e5d26e67572a37c3132d0e35af5d9ca4339d88d8ba25385b6022c376a75abcffb57fda3242c836f6e40dec39c4038674682616b6e5785223295bf
25
26 diff --git a/net-mail/notmuch/notmuch-0.32.2.ebuild b/net-mail/notmuch/notmuch-0.32.2.ebuild
27 new file mode 100644
28 index 00000000000..2c5173f19db
29 --- /dev/null
30 +++ b/net-mail/notmuch/notmuch-0.32.2.ebuild
31 @@ -0,0 +1,292 @@
32 +# Copyright 1999-2021 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=7
36 +
37 +DISTUTILS_OPTIONAL=1
38 +DISTUTILS_USE_SETUPTOOLS=manual
39 +NEED_EMACS="24.1"
40 +PYTHON_COMPAT=( python3_{7,8,9} pypy3 )
41 +
42 +inherit bash-completion-r1 desktop distutils-r1 elisp-common flag-o-matic pax-utils toolchain-funcs xdg-utils
43 +
44 +DESCRIPTION="Thread-based e-mail indexer, supporting quick search and tagging"
45 +HOMEPAGE="https://notmuchmail.org/"
46 +SRC_URI="https://notmuchmail.org/releases/${P}.tar.xz
47 + test? ( https://notmuchmail.org/releases/test-databases/database-v1.tar.xz )"
48 +
49 +LICENSE="GPL-3"
50 +# Sub-slot corresponds to major wersion of libnotmuch.so.X.Y. Bump of Y is
51 +# meant to be binary backward compatible.
52 +SLOT="0/5"
53 +KEYWORDS="~alpha amd64 ~arm ~arm64 ~ppc64 x86 ~x64-macos"
54 +REQUIRED_USE="
55 + apidoc? ( doc )
56 + nmbug? ( python )
57 + python? ( ${PYTHON_REQUIRED_USE} )
58 + test? ( crypt emacs python valgrind )
59 +"
60 +IUSE="apidoc crypt doc emacs mutt nmbug python test valgrind"
61 +RESTRICT="!test? ( test )"
62 +
63 +BDEPEND="
64 + app-arch/xz-utils[extra-filters(-)]
65 + virtual/pkgconfig
66 + apidoc? (
67 + app-doc/doxygen
68 + dev-lang/perl
69 + )
70 + doc? (
71 + dev-python/sphinx
72 + sys-apps/texinfo
73 + )
74 + python? (
75 + dev-python/setuptools[${PYTHON_USEDEP}]
76 + test? ( dev-python/pytest[${PYTHON_USEDEP}] )
77 + )
78 + test? ( sys-process/parallel )
79 +"
80 +
81 +COMMON_DEPEND="
82 + dev-libs/glib
83 + dev-libs/gmime:3.0[crypt]
84 + >=dev-libs/xapian-1.4.0:=
85 + sys-libs/talloc
86 + sys-libs/zlib:=
87 + emacs? ( >=app-editors/emacs-${NEED_EMACS}:* )
88 + python? (
89 + ${PYTHON_DEPS}
90 + virtual/python-cffi[${PYTHON_USEDEP}]
91 + )
92 +"
93 +
94 +DEPEND="${COMMON_DEPEND}
95 + test? (
96 + >=app-editors/emacs-${NEED_EMACS}:*[libxml2]
97 + app-misc/dtach
98 + sys-devel/gdb
99 + crypt? (
100 + app-crypt/gnupg
101 + dev-libs/openssl
102 + )
103 + )
104 + valgrind? ( dev-util/valgrind )
105 +"
106 +
107 +RDEPEND="${COMMON_DEPEND}
108 + crypt? ( app-crypt/gnupg )
109 + mutt? (
110 + dev-perl/File-Which
111 + dev-perl/Mail-Box
112 + dev-perl/MailTools
113 + dev-perl/String-ShellQuote
114 + dev-perl/Term-ReadLine-Gnu
115 + virtual/perl-Digest-SHA
116 + virtual/perl-File-Path
117 + virtual/perl-Getopt-Long
118 + virtual/perl-Pod-Parser
119 + )
120 + nmbug? ( dev-vcs/git )
121 +"
122 +
123 +SITEFILE="50${PN}-gentoo.el"
124 +
125 +PATCHES=(
126 + "${FILESDIR}/${PN}-0.32.1-tests.patch"
127 +)
128 +
129 +pkg_setup() {
130 + use emacs && elisp-check-emacs-version
131 +}
132 +
133 +src_unpack() {
134 + unpack "${P}".tar.xz
135 + if use test; then
136 + mkdir -p "${S}"/test/test-databases || die
137 + cp "${DISTDIR}"/database-v1.tar.xz "${S}"/test/test-databases/ || die
138 + fi
139 +}
140 +
141 +src_prepare() {
142 + default
143 +
144 + use python && distutils-r1_src_prepare
145 +
146 + mv contrib/notmuch-mutt/README contrib/notmuch-mutt/README-mutt || die
147 +
148 + # Override 'install' target, we want to install manpages with doman, but let it install texinfo files.
149 + sed -i "s/all install-man install-info/all $(usex doc install-info '')/" "Makefile.local" || die
150 +
151 + use test && append-flags '-g'
152 +
153 + # Non-autoconf configure
154 + [[ ${CHOST} == *-solaris* ]] && append-ldflags '-lnsl' '-lsocket'
155 +
156 + # sphinx-4 broke everything. https://bugs.gentoo.org/789492
157 + echo 'man_make_section_directory = False' >> doc/conf.py || die
158 +}
159 +
160 +src_configure() {
161 + python_setup # For sphinx
162 +
163 + tc-export CC CXX
164 +
165 + local myconf=(
166 + --bashcompletiondir="$(get_bashcompdir)"
167 + --emacslispdir="${EPREFIX}/${SITELISP}/${PN}"
168 + --emacsetcdir="${EPREFIX}/${SITEETC}/${PN}"
169 + --without-desktop
170 + --without-ruby
171 + --zshcompletiondir="${EPREFIX}/usr/share/zsh/site-functions"
172 + $(use_with apidoc api-docs)
173 + $(use_with doc docs)
174 + $(use_with emacs)
175 + )
176 +
177 + econf "${myconf[@]}"
178 +}
179 +
180 +python_compile() {
181 + pushd bindings/python-cffi > /dev/null || die
182 + distutils-r1_python_compile
183 + # copy stuff just in case
184 + if use test; then
185 + mkdir -p build/stage/tests || die
186 + cp -v tests/*.py build/stage/tests || die
187 + fi
188 + popd > /dev/null || die
189 +
190 + # TODO: we want to drop those, research revdeps
191 + pushd bindings/python > /dev/null || die
192 + distutils-r1_python_compile
193 + popd > /dev/null || die
194 +}
195 +
196 +python_compile_all() {
197 + use doc && emake -C bindings/python/docs html
198 +}
199 +
200 +src_compile() {
201 + python_setup # For sphinx
202 +
203 + # prevent race in emacs doc generation
204 + # FileNotFoundError: [Errno 2] No such file or directory: '..work/notmuch-0.31/emacs/notmuch.rsti'
205 + if use emacs; then
206 + use doc && emake -j1 -C emacs docstring.stamp V=1 #nowarn
207 + fi
208 +
209 + emake V=1
210 +
211 + use python && distutils-r1_src_compile
212 +
213 + if use mutt; then
214 + pushd contrib/notmuch-mutt > /dev/null || die
215 + emake notmuch-mutt.1
216 + popd > /dev/null || die
217 + fi
218 +}
219 +
220 +python_test() {
221 + # we only have tests for cffi bindings
222 + pushd bindings/python-cffi > /dev/null || die
223 + rm -f tox.ini || die
224 + pytest -vv || die "Tests failed with ${EPYTHON}"
225 + popd > /dev/null || die
226 +}
227 +
228 +src_test() {
229 + local test_failures=()
230 + pax-mark -m notmuch
231 + LD_LIBRARY_PATH="${S}/lib" \
232 + nonfatal emake test V=1 OPTIONS="--verbose --tee" || test_failures+=( "'emake tests'" )
233 + pax-mark -ze notmuch
234 +
235 + # both lib and bin needed for testsuite.
236 + if use python; then
237 + LD_LIBRARY_PATH="${S}/lib" \
238 + PATH="${S}:${PATH}" \
239 + nonfatal distutils-r1_src_test || test_failures+=( "'python tests'" )
240 + fi
241 +
242 + [[ ${test_failures} ]] && die "Tests failed: ${test_failures[@]}"
243 +}
244 +
245 +python_install() {
246 + pushd bindings/python-cffi > /dev/null || die
247 + distutils-r1_python_install
248 + popd > /dev/null || die
249 +
250 + pushd bindings/python > /dev/null || die
251 + distutils-r1_python_install
252 + popd > /dev/null || die
253 +}
254 +
255 +src_install() {
256 + default
257 +
258 + if use doc; then
259 + pushd doc/_build/man/man1 > /dev/null || die
260 + ln notmuch.1 notmuch-setup.1 || die
261 + popd > /dev/null || die
262 + if use apidoc; then
263 + # rename overly generic manpage to avoid clashes
264 + mv doc/_build/man/man3/deprecated.3 \
265 + doc/_build/man/man3/notmuch-deprecated.3 || die
266 + fi
267 + doman doc/_build/man/man?/*.?
268 + fi
269 +
270 + if use emacs; then
271 + elisp-site-file-install "${FILESDIR}/${SITEFILE}" || die
272 + domenu emacs/notmuch-emacs-mua.desktop
273 + fi
274 +
275 + if use nmbug; then
276 + # TODO: those guys need proper deps
277 + python_fix_shebang devel/nmbug/{nmbug,notmuch-report}
278 + dobin devel/nmbug/{nmbug,notmuch-report}
279 + fi
280 +
281 + if use mutt; then
282 + pushd contrib/notmuch-mutt > /dev/null || die
283 + dobin notmuch-mutt
284 + # this manpage is built by pod2man
285 + doman notmuch-mutt.1
286 + insinto /etc/mutt
287 + doins notmuch-mutt.rc
288 + dodoc README-mutt
289 + popd > /dev/null || die
290 + fi
291 +
292 + local DOCS=( README{,.rst} INSTALL NEWS )
293 + einstalldocs
294 +
295 + if use python; then
296 + use doc && local HTML_DOCS=( bindings/python/docs/html/. )
297 + distutils-r1_src_install
298 + fi
299 +}
300 +
301 +pkg_preinst() {
302 + local _rcfile="/etc/mutt/notmuch-mutt.rc"
303 + if use mutt && ! [[ -e "${EROOT}"${_rcfile} ]]; then
304 + elog "To enable notmuch support in mutt, add the following line"
305 + elog "to your mutt config file:"
306 + elog ""
307 + elog " source ${_rcfile}"
308 + fi
309 +}
310 +
311 +pkg_postinst() {
312 + if use emacs; then
313 + elisp-site-regen
314 + xdg_desktop_database_update
315 + fi
316 +}
317 +
318 +pkg_postrm() {
319 + if use emacs; then
320 + elisp-site-regen
321 + xdg_desktop_database_update
322 + fi
323 +}