blob: a82e2c491ad3e79239bac35892e3d5dc476acb24 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit elisp
DESCRIPTION="An Emacs minor mode for incremental viewing of LaTeX documents"
HOMEPAGE="http://cristal.inria.fr/whizzytex/"
SRC_URI="http://cristal.inria.fr/${PN}/${P}.tgz"
LICENSE="GPL-2+"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="doc examples gv xdvi"
RDEPEND="virtual/latex-base
xdvi? ( app-text/xdvik )
gv? ( app-text/gv )
!xdvi? ( !gv? ( app-text/xdvik ) )"
DEPEND="${RDEPEND}"
SITEFILE="50${PN}-gentoo.el"
TEXMF="/usr/share/texmf-site"
src_configure() {
local xdvi gv
use xdvi && xdvi=/usr/bin/xdvi
use gv && gv=/usr/bin/gv
if [[ -z ${xdvi}${gv} ]]; then
ewarn "No previewer defined (USE=\"-xdvi -gv\"), enabling xdvi"
xdvi=/usr/bin/xdvi
fi
# hand-crafted configure, econf doesn't work
./configure \
-prefix /usr \
-emacsdir "${SITELISP}/${PN}" \
-latexdir "${TEXMF}/tex/latex/${PN}" \
-docdir /usr/share/doc/${PF} \
-initex "pdfetex -ini" \
-advi false \
-xdvi ${xdvi:-false} \
-gv ${gv:-false} \
-emacs emacs \
-xemacs "" \
-elc \
|| die "configure failed"
# disable XEmacs support (not completely possible in configure)
sed -i -e "/^XEMACSDIR/s/=.*/=/" Makefile.config || die
}
src_compile() {
# config.force is needed, otherwise checkconfig will try to call xdvi etc
emake config.force
emake all
}
src_install() {
emake DESTDIR="${D}" install
rm -f "${ED}"/usr/share/doc/${PF}/{COPYING,GPL}
elisp-site-file-install "${FILESDIR}/${SITEFILE}"
dodoc CHANGES
if use doc; then
dodoc doc/whizzytex.{ps,pdf}
fi
if use examples; then
insinto /usr/share/doc/${PF}
doins -r examples
fi
}
|