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