app-emacs/bbdb: amd64 stable wrt bug #692934
[gentoo.git] / app-emacs / bbdb / bbdb-3.1.2-r1.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 autotools
7
8 DESCRIPTION="The Insidious Big Brother Database"
9 HOMEPAGE="https://savannah.nongnu.org/projects/bbdb/"
10 SRC_URI="http://download.savannah.gnu.org/releases/${PN}/${P}.tar.gz"
11
12 LICENSE="GPL-3+ GPL-1+ FDL-1.3+"
13 SLOT="0"
14 KEYWORDS="amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris"
15 IUSE="tex vm"
16 RESTRICT="test" #631700
17
18 BDEPEND="vm? ( app-emacs/vm )"
19 RDEPEND="${BDEPEND}
20         tex? ( virtual/tex-base )"
21
22 SITEFILE="50${PN}-gentoo-${PV}.el"
23 TEXMF="/usr/share/texmf-site"
24
25 src_prepare() {
26         eapply "${FILESDIR}"/${P}-no-init.patch
27         eapply_user
28         eautoreconf
29 }
30
31 src_configure() {
32         econf \
33                 --with-lispdir="${EPREFIX}${SITELISP}/${PN}" \
34                 "$(use_with vm vm-dir "${EPREFIX}${SITELISP}/vm")"
35 }
36
37 src_compile() {
38         emake -C lisp
39 }
40
41 src_install() {
42         emake -C lisp DESTDIR="${D}" install
43         elisp-site-file-install "${FILESDIR}/${SITEFILE}"
44         doinfo doc/*.info*
45         dodoc AUTHORS ChangeLog NEWS README TODO
46
47         if use tex; then
48                 insinto "${TEXMF}"/tex/plain/${PN}
49                 doins tex/*.tex
50         fi
51 }
52
53 pkg_postinst() {
54         elisp-site-regen
55         use tex && texconfig rehash
56 }
57
58 pkg_postrm() {
59         elisp-site-regen
60         use tex && texconfig rehash
61 }