app-emacs/nxml-gentoo-schemas: Version bump to 20200229.
[gentoo.git] / app-emacs / vm / vm-9999.ebuild
1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 inherit elisp bzr autotools
7
8 DESCRIPTION="The VM mail reader for Emacs"
9 HOMEPAGE="http://www.nongnu.org/viewmail/"
10 EBZR_REPO_URI="lp:vm"
11
12 LICENSE="GPL-2+"
13 SLOT="0"
14 IUSE="bbdb ssl"
15
16 BDEPEND="bbdb? ( app-emacs/bbdb )"
17 RDEPEND="${BDEPEND}
18         ssl? ( net-misc/stunnel )"
19 BDEPEND="${BDEPEND}
20         sys-apps/texinfo"
21
22 SITEFILE="50${PN}-gentoo.el"
23
24 src_prepare() {
25         eapply "${FILESDIR}"/vm-8.2.0_beta-texinfo-encoding.patch
26         if ! use bbdb; then
27                 elog "Excluding vm-pcrisis.el since the \"bbdb\" USE flag is not set."
28                 eapply "${FILESDIR}/${PN}-8.0-no-pcrisis.patch"
29         fi
30         eapply_user
31         eautoreconf
32 }
33
34 src_configure() {
35         econf \
36                 --with-emacs="emacs" \
37                 --with-lispdir="${SITELISP}/${PN}" \
38                 --with-etcdir="${SITEETC}/${PN}" \
39                 --with-docdir="/usr/share/doc/${PF}" \
40                 $(use bbdb && echo "--with-other-dirs=${SITELISP}/bbdb")
41 }
42
43 src_compile() {
44         emake -j1
45 }
46
47 src_install() {
48         emake -j1 DESTDIR="${D}" install
49         elisp-site-file-install "${FILESDIR}/${SITEFILE}"
50
51         # delete duplicate documentation
52         find "${D}/${SITEETC}/${PN}" -type d -name pixmaps -prune \
53                 -o -type f -exec rm '{}' '+' || die
54
55         dodoc example.vm
56         # NEWS is accessed from lisp and must not be compressed
57         docompress -x /usr/share/doc/${PF}/NEWS
58 }