diff options
| author | kar <git@13f0.net> | 2025-07-29 19:49:21 -0400 |
|---|---|---|
| committer | kar <git@13f0.net> | 2026-02-01 18:49:21 -0500 |
| commit | b2edb5bbb15ad7343edf8d4baf32f97debe94b38 (patch) | |
| tree | ca8a508655178d52e99ef66b35c47865d13c4ab5 /net-mail/notmuch | |
| parent | 9d59336bf4ea6b7fe8155b6bbda5926592bb48d0 (diff) | |
add net-mail/notmuch
Diffstat (limited to 'net-mail/notmuch')
| -rw-r--r-- | net-mail/notmuch/Manifest | 7 | ||||
| -rw-r--r-- | net-mail/notmuch/files/50notmuch-gentoo.el | 7 | ||||
| -rw-r--r-- | net-mail/notmuch/files/notmuch-0.39-no-compress-man-pages.patch | 67 | ||||
| -rw-r--r-- | net-mail/notmuch/files/notmuch-0.39-test-skip-debug-symbols.patch | 11 | ||||
| -rw-r--r-- | net-mail/notmuch/metadata.xml | 22 | ||||
| -rw-r--r-- | net-mail/notmuch/notmuch-0.39.ebuild | 263 |
6 files changed, 377 insertions, 0 deletions
diff --git a/net-mail/notmuch/Manifest b/net-mail/notmuch/Manifest new file mode 100644 index 0000000..9fb2ddc --- /dev/null +++ b/net-mail/notmuch/Manifest | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | AUX 50notmuch-gentoo.el 291 BLAKE2B f7d4a05ca84f08e2c2779faf8a580f39f7f49f18501e963a83649f6a67e5df6ae6105ae1ca83925a55e70e5b857c281b01312434a2ed95fb7dc50c3d6d9c7311 SHA512 80612ba5ae90f2fbb24b38bae99b660c5e3d58e7390a4bb3a0e5e9b49092e38f189347344286072617935abf7ea08b538f68e8227705ca0b2b44985c4c0d024b | ||
| 2 | AUX notmuch-0.39-no-compress-man-pages.patch 2938 BLAKE2B 130de5bdee8c62bd30d5fe22a35cea92409a00f78d4a15e23c2ae63cdce5db22d73947b05abf68f6010bcaf37c325247397c63debbd0d7e08c7de22dc8f3878a SHA512 c8cce6c8bc53e656a27c33cf2d65b3d94c10860021cbb05fe2cca4e9be7ed7e9c8fc7f05801ca5dc05d32f03cfca9c628e545053867bb2a8a63dee0267ae3223 | ||
| 3 | AUX notmuch-0.39-test-skip-debug-symbols.patch 355 BLAKE2B e53e1add25281c9606bd37bc21c43d79820d8f554fcca7a43d5c8c93a9a695f78f4772a74136602cff6f4f868a1268cf96ee40e81efb5cba28bcc21894cd4952 SHA512 d34e04dd4b4a48443a21c47c3e04c494bd8dc7f730363f07141349119ee30a4e6cf117fc6ab08bea48cea67c1a0fbaaeb971c45570bc604abcaa600ec34045b7 | ||
| 4 | DIST database-v1.tar.xz 204876 BLAKE2B 846a8d2f17edb61ed1c3d3c655becd1f60b4046772058706f13d516f65421a5105593660f1c556907bb2bb9607a3c2521243d1be07bffb70817ad3b8461680ca SHA512 e2d87373e00b65756d7fea40c54fb236d7a37ce839145c3afd99ab26efdc17796e540c021e2c24e521df2d0a01ccbf918994f87a0d83235ff9b109a51555b3d0 | ||
| 5 | DIST notmuch-0.39.tar.xz 811448 BLAKE2B 5d9a6fb28f17c45a8310f83c3ae70e63a5263b85565cfebae96f3054cb0b682164fced83d31176a6287cf9e18570dbeb114f50bc2cd4c0db41e744b8d7d1d15d SHA512 a9864a6a8423c723d36df269dcc73c2987be63c6e328b818235d0604cb594e0e91ee7639ee99a4b867be4387a605abc187a3b458aa7b0e4fc3a1744c0c2daa69 | ||
| 6 | EBUILD notmuch-0.39.ebuild 5982 BLAKE2B 60f2b94fb59a3df76efb1f62e937438c814be051f54df9e1c05c1bb33ce9aa41ef4228975e75427d687a3c2413e0e71efda43b032ef8e5d10f155ee68d935874 SHA512 7202eeab46c373ae7e0b8b98a7a94f3b0741d201692b812db79080f8842e9352b3c11dfa09d3d383b0e8f879c29d298c84988375d633ddc6681ff95ccce7b0b3 | ||
| 7 | MISC metadata.xml 970 BLAKE2B fa16969c14fcfc2b5d428bde6f4068c7fba25c6b9200598241ff783cd73635881d1504417235b5655f6ae51bd7cd7964bff16fd280deccaad2d2a09e86c1c8ec SHA512 45b4e0638e08de5252c7ab7f376135897de7f77cf039042272e72edc287d0e3a0ecb8d85f7b6d9e4e0b3dd04a1e3ddc5e0b89e25c4e9834e1de06b91538ef81a | ||
diff --git a/net-mail/notmuch/files/50notmuch-gentoo.el b/net-mail/notmuch/files/50notmuch-gentoo.el new file mode 100644 index 0000000..95e0624 --- /dev/null +++ b/net-mail/notmuch/files/50notmuch-gentoo.el | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | (add-to-list 'load-path "@SITELISP@") | ||
| 2 | (if (boundp 'image-load-path) | ||
| 3 | (add-to-list 'image-load-path "@SITEETC@" t)) | ||
| 4 | (autoload 'notmuch "notmuch" nil t) | ||
| 5 | (autoload 'notmuch-search "notmuch" nil t) | ||
| 6 | (autoload 'notmuch-hello "notmuch-hello" nil t) | ||
| 7 | (autoload 'notmuch-show "notmuch-show" nil t) | ||
diff --git a/net-mail/notmuch/files/notmuch-0.39-no-compress-man-pages.patch b/net-mail/notmuch/files/notmuch-0.39-no-compress-man-pages.patch new file mode 100644 index 0000000..2959545 --- /dev/null +++ b/net-mail/notmuch/files/notmuch-0.39-no-compress-man-pages.patch | |||
| @@ -0,0 +1,67 @@ | |||
| 1 | --- a/doc/Makefile.local | ||
| 2 | +++ b/doc/Makefile.local | ||
| 3 | @@ -25,8 +25,6 @@ MAN5_ROFF := $(patsubst $(srcdir)/doc/%,$(DOCBUILDDIR)/man/%,$(MAN5_RST:.rst=.5) | ||
| 4 | MAN7_ROFF := $(patsubst $(srcdir)/doc/%,$(DOCBUILDDIR)/man/%,$(MAN7_RST:.rst=.7)) | ||
| 5 | MAN_ROFF_FILES := $(MAN1_ROFF) $(MAN5_ROFF) $(MAN7_ROFF) | ||
| 6 | |||
| 7 | -MAN_GZIP_FILES := $(addsuffix .gz,${MAN_ROFF_FILES}) | ||
| 8 | - | ||
| 9 | MAN1_TEXI := $(patsubst $(srcdir)/doc/man1/%.rst,$(DOCBUILDDIR)/texinfo/%.texi,$(MAN1_RST)) | ||
| 10 | MAN5_TEXI := $(patsubst $(srcdir)/doc/man5/%.rst,$(DOCBUILDDIR)/texinfo/%.texi,$(MAN5_RST)) | ||
| 11 | MAN7_TEXI := $(patsubst $(srcdir)/doc/man7/%.rst,$(DOCBUILDDIR)/texinfo/%.texi,$(MAN7_RST)) | ||
| 12 | @@ -42,9 +40,6 @@ INFO_INFO_FILES := $(INFO_TEXI_FILES:.texi=.info) $(COPY_INFO1) | ||
| 13 | |||
| 14 | .PHONY: install-man build-man apidocs install-apidocs | ||
| 15 | |||
| 16 | -%.gz: % | ||
| 17 | - rm -f $@ && gzip --no-name --stdout $^ > $@ | ||
| 18 | - | ||
| 19 | ifeq ($(WITH_EMACS),1) | ||
| 20 | $(DOCBUILDDIR)/.roff.stamp $(DOCBUILDDIR)/.html.stamp $(DOCBUILDDIR)/.texi.stamp : docstring.stamp | ||
| 21 | endif | ||
| 22 | @@ -97,11 +92,11 @@ endif | ||
| 23 | install-man: install-apidocs | ||
| 24 | |||
| 25 | ifeq ($(HAVE_DOXYGEN),1) | ||
| 26 | -MAN_GZIP_FILES += ${APIMAN}.gz | ||
| 27 | +MAN_ROFF_FILES += ${APIMAN} | ||
| 28 | apidocs: $(APIMAN) | ||
| 29 | -install-apidocs: ${APIMAN}.gz | ||
| 30 | +install-apidocs: ${APIMAN} | ||
| 31 | mkdir -p "$(DESTDIR)$(mandir)/man3" | ||
| 32 | - install -m0644 $(filter %.3.gz,$(MAN_GZIP_FILES)) $(DESTDIR)/$(mandir)/man3 | ||
| 33 | + install -m0644 $(filter %.3,$(MAN_ROFF_FILES)) $(DESTDIR)/$(mandir)/man3 | ||
| 34 | |||
| 35 | $(APIMAN): $(dir)/config.dox $(srcdir)/$(dir)/doxygen.cfg $(srcdir)/lib/notmuch.h | ||
| 36 | mkdir -p $(DOCBUILDDIR)/man/man3 | ||
| 37 | @@ -123,16 +118,16 @@ else | ||
| 38 | |||
| 39 | # it should be safe to depend on the stamp file, because it is created | ||
| 40 | # after all roff files are moved into place. | ||
| 41 | -${MAN_GZIP_FILES}: ${DOCBUILDDIR}/.roff.stamp | ||
| 42 | +${MAN_ROFF_FILES}: ${DOCBUILDDIR}/.roff.stamp | ||
| 43 | |||
| 44 | -build-man: ${MAN_GZIP_FILES} | ||
| 45 | -install-man: ${MAN_GZIP_FILES} | ||
| 46 | +build-man: ${MAN_ROFF_FILES} | ||
| 47 | +install-man: ${MAN_ROFF_FILES} | ||
| 48 | mkdir -m0755 -p "$(DESTDIR)$(mandir)/man1" | ||
| 49 | mkdir -m0755 -p "$(DESTDIR)$(mandir)/man5" | ||
| 50 | mkdir -m0755 -p "$(DESTDIR)$(mandir)/man7" | ||
| 51 | - install -m0644 $(filter %.1.gz,$(MAN_GZIP_FILES)) $(DESTDIR)/$(mandir)/man1 | ||
| 52 | - install -m0644 $(filter %.5.gz,$(MAN_GZIP_FILES)) $(DESTDIR)/$(mandir)/man5 | ||
| 53 | - install -m0644 $(filter %.7.gz,$(MAN_GZIP_FILES)) $(DESTDIR)/$(mandir)/man7 | ||
| 54 | + install -m0644 $(filter %.1,$(MAN_ROFF_FILES)) $(DESTDIR)/$(mandir)/man1 | ||
| 55 | + install -m0644 $(filter %.5,$(MAN_ROFF_FILES)) $(DESTDIR)/$(mandir)/man5 | ||
| 56 | + install -m0644 $(filter %.7,$(MAN_ROFF_FILES)) $(DESTDIR)/$(mandir)/man7 | ||
| 57 | endif | ||
| 58 | |||
| 59 | ifneq ($(HAVE_SPHINX)$(HAVE_MAKEINFO),11) | ||
| 60 | @@ -158,6 +153,6 @@ $(dir)/config.dox: version.stamp | ||
| 61 | |||
| 62 | CLEAN := $(CLEAN) $(DOCBUILDDIR) $(DOCBUILDDIR)/.roff.stamp $(DOCBUILDDIR)/.texi.stamp | ||
| 63 | CLEAN := $(CLEAN) $(DOCBUILDDIR)/.html.stamp $(DOCBUILDDIR)/.info.stamp | ||
| 64 | -CLEAN := $(CLEAN) $(MAN_GZIP_FILES) $(MAN_ROFF_FILES) $(dir)/conf.pyc $(dir)/config.dox | ||
| 65 | +CLEAN := $(CLEAN) $(MAN_ROFF_FILES) $(MAN_ROFF_FILES) $(dir)/conf.pyc $(dir)/config.dox | ||
| 66 | |||
| 67 | CLEAN := $(CLEAN) $(dir)/__pycache__ | ||
diff --git a/net-mail/notmuch/files/notmuch-0.39-test-skip-debug-symbols.patch b/net-mail/notmuch/files/notmuch-0.39-test-skip-debug-symbols.patch new file mode 100644 index 0000000..f5a052e --- /dev/null +++ b/net-mail/notmuch/files/notmuch-0.39-test-skip-debug-symbols.patch | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | --- a/test/T000-basic.sh | ||
| 2 | +++ b/test/T000-basic.sh | ||
| 3 | @@ -71,8 +71,4 @@ test_expect_equal \ | ||
| 4 | "$(dirname ${TEST_DIRECTORY})" \ | ||
| 5 | "$(echo $PATH|cut -f1 -d: | sed -e 's,/test/valgrind/bin$,,')" | ||
| 6 | |||
| 7 | -test_begin_subtest 'notmuch is compiled with debugging symbols' | ||
| 8 | -readelf --sections $(command -v notmuch) | grep \.debug | ||
| 9 | -test_expect_equal 0 $? | ||
| 10 | - | ||
| 11 | test_done | ||
diff --git a/net-mail/notmuch/metadata.xml b/net-mail/notmuch/metadata.xml new file mode 100644 index 0000000..94b308d --- /dev/null +++ b/net-mail/notmuch/metadata.xml | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | <!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> | ||
| 3 | <pkgmetadata> | ||
| 4 | <!-- maintainer-needed --> | ||
| 5 | <use> | ||
| 6 | <flag name="apidoc">Provide doxygen generated API docs</flag> | ||
| 7 | <flag name="crypt">Support decryption and verification of PGP/MIME | ||
| 8 | messages and in Emacs UI - encryption; support also S/MIME | ||
| 9 | signature verification since version 0.22</flag> | ||
| 10 | <flag name="emacs">Install Emacs UI (the main one)</flag> | ||
| 11 | <flag name="mutt">Install helper script for Mutt</flag> | ||
| 12 | <flag name="nmbug">Install experimental tag sharing / | ||
| 13 | pseudo-bug-tracking script for Notmuch | ||
| 14 | (see http://notmuchmail.org/nmbug/)</flag> | ||
| 15 | </use> | ||
| 16 | <longdescription lang="en"> | ||
| 17 | Notmuch is a system for indexing, searching, reading, and tagging large | ||
| 18 | collections of email messages in maildir or mh format. It uses the | ||
| 19 | Xapian library to provide fast, full-text search with a convenient | ||
| 20 | search syntax. | ||
| 21 | </longdescription> | ||
| 22 | </pkgmetadata> | ||
diff --git a/net-mail/notmuch/notmuch-0.39.ebuild b/net-mail/notmuch/notmuch-0.39.ebuild new file mode 100644 index 0000000..9b989d6 --- /dev/null +++ b/net-mail/notmuch/notmuch-0.39.ebuild | |||
| @@ -0,0 +1,263 @@ | |||
| 1 | # Copyright 1999-2025 Gentoo Authors | ||
| 2 | # Distributed under the terms of the GNU General Public License v2 | ||
| 3 | |||
| 4 | EAPI=8 | ||
| 5 | |||
| 6 | DISTUTILS_EXT=1 | ||
| 7 | DISTUTILS_OPTIONAL=1 | ||
| 8 | DISTUTILS_USE_PEP517=setuptools | ||
| 9 | PYTHON_COMPAT=( python3_{11..14} pypy3_11 ) | ||
| 10 | |||
| 11 | inherit bash-completion-r1 desktop distutils-r1 elisp-common flag-o-matic pax-utils toolchain-funcs xdg-utils | ||
| 12 | |||
| 13 | DESCRIPTION="Thread-based e-mail indexer, supporting quick search and tagging" | ||
| 14 | HOMEPAGE="https://notmuchmail.org/" | ||
| 15 | SRC_URI=" | ||
| 16 | https://notmuchmail.org/releases/${P}.tar.xz | ||
| 17 | test? ( https://notmuchmail.org/releases/test-databases/database-v1.tar.xz ) | ||
| 18 | " | ||
| 19 | |||
| 20 | LICENSE="GPL-3" | ||
| 21 | # Sub-slot corresponds to major wersion of libnotmuch.so.X.Y. Bump of Y is | ||
| 22 | # meant to be binary backward compatible. | ||
| 23 | SLOT="0/5" | ||
| 24 | KEYWORDS="~alpha amd64 arm arm64 ~ppc64 ~riscv x86 ~x64-macos" | ||
| 25 | REQUIRED_USE=" | ||
| 26 | ${PYTHON_REQUIRED_USE} | ||
| 27 | nmbug? ( python ) | ||
| 28 | test? ( crypt emacs python ) | ||
| 29 | " | ||
| 30 | IUSE="apidoc crypt doc emacs mutt nmbug python test" | ||
| 31 | RESTRICT="!test? ( test )" | ||
| 32 | |||
| 33 | BDEPEND=" | ||
| 34 | app-arch/xz-utils[extra-filters(+)] | ||
| 35 | doc? ( dev-python/sphinx[${PYTHON_USEDEP}] ) | ||
| 36 | sys-apps/texinfo | ||
| 37 | virtual/pkgconfig | ||
| 38 | apidoc? ( | ||
| 39 | app-text/doxygen | ||
| 40 | dev-lang/perl | ||
| 41 | ) | ||
| 42 | python? ( | ||
| 43 | ${DISTUTILS_DEPS} | ||
| 44 | test? ( dev-python/pytest[${PYTHON_USEDEP}] ) | ||
| 45 | ) | ||
| 46 | test? ( | ||
| 47 | app-shells/bash | ||
| 48 | sys-process/parallel | ||
| 49 | ) | ||
| 50 | " | ||
| 51 | COMMON_DEPEND=" | ||
| 52 | dev-libs/glib | ||
| 53 | dev-libs/gmime:3.0[crypt] | ||
| 54 | >=dev-libs/xapian-1.4.0:= | ||
| 55 | sys-libs/talloc | ||
| 56 | sys-libs/zlib:= | ||
| 57 | emacs? ( >=app-editors/emacs-${NEED_EMACS}:* ) | ||
| 58 | python? ( | ||
| 59 | ${PYTHON_DEPS} | ||
| 60 | $(python_gen_cond_dep ' | ||
| 61 | dev-python/cffi[${PYTHON_USEDEP}] | ||
| 62 | ' 'python*') | ||
| 63 | ) | ||
| 64 | " | ||
| 65 | DEPEND=" | ||
| 66 | ${COMMON_DEPEND} | ||
| 67 | test? ( | ||
| 68 | >=app-editors/emacs-${NEED_EMACS}:*[libxml2] | ||
| 69 | app-misc/dtach | ||
| 70 | dev-debug/gdb[python] | ||
| 71 | crypt? ( | ||
| 72 | app-crypt/gnupg | ||
| 73 | dev-libs/openssl | ||
| 74 | ) | ||
| 75 | ) | ||
| 76 | " | ||
| 77 | |||
| 78 | RDEPEND=" | ||
| 79 | ${COMMON_DEPEND} | ||
| 80 | crypt? ( app-crypt/gnupg ) | ||
| 81 | mutt? ( | ||
| 82 | dev-perl/File-Which | ||
| 83 | dev-perl/Mail-Box | ||
| 84 | dev-perl/MailTools | ||
| 85 | dev-perl/Term-ReadLine-Gnu | ||
| 86 | virtual/perl-Digest-SHA | ||
| 87 | virtual/perl-File-Path | ||
| 88 | virtual/perl-Getopt-Long | ||
| 89 | dev-perl/Pod-Parser | ||
| 90 | ) | ||
| 91 | nmbug? ( dev-vcs/git ) | ||
| 92 | " | ||
| 93 | |||
| 94 | SITEFILE="50${PN}-gentoo.el" | ||
| 95 | |||
| 96 | PATCHES=( | ||
| 97 | "${FILESDIR}"/${PN}-0.39-no-compress-man-pages.patch | ||
| 98 | "${FILESDIR}"/${PN}-0.39-test-skip-debug-symbols.patch | ||
| 99 | ) | ||
| 100 | |||
| 101 | pkg_setup() { | ||
| 102 | use emacs && elisp-check-emacs-version | ||
| 103 | } | ||
| 104 | |||
| 105 | src_unpack() { | ||
| 106 | unpack "${P}".tar.xz | ||
| 107 | |||
| 108 | if use test; then | ||
| 109 | mkdir -p "${S}"/test/test-databases || die | ||
| 110 | cp "${DISTDIR}"/database-v1.tar.xz "${S}"/test/test-databases/ || die | ||
| 111 | fi | ||
| 112 | } | ||
| 113 | |||
| 114 | src_prepare() { | ||
| 115 | default | ||
| 116 | |||
| 117 | use python && distutils-r1_src_prepare | ||
| 118 | |||
| 119 | rm bindings/python-cffi/tox.ini || die | ||
| 120 | mv contrib/notmuch-mutt/README contrib/notmuch-mutt/README-mutt || die | ||
| 121 | |||
| 122 | # Non-autoconf configure | ||
| 123 | [[ ${CHOST} == *-solaris* ]] && append-ldflags '-lnsl' '-lsocket' | ||
| 124 | } | ||
| 125 | |||
| 126 | src_configure() { | ||
| 127 | python_setup # For sphinx | ||
| 128 | |||
| 129 | tc-export CC CXX | ||
| 130 | |||
| 131 | local myconf=( | ||
| 132 | --bashcompletiondir="$(get_bashcompdir)" | ||
| 133 | --emacslispdir="${EPREFIX}/${SITELISP}/${PN}" | ||
| 134 | --emacsetcdir="${EPREFIX}/${SITEETC}/${PN}" | ||
| 135 | --without-desktop | ||
| 136 | --without-ruby | ||
| 137 | --zshcompletiondir="${EPREFIX}/usr/share/zsh/site-functions" | ||
| 138 | $(use_with doc docs) # man pages, info pages | ||
| 139 | $(use_with apidoc api-docs) | ||
| 140 | $(use_with emacs) | ||
| 141 | ) | ||
| 142 | |||
| 143 | # FIXME: | ||
| 144 | # Checking for GMime session key extraction support... * ACCESS DENIED: open_wr: /dev/bus/usb/001/011 | ||
| 145 | # notmuch configure compiles a program _check_session_keys.c, inline in ./configure script | ||
| 146 | # gmime/gpg/scdaemon tries to open usb devices in GMime test | ||
| 147 | # we pretend to allow it, without actually allowing it to read or write. | ||
| 148 | # https://bugs.gentoo.org/821328 | ||
| 149 | addpredict /dev/bus/usb | ||
| 150 | |||
| 151 | econf "${myconf[@]}" | ||
| 152 | } | ||
| 153 | |||
| 154 | python_compile() { | ||
| 155 | pushd bindings/python-cffi > /dev/null || die | ||
| 156 | distutils-r1_python_compile | ||
| 157 | popd > /dev/null || die | ||
| 158 | } | ||
| 159 | |||
| 160 | src_compile() { | ||
| 161 | emake V=1 | ||
| 162 | use python && distutils-r1_src_compile | ||
| 163 | use mutt && emake -C contrib/notmuch-mutt notmuch-mutt.1 | ||
| 164 | } | ||
| 165 | |||
| 166 | python_test() { | ||
| 167 | pushd bindings/python-cffi > /dev/null || die | ||
| 168 | rm -rf notmuch2 || die | ||
| 169 | epytest tests || die -n | ||
| 170 | popd > /dev/null || die | ||
| 171 | } | ||
| 172 | |||
| 173 | src_test() { | ||
| 174 | local test_failures=() | ||
| 175 | |||
| 176 | # We run pytest via eclass phasefunc, so delete upstream launcher | ||
| 177 | rm test/T391-python-cffi.sh || die | ||
| 178 | |||
| 179 | # These both fail because of line wrapping in the output | ||
| 180 | rm test/T315-emacs-tagging.sh test/T310-emacs.sh || die | ||
| 181 | |||
| 182 | pax-mark -m notmuch | ||
| 183 | LD_LIBRARY_PATH="${S}/lib" nonfatal emake test \ | ||
| 184 | V=1 \ | ||
| 185 | OPTIONS="--verbose --tee" || test_failures+=( "'emake tests'" ) | ||
| 186 | pax-mark -ze notmuch | ||
| 187 | |||
| 188 | # Both lib and bin needed for testsuite | ||
| 189 | if use python; then | ||
| 190 | LD_LIBRARY_PATH="${S}/lib" \ | ||
| 191 | PATH="${S}:${PATH}" \ | ||
| 192 | nonfatal distutils-r1_src_test || test_failures+=( "'python tests'" ) | ||
| 193 | fi | ||
| 194 | |||
| 195 | [[ ${test_failures} ]] && die "Tests failed: ${test_failures[*]}" | ||
| 196 | } | ||
| 197 | |||
| 198 | python_install() { | ||
| 199 | pushd bindings/python-cffi > /dev/null || die | ||
| 200 | distutils-r1_python_install | ||
| 201 | popd > /dev/null || die | ||
| 202 | } | ||
| 203 | |||
| 204 | src_install() { | ||
| 205 | default | ||
| 206 | |||
| 207 | use python && distutils-r1_src_install | ||
| 208 | |||
| 209 | if use apidoc; then | ||
| 210 | # Rename overly generic manpage to avoid clashes | ||
| 211 | mv doc/_build/man/man3/deprecated.3 \ | ||
| 212 | doc/_build/man/man3/notmuch-deprecated.3 || die | ||
| 213 | fi | ||
| 214 | |||
| 215 | if use emacs; then | ||
| 216 | elisp-site-file-install "${FILESDIR}/${SITEFILE}" || die | ||
| 217 | domenu emacs/notmuch-emacs-mua.desktop | ||
| 218 | fi | ||
| 219 | |||
| 220 | if use nmbug; then | ||
| 221 | # TODO: those guys need proper deps | ||
| 222 | python_fix_shebang devel/nmbug/notmuch-report | ||
| 223 | dobin devel/nmbug/notmuch-report | ||
| 224 | fi | ||
| 225 | |||
| 226 | if use mutt; then | ||
| 227 | pushd contrib/notmuch-mutt > /dev/null || die | ||
| 228 | dobin notmuch-mutt | ||
| 229 | # This manpage is built by pod2man | ||
| 230 | doman notmuch-mutt.1 | ||
| 231 | insinto /etc/mutt | ||
| 232 | doins notmuch-mutt.rc | ||
| 233 | dodoc README-mutt | ||
| 234 | popd > /dev/null || die | ||
| 235 | fi | ||
| 236 | |||
| 237 | local DOCS=( README{,.rst} INSTALL NEWS ) | ||
| 238 | einstalldocs | ||
| 239 | } | ||
| 240 | |||
| 241 | pkg_preinst() { | ||
| 242 | local _rcfile="/etc/mutt/notmuch-mutt.rc" | ||
| 243 | if use mutt && ! [[ -e "${EROOT}"${_rcfile} ]]; then | ||
| 244 | elog "To enable notmuch support in mutt, add the following line" | ||
| 245 | elog "to your mutt config file:" | ||
| 246 | elog "" | ||
| 247 | elog " source ${_rcfile}" | ||
| 248 | fi | ||
| 249 | } | ||
| 250 | |||
| 251 | pkg_postinst() { | ||
| 252 | if use emacs; then | ||
| 253 | elisp-site-regen | ||
| 254 | xdg_desktop_database_update | ||
| 255 | fi | ||
| 256 | } | ||
| 257 | |||
| 258 | pkg_postrm() { | ||
| 259 | if use emacs; then | ||
| 260 | elisp-site-regen | ||
| 261 | xdg_desktop_database_update | ||
| 262 | fi | ||
| 263 | } | ||
