1 |
commit: 3fbc535f74f5ce0d5dd52c22cbc65447559b8e2a |
2 |
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Oct 8 13:38:06 2021 +0000 |
4 |
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Oct 8 13:39:11 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3fbc535f |
7 |
|
8 |
net-mail/notmuch: add 0.33.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.33.2.ebuild | 295 +++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 296 insertions(+) |
15 |
|
16 |
diff --git a/net-mail/notmuch/Manifest b/net-mail/notmuch/Manifest |
17 |
index 06ca7dc2a96..eac9ca13c4e 100644 |
18 |
--- a/net-mail/notmuch/Manifest |
19 |
+++ b/net-mail/notmuch/Manifest |
20 |
@@ -2,3 +2,4 @@ DIST database-v1.tar.xz 204876 BLAKE2B 846a8d2f17edb61ed1c3d3c655becd1f60b404677 |
21 |
DIST notmuch-0.31.3.tar.xz 713900 BLAKE2B 64aa5c707a74544d31f1dce4e49f3e19cf8c733dfe6f0761dec5522eae94bacf0c01ab7c8212373f1857eeecbad569482365a53a10f56dfee72cefc8d3f4f05a SHA512 99119216b7ef7f9e336b11d03ebb61d9667a8fbddcf6fccc49b17d07f07867f0342b2766375e164b58eaa9a43237ec4d6567d616fe8813b929d28b203aedfa44 |
22 |
DIST notmuch-0.32.1.tar.xz 725196 BLAKE2B 6163f512e88f1b9415b93f7c4a146dc1af6e41bacdbbd29bdb48706af4af4822b626a719d50146f0cfe4d35508d8aa767b0e75eadebf9d619912f3ee6ba0e59e SHA512 c561658919a3c19bfe282e28a5c95db5d58030f044307fdfcaee02d3bf6fc15c9ae9d6d9d8a948c9e6f9b54f563dc82cde757a26a7d7c33eb976b3cfe7ce8c36 |
23 |
DIST notmuch-0.32.2.tar.xz 725652 BLAKE2B 02801f57bd62b8020298babcc8243276f95fb535621178b2b0b8dfb58d14e8123b7b1fa7d2c246c9e005ca2c7c2d594aeea710408c3d14f26ffcd550c03b4d9a SHA512 e4151cb3ba0e5d26e67572a37c3132d0e35af5d9ca4339d88d8ba25385b6022c376a75abcffb57fda3242c836f6e40dec39c4038674682616b6e5785223295bf |
24 |
+DIST notmuch-0.33.2.tar.xz 733228 BLAKE2B e0a206695944bd57ab3ba1488bbff10c6744b57126eddeead45653a20df8edde21e0c618f9b4af5731e41bb469538883770ef61da4b28e2fd7dc108d994a7433 SHA512 15f4ecbd991df3a64c2b89aeb6bf7649e76ff2010f80120a15c10c9c5e913a90696ef6a760cbea24bbc9a3ca8cae18fada13d80e69c848cc142d355f2a513f5d |
25 |
|
26 |
diff --git a/net-mail/notmuch/notmuch-0.33.2.ebuild b/net-mail/notmuch/notmuch-0.33.2.ebuild |
27 |
new file mode 100644 |
28 |
index 00000000000..4cc225e3c55 |
29 |
--- /dev/null |
30 |
+++ b/net-mail/notmuch/notmuch-0.33.2.ebuild |
31 |
@@ -0,0 +1,295 @@ |
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? ( |
79 |
+ app-shells/bash |
80 |
+ sys-process/parallel |
81 |
+ ) |
82 |
+" |
83 |
+ |
84 |
+COMMON_DEPEND=" |
85 |
+ dev-libs/glib |
86 |
+ dev-libs/gmime:3.0[crypt] |
87 |
+ >=dev-libs/xapian-1.4.0:= |
88 |
+ sys-libs/talloc |
89 |
+ sys-libs/zlib:= |
90 |
+ emacs? ( >=app-editors/emacs-${NEED_EMACS}:* ) |
91 |
+ python? ( |
92 |
+ ${PYTHON_DEPS} |
93 |
+ virtual/python-cffi[${PYTHON_USEDEP}] |
94 |
+ ) |
95 |
+" |
96 |
+ |
97 |
+DEPEND="${COMMON_DEPEND} |
98 |
+ test? ( |
99 |
+ >=app-editors/emacs-${NEED_EMACS}:*[libxml2] |
100 |
+ app-misc/dtach |
101 |
+ sys-devel/gdb[python] |
102 |
+ crypt? ( |
103 |
+ app-crypt/gnupg |
104 |
+ dev-libs/openssl |
105 |
+ ) |
106 |
+ ) |
107 |
+ valgrind? ( dev-util/valgrind ) |
108 |
+" |
109 |
+ |
110 |
+RDEPEND="${COMMON_DEPEND} |
111 |
+ crypt? ( app-crypt/gnupg ) |
112 |
+ mutt? ( |
113 |
+ dev-perl/File-Which |
114 |
+ dev-perl/Mail-Box |
115 |
+ dev-perl/MailTools |
116 |
+ dev-perl/String-ShellQuote |
117 |
+ dev-perl/Term-ReadLine-Gnu |
118 |
+ virtual/perl-Digest-SHA |
119 |
+ virtual/perl-File-Path |
120 |
+ virtual/perl-Getopt-Long |
121 |
+ dev-perl/Pod-Parser |
122 |
+ ) |
123 |
+ nmbug? ( dev-vcs/git ) |
124 |
+" |
125 |
+ |
126 |
+SITEFILE="50${PN}-gentoo.el" |
127 |
+ |
128 |
+pkg_setup() { |
129 |
+ use emacs && elisp-check-emacs-version |
130 |
+} |
131 |
+ |
132 |
+src_unpack() { |
133 |
+ unpack "${P}".tar.xz |
134 |
+ if use test; then |
135 |
+ mkdir -p "${S}"/test/test-databases || die |
136 |
+ cp "${DISTDIR}"/database-v1.tar.xz "${S}"/test/test-databases/ || die |
137 |
+ fi |
138 |
+} |
139 |
+ |
140 |
+src_prepare() { |
141 |
+ default |
142 |
+ |
143 |
+ use python && distutils-r1_src_prepare |
144 |
+ |
145 |
+ mv contrib/notmuch-mutt/README contrib/notmuch-mutt/README-mutt || die |
146 |
+ |
147 |
+ # Override 'install' target, we want to install manpages with doman, but let it install texinfo files. |
148 |
+ sed -i "s/all install-man install-info/all $(usex doc install-info '')/" "Makefile.local" || die |
149 |
+ |
150 |
+ use test && append-flags '-g' |
151 |
+ |
152 |
+ # Non-autoconf configure |
153 |
+ [[ ${CHOST} == *-solaris* ]] && append-ldflags '-lnsl' '-lsocket' |
154 |
+ |
155 |
+ # sphinx-4 broke everything. https://bugs.gentoo.org/789492 |
156 |
+ echo 'man_make_section_directory = False' >> doc/conf.py || die |
157 |
+} |
158 |
+ |
159 |
+src_configure() { |
160 |
+ python_setup # For sphinx |
161 |
+ |
162 |
+ tc-export CC CXX |
163 |
+ |
164 |
+ local myconf=( |
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 apidoc api-docs) |
172 |
+ $(use_with doc docs) |
173 |
+ $(use_with emacs) |
174 |
+ ) |
175 |
+ |
176 |
+ econf "${myconf[@]}" |
177 |
+} |
178 |
+ |
179 |
+python_compile() { |
180 |
+ pushd bindings/python-cffi > /dev/null || die |
181 |
+ distutils-r1_python_compile |
182 |
+ # copy stuff just in case |
183 |
+ if use test; then |
184 |
+ mkdir -p build/stage/tests || die |
185 |
+ cp -v tests/*.py build/stage/tests || die |
186 |
+ fi |
187 |
+ popd > /dev/null || die |
188 |
+ |
189 |
+ # TODO: we want to drop those, research revdeps |
190 |
+ pushd bindings/python > /dev/null || die |
191 |
+ distutils-r1_python_compile |
192 |
+ popd > /dev/null || die |
193 |
+} |
194 |
+ |
195 |
+python_compile_all() { |
196 |
+ use doc && emake -C bindings/python/docs html |
197 |
+} |
198 |
+ |
199 |
+src_compile() { |
200 |
+ python_setup # For sphinx |
201 |
+ |
202 |
+ # prevent race in emacs doc generation |
203 |
+ # FileNotFoundError: [Errno 2] No such file or directory: '..work/notmuch-0.31/emacs/notmuch.rsti' |
204 |
+ if use emacs; then |
205 |
+ use doc && emake -j1 -C emacs docstring.stamp V=1 #nowarn |
206 |
+ fi |
207 |
+ |
208 |
+ emake V=1 |
209 |
+ |
210 |
+ use python && distutils-r1_src_compile |
211 |
+ |
212 |
+ if use mutt; then |
213 |
+ pushd contrib/notmuch-mutt > /dev/null || die |
214 |
+ emake notmuch-mutt.1 |
215 |
+ popd > /dev/null || die |
216 |
+ fi |
217 |
+} |
218 |
+ |
219 |
+python_test() { |
220 |
+ # we only have tests for cffi bindings |
221 |
+ pushd bindings/python-cffi > /dev/null || die |
222 |
+ rm -f tox.ini || die |
223 |
+ pytest -vv || die "Tests failed with ${EPYTHON}" |
224 |
+ popd > /dev/null || die |
225 |
+} |
226 |
+ |
227 |
+src_test() { |
228 |
+ local test_failures=() |
229 |
+ pax-mark -m notmuch |
230 |
+ |
231 |
+ # we run pytest via eclass phasefunc, so delete upstream launcher |
232 |
+ use python && { rm -v test/T391-python-cffi.sh || die ; } |
233 |
+ |
234 |
+ LD_LIBRARY_PATH="${S}/lib" \ |
235 |
+ nonfatal emake test V=1 OPTIONS="--verbose --tee" || test_failures+=( "'emake tests'" ) |
236 |
+ pax-mark -ze notmuch |
237 |
+ |
238 |
+ # both lib and bin needed for testsuite. |
239 |
+ if use python; then |
240 |
+ LD_LIBRARY_PATH="${S}/lib" \ |
241 |
+ PATH="${S}:${PATH}" \ |
242 |
+ nonfatal distutils-r1_src_test || test_failures+=( "'python tests'" ) |
243 |
+ fi |
244 |
+ |
245 |
+ [[ ${test_failures} ]] && die "Tests failed: ${test_failures[@]}" |
246 |
+} |
247 |
+ |
248 |
+python_install() { |
249 |
+ pushd bindings/python-cffi > /dev/null || die |
250 |
+ distutils-r1_python_install |
251 |
+ popd > /dev/null || die |
252 |
+ |
253 |
+ pushd bindings/python > /dev/null || die |
254 |
+ distutils-r1_python_install |
255 |
+ popd > /dev/null || die |
256 |
+} |
257 |
+ |
258 |
+src_install() { |
259 |
+ default |
260 |
+ |
261 |
+ if use doc; then |
262 |
+ pushd doc/_build/man/man1 > /dev/null || die |
263 |
+ ln notmuch.1 notmuch-setup.1 || die |
264 |
+ popd > /dev/null || die |
265 |
+ if use apidoc; then |
266 |
+ # rename overly generic manpage to avoid clashes |
267 |
+ mv doc/_build/man/man3/deprecated.3 \ |
268 |
+ doc/_build/man/man3/notmuch-deprecated.3 || die |
269 |
+ fi |
270 |
+ doman doc/_build/man/man?/*.? |
271 |
+ fi |
272 |
+ |
273 |
+ if use emacs; then |
274 |
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}" || die |
275 |
+ domenu emacs/notmuch-emacs-mua.desktop |
276 |
+ fi |
277 |
+ |
278 |
+ if use nmbug; then |
279 |
+ # TODO: those guys need proper deps |
280 |
+ python_fix_shebang devel/nmbug/{nmbug,notmuch-report} |
281 |
+ dobin devel/nmbug/{nmbug,notmuch-report} |
282 |
+ fi |
283 |
+ |
284 |
+ if use mutt; then |
285 |
+ pushd contrib/notmuch-mutt > /dev/null || die |
286 |
+ dobin notmuch-mutt |
287 |
+ # this manpage is built by pod2man |
288 |
+ doman notmuch-mutt.1 |
289 |
+ insinto /etc/mutt |
290 |
+ doins notmuch-mutt.rc |
291 |
+ dodoc README-mutt |
292 |
+ popd > /dev/null || die |
293 |
+ fi |
294 |
+ |
295 |
+ local DOCS=( README{,.rst} INSTALL NEWS ) |
296 |
+ einstalldocs |
297 |
+ |
298 |
+ if use python; then |
299 |
+ use doc && local HTML_DOCS=( bindings/python/docs/html/. ) |
300 |
+ distutils-r1_src_install |
301 |
+ fi |
302 |
+} |
303 |
+ |
304 |
+pkg_preinst() { |
305 |
+ local _rcfile="/etc/mutt/notmuch-mutt.rc" |
306 |
+ if use mutt && ! [[ -e "${EROOT}"${_rcfile} ]]; then |
307 |
+ elog "To enable notmuch support in mutt, add the following line" |
308 |
+ elog "to your mutt config file:" |
309 |
+ elog "" |
310 |
+ elog " source ${_rcfile}" |
311 |
+ fi |
312 |
+} |
313 |
+ |
314 |
+pkg_postinst() { |
315 |
+ if use emacs; then |
316 |
+ elisp-site-regen |
317 |
+ xdg_desktop_database_update |
318 |
+ fi |
319 |
+} |
320 |
+ |
321 |
+pkg_postrm() { |
322 |
+ if use emacs; then |
323 |
+ elisp-site-regen |
324 |
+ xdg_desktop_database_update |
325 |
+ fi |
326 |
+} |