commit: e90cd3a78292328d6011bb750cadf46c8bef72b8 Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Fri Mar 19 09:51:42 2021 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Fri Mar 19 10:23:46 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e90cd3a7
dev-ml/merlin: add 4.1 Signed-off-by: Sam James <sam <AT> gentoo.org> dev-ml/merlin/merlin-4.1.ebuild | 67 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/dev-ml/merlin/merlin-4.1.ebuild b/dev-ml/merlin/merlin-4.1.ebuild new file mode 100644 index 00000000000..44da757af90 --- /dev/null +++ b/dev-ml/merlin/merlin-4.1.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +# TODO: vim-plugin, although it's not clear how to make it work here +inherit elisp-common dune + +DESCRIPTION="Context sensitive completion for OCaml in Vim and Emacs" +HOMEPAGE="https://github.com/ocaml/merlin" +SRC_URI="https://github.com/ocaml/merlin/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0/${PV}" +KEYWORDS="~amd64" +IUSE="emacs +ocamlopt" + +RDEPEND=" + app-emacs/auto-complete + app-emacs/company-mode + dev-ml/csexp:= + dev-ml/yojson:= + =dev-lang/ocaml-4.11*:= + emacs? ( >=app-editors/emacs-23.1:* ) +" +DEPEND="${RDEPEND}" + +SITEFILE="50${PN}-gentoo.el" + +src_prepare() { + default + + # Handle installation via the eclass + rm emacs/dune || die +} + +src_compile() { + dune_src_compile + + if use emacs ; then + # Build the emacs integration + cd emacs || die + + # iedit isn't packaged yet + rm merlin-iedit.el || die + + elisp-compile *.el + fi +} + +src_install() { + dune_src_install + + if use emacs ; then + cd "${S}/emacs" || die + elisp-install ${PN} *.el *.elc + elisp-site-file-install "${FILESDIR}/${SITEFILE}" + fi +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +}