dev-qt/qtx11extras: stable 5.14.2 for ppc, bug #719732
[gentoo.git] / dev-lang / lisaac / lisaac-0.13.1-r2.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 inherit elisp-common toolchain-funcs
7
8 DESCRIPTION="An object prototype based language"
9 HOMEPAGE="http://isaacproject.u-strasbg.fr/li.html"
10 SRC_URI="http://isaacproject.u-strasbg.fr/download/${P}.tar.gz"
11
12 LICENSE="GPL-3"
13 SLOT="0"
14 KEYWORDS="~amd64 ~x86"
15 IUSE="vim-syntax emacs examples"
16
17 DEPEND="vim-syntax? ( app-editors/vim )
18         emacs? ( >=app-editors/emacs-23.1 )"
19
20 RDEPEND="${DEPEND}"
21
22 SITEFILE=50${PN}-gentoo.el
23
24 src_prepare() {
25         default
26         eapply "${FILESDIR}/${P}-makefile.patch"
27         rm lib/number/essai || die
28 }
29
30 src_compile() {
31         emake CC="$(tc-getCC)"
32
33         use emacs elisp-compile editor/emacs/lisaac-mode.el
34 }
35
36 src_install() {
37         emake DESTDIR="${D}" DOC="/usr/share/doc/${PF}" install
38
39         gzip -d "${D}"/usr/share/man/man1/{lisaac,shorter}.1.gz || die
40
41         if use vim-syntax; then
42                 insinto /usr/share/vim/vimfiles/syntax/
43                 doins editor/vim/syntax/lisaac.vim
44                 insinto /usr/share/vim/vimfiles/indent/
45                 doins editor/vim/indent/lisaac.vim
46         fi
47
48         if use emacs; then
49                 elisp-install ${PN} editor/emacs/*.{el,elc}
50                 elisp-site-file-install "${FILESDIR}"/${SITEFILE}
51         fi
52
53         if use examples; then
54                 dodir /usr/share/${PN}
55                 cp -r example "${ED}"/usr/share/${PN}/examples || die
56         fi
57 }
58
59 pkg_postinst() {
60         if use vim-syntax; then
61                 elog "Add the following line to your vimrc if you want"
62                 elog "to enable the lisaac support :"
63                 elog
64                 elog "au BufNewFile,BufRead *.li setf lisaac"
65         fi
66
67         use emacs && elisp-site-regen
68 }
69
70 pkg_postrm() {
71         use emacs && elisp-site-regen
72 }