app-editors/vscodium: add 1.97.0.25037
[gentoo/gentoo.git] / dev-lang / lfe / lfe-2.0.1.ebuild
blobfd1496d1343c4a79b39f2cfcfa20ffcd39f41e96
1 # Copyright 1999-2023 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 EAPI=8
6 inherit elisp-common toolchain-funcs
8 DESCRIPTION="Lisp-flavoured Erlang"
9 HOMEPAGE="http://lfe.github.io/"
11 if [[ "${PV}" == *9999* ]]; then
12         inherit git-r3
13         EGIT_BRANCH="develop"
14         EGIT_REPO_URI="https://github.com/rvirding/${PN}.git"
15 else
16         SRC_URI="https://github.com/rvirding/${PN}/archive/refs/tags/${PV}.tar.gz
17                 -> ${P}.tar.gz"
18         KEYWORDS="~amd64 ~x86"
21 RESTRICT="mirror test"
22 LICENSE="Apache-2.0"
23 SLOT="0"
24 IUSE="doc emacs"
26 RDEPEND="
27         dev-lang/erlang
29 DEPEND="
30         ${RDEPEND}
31         doc? ( virtual/pandoc )
34 SITEFILE="70${PN}-gentoo.el"
36 src_prepare() {
37         default
39         sed -i "s|cc |$(tc-getCC) ${CFLAGS} |g" ./Makefile \
40                 || die "Failed to fix the makefile"
43 src_compile() {
44         emake compile
46         use doc && emake docs
47         use emacs && emake emacs
50 src_install() {
51         dodir "/usr/$(get_libdir)/erlang/lib/lfe/ebin/"
52         cp -R ./ebin "${D}/usr/$(get_libdir)/erlang/lib/lfe/"
53         dobin ./bin/*
55         if use doc; then
56                 dodoc ./doc/*.txt
57                 doman ./doc/man/*
58         fi
60         if use emacs; then
61                 elisp-install lfe emacs/* \
62                         || die "elisp-install failed"
63                 elisp-site-file-install "${FILESDIR}/${SITEFILE}"
64         fi
67 pkg_postinst() {
68         use emacs && elisp-site-regen
71 pkg_postrm() {
72         use emacs && elisp-site-regen