diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-06-15 14:57:03 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-06-15 14:57:03 +0100 |
commit | d18bf1e01b65ee4bf0c804e2843b282d3d4e5d7c (patch) | |
tree | 4a95cbc6ffdf13bad6ecbc7f8d5af99631984123 /dev-lang/lfe/lfe-2.0.ebuild | |
parent | e748ba9741f6540f4675c23e3e37b73e822c13a4 (diff) |
gentoo resync : 15.06.2021
Diffstat (limited to 'dev-lang/lfe/lfe-2.0.ebuild')
-rw-r--r-- | dev-lang/lfe/lfe-2.0.ebuild | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/dev-lang/lfe/lfe-2.0.ebuild b/dev-lang/lfe/lfe-2.0.ebuild new file mode 100644 index 000000000000..a9f7eefb698e --- /dev/null +++ b/dev-lang/lfe/lfe-2.0.ebuild @@ -0,0 +1,74 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit elisp-common toolchain-funcs + +DESCRIPTION="Lisp-flavoured Erlang" +HOMEPAGE="http://lfe.github.io/" +SRC_URI="https://github.com/rvirding/lfe/archive/v${PV}.zip -> ${P}.zip" + +if [[ "${PV}" == *9999* ]]; then + inherit git-r3 + EGIT_BRANCH="develop" + EGIT_REPO_URI="https://github.com/rvirding/${PN}.git" +else + SRC_URI="https://github.com/rvirding/${PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +RESTRICT="mirror test" +LICENSE="Apache-2.0" +SLOT="0" +IUSE="doc emacs" + +BDEPEND="app-arch/unzip" +RDEPEND=" + dev-lang/erlang +" +DEPEND=" + ${RDEPEND} + doc? ( app-text/pandoc ) +" + +SITEFILE="70${PN}-gentoo.el" + +src_prepare() { + default + + sed -i "s|cc |$(tc-getCC) ${CFLAGS} |g" ./Makefile \ + || die "Failed to fix the makefile" +} + +src_compile() { + emake compile + + use doc && emake docs + use emacs && emake emacs +} + +src_install() { + dodir "/usr/$(get_libdir)/erlang/lib/lfe/ebin/" + cp -R ./ebin "${D}/usr/$(get_libdir)/erlang/lib/lfe/" + dobin ./bin/* + + if use doc; then + dodoc ./doc/*.txt + doman ./doc/man/* + fi + + if use emacs; then + elisp-install lfe emacs/* \ + || die "elisp-install failed" + elisp-site-file-install "${FILESDIR}/${SITEFILE}" + fi +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} |