Gentoo Archives: gentoo-commits

From: "Andreas K. Hüttel" <dilfridge@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-mail/notmuch/
Date: Sat, 23 May 2020 13:51:35
Message-Id: 1590241541.76371e7a6fe33fc8ebd38b56d5ac45eed4af1e52.dilfridge@gentoo
1 commit: 76371e7a6fe33fc8ebd38b56d5ac45eed4af1e52
2 Author: Ralph Seichter <github <AT> seichter <DOT> de>
3 AuthorDate: Fri May 22 16:37:45 2020 +0000
4 Commit: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
5 CommitDate: Sat May 23 13:45:41 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=76371e7a
7
8 net-mail/notmuch: Fix runtime dependencies
9
10 * Updated ebuild for EAPI 7.
11
12 * Fix: Earlier ebuild versions had unconditional dependencies on Sphinx
13 and Texinfo even at runtime. Moved dependencies to BDEPEND and tied
14 them to USE=doc.
15
16 * Fix: Install Texinfo documentation only when USE=doc is specified.
17
18 Closes: https://bugs.gentoo.org/711052
19 Package-Manager: Portage-2.3.99, Repoman-2.3.22
20 Signed-off-by: Ralph Seichter <gentoo <AT> seichter.de>
21 Closes: https://github.com/gentoo/gentoo/pull/15918
22 Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>
23
24 net-mail/notmuch/notmuch-0.29.3-r2.ebuild | 230 ++++++++++++++++++++++++++++++
25 1 file changed, 230 insertions(+)
26
27 diff --git a/net-mail/notmuch/notmuch-0.29.3-r2.ebuild b/net-mail/notmuch/notmuch-0.29.3-r2.ebuild
28 new file mode 100644
29 index 00000000000..7750baa97ae
30 --- /dev/null
31 +++ b/net-mail/notmuch/notmuch-0.29.3-r2.ebuild
32 @@ -0,0 +1,230 @@
33 +# Copyright 1999-2020 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=7
37 +
38 +DISTUTILS_OPTIONAL=1
39 +NEED_EMACS="24.1"
40 +PYTHON_COMPAT=( python3_{6,7} )
41 +
42 +inherit bash-completion-r1 distutils-r1 elisp-common eutils flag-o-matic \
43 + pax-utils readme.gentoo-r1 toolchain-funcs
44 +
45 +DESCRIPTION="Thread-based e-mail indexer, supporting quick search and tagging"
46 +HOMEPAGE="https://notmuchmail.org/"
47 +SRC_URI="https://notmuchmail.org/releases/${P}.tar.xz
48 + test? ( https://notmuchmail.org/releases/test-databases/database-v1.tar.xz )"
49 +
50 +LICENSE="GPL-3"
51 +# Sub-slot corresponds to major wersion of libnotmuch.so.X.Y. Bump of Y is
52 +# meant to be binary backward compatible.
53 +SLOT="0/5"
54 +KEYWORDS="~alpha ~amd64 ~ppc64 ~x86 ~x64-solaris"
55 +REQUIRED_USE="
56 + nmbug? ( python )
57 + python? ( ${PYTHON_REQUIRED_USE} )
58 + test? ( crypt emacs python valgrind )
59 +"
60 +IUSE="crypt doc emacs mutt nmbug python test valgrind"
61 +RESTRICT="!test? ( test )"
62 +
63 +BDEPEND="
64 + virtual/pkgconfig
65 + doc? (
66 + app-doc/doxygen
67 + dev-python/mock[${PYTHON_USEDEP}]
68 + dev-python/sphinx
69 + sys-apps/texinfo
70 + )
71 +"
72 +CDEPEND="
73 + dev-libs/glib
74 + dev-libs/gmime:3.0[crypt]
75 + >=dev-libs/xapian-1.4.8:=
76 + sys-libs/talloc
77 + sys-libs/zlib
78 + emacs? ( >=app-editors/emacs-${NEED_EMACS}:* )
79 + python? ( ${PYTHON_DEPS} )
80 +"
81 +DEPEND="${CDEPEND}
82 + test? (
83 + >=app-editors/emacs-${NEED_EMACS}:*[libxml2]
84 + app-misc/dtach
85 + sys-devel/gdb
86 + crypt? ( app-crypt/gnupg dev-libs/openssl )
87 + )
88 + valgrind? ( dev-util/valgrind )
89 +"
90 +RDEPEND="${CDEPEND}
91 + crypt? ( app-crypt/gnupg )
92 + mutt? (
93 + dev-perl/File-Which
94 + dev-perl/Mail-Box
95 + dev-perl/MailTools
96 + dev-perl/String-ShellQuote
97 + dev-perl/Term-ReadLine-Gnu
98 + virtual/perl-Digest-SHA
99 + virtual/perl-File-Path
100 + virtual/perl-Getopt-Long
101 + virtual/perl-Pod-Parser
102 + )
103 + nmbug? ( dev-vcs/git )
104 +"
105 +
106 +DOCS=( AUTHORS NEWS README )
107 +DOC_CONTENTS="There are a few backward-incompatible changes between
108 +notmuch version 0.18 < x <= 0.18. Please consult the NEWS file (0.18
109 +section) before first use."
110 +MY_LD_LIBRARY_PATH="${WORKDIR}/${P}/lib"
111 +PATCHES=(
112 + "${FILESDIR}/${PV}-0001-Use-loopback-IP-address-rather-than-name.patch"
113 +)
114 +SITEFILE="50${PN}-gentoo.el"
115 +
116 +bindings() {
117 + local rc=0
118 + if use $1; then
119 + pushd bindings/$1 || die
120 + shift
121 + "$@"
122 + rc=$?
123 + popd || die
124 + fi
125 + return $rc
126 +}
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 + local _deps=""
142 + default
143 +
144 + # Python bindings
145 + bindings python distutils-r1_src_prepare
146 + bindings python mv README README-python || die
147 + mv contrib/notmuch-mutt/README contrib/notmuch-mutt/README-mutt || die
148 +
149 + # Ensure that a new Makefile.config will be generated
150 + rm -f Makefile.config || die
151 +
152 + # Override dependencies for 'install' target
153 + use doc && _deps="install-info"
154 + sed -e "s/^install:.\+/install: all ${_deps}/" -i Makefile.local || die
155 +
156 + if use test; then
157 + append-cflags -g
158 + append-cxxflags -g
159 + fi
160 +
161 + if [[ ${CHOST} == *-solaris* ]] ; then
162 + # Non-autoconf configure
163 + append-ldflags -lnsl -lsocket
164 + fi
165 +}
166 +
167 +src_configure() {
168 + python_setup # For sphinx
169 + local _args=(
170 + --bashcompletiondir="$(get_bashcompdir)"
171 + --emacslispdir="${EPREFIX}/${SITELISP}/${PN}"
172 + --emacsetcdir="${EPREFIX}/${SITEETC}/${PN}"
173 + --without-desktop
174 + --without-ruby
175 + --zshcompletiondir="${EPREFIX}/usr/share/zsh/site-functions"
176 + $(use_with emacs)
177 + $(use_with doc api-docs)
178 + )
179 + tc-export CC CXX
180 + econf "${_args[@]}"
181 +}
182 +
183 +src_compile() {
184 + python_setup # For sphinx
185 + V=1 default
186 + bindings python distutils-r1_src_compile
187 +
188 + if use mutt; then
189 + pushd contrib/notmuch-mutt || die
190 + emake notmuch-mutt.1
191 + popd || die
192 + fi
193 +
194 + if use doc; then
195 + pydocs() {
196 + pushd docs || die
197 + emake html
198 + rm -r html/_sources || die
199 + rm html/{objects.inv,.buildinfo} || die
200 + mkdir -p ../html && mv html ../html/python || die
201 + popd || die
202 + }
203 + LD_LIBRARY_PATH="${MY_LD_LIBRARY_PATH}" bindings python pydocs
204 + fi
205 +}
206 +
207 +src_test() {
208 + pax-mark -m notmuch
209 + LD_LIBRARY_PATH="${MY_LD_LIBRARY_PATH}" V=1 default
210 + pax-mark -ze notmuch
211 +}
212 +
213 +src_install() {
214 + default
215 +
216 + if use doc; then
217 + doman doc/_build/man/man?/*.?
218 + fi
219 +
220 + if use emacs; then
221 + elisp-site-file-install "${FILESDIR}/${SITEFILE}" || die
222 + fi
223 +
224 + if use nmbug; then
225 + dobin devel/nmbug/nmbug
226 + dobin devel/nmbug/notmuch-report
227 + fi
228 +
229 + if use mutt; then
230 + pushd contrib/notmuch-mutt || die
231 + dobin notmuch-mutt
232 + doman notmuch-mutt.1
233 + insinto /etc/mutt
234 + doins notmuch-mutt.rc
235 + dodoc README-mutt
236 + popd || die
237 + fi
238 +
239 + DOCS="" bindings python distutils-r1_src_install
240 + use doc && bindings python dodoc -r html
241 +}
242 +
243 +pkg_preinst() {
244 + local _rcfile="/etc/mutt/notmuch-mutt.rc"
245 + if use mutt && ! [[ -e ${ROOT}${_rcfile} ]]; then
246 + elog "To enable notmuch support in mutt, add the following line"
247 + elog "to your mutt config file:"
248 + elog ""
249 + elog " source ${_rcfile}"
250 + fi
251 +}
252 +
253 +pkg_postinst() {
254 + use emacs && elisp-site-regen
255 + if has_version '<net-mail/notmuch-0.18'; then
256 + FORCE_PRINT_ELOG=1 readme.gentoo_print_elog
257 + fi
258 +}
259 +
260 +pkg_postrm() {
261 + use emacs && elisp-site-regen
262 +}