summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-03-19 09:51:07 +0000
committerSam James <sam@gentoo.org>2021-03-19 10:23:45 +0000
commit9654bbac4ee1a823d76fb5ae9924b2fbf7b1efdd (patch)
tree4d4d57c600d7fc8162b12eeaa2c185c5e7b529d2 /dev-ml/merlin
parentdev-libs/libindicator: fix tests (diff)
downloadgentoo-9654bbac4ee1a823d76fb5ae9924b2fbf7b1efdd.tar.gz
gentoo-9654bbac4ee1a823d76fb5ae9924b2fbf7b1efdd.tar.bz2
gentoo-9654bbac4ee1a823d76fb5ae9924b2fbf7b1efdd.zip
dev-ml/merlin: add 3.4.2 (initial import)
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-ml/merlin')
-rw-r--r--dev-ml/merlin/Manifest2
-rw-r--r--dev-ml/merlin/files/50merlin-gentoo.el4
-rw-r--r--dev-ml/merlin/merlin-3.4.2.ebuild68
-rw-r--r--dev-ml/merlin/metadata.xml11
4 files changed, 85 insertions, 0 deletions
diff --git a/dev-ml/merlin/Manifest b/dev-ml/merlin/Manifest
new file mode 100644
index 000000000000..22bfea096e99
--- /dev/null
+++ b/dev-ml/merlin/Manifest
@@ -0,0 +1,2 @@
+DIST merlin-3.4.2.tar.gz 11016272 BLAKE2B 6fa55423df7ae8f7a8056e90be630f148dd101194de1921605843caf805bd6c9694fa3fe5b8c2f8eff5d57d7d0e9d8653036b6165a49af655158925c7af87d2f SHA512 8225366ebf27ca656ca89fe00d5aec581487ae332aeab81568e7606eaf575648a7614d4d2de8e0757a4e69c6f4014fefa4574c95da13d42acb310c9dd58a468a
+DIST merlin-4.1.tar.gz 2136082 BLAKE2B 3e7e1996611f0cefb3a33b2a78cd36b6e8b84d48bc48f46c45ba340c4be1b93b4a1876f8f4192e911c1c384c416ad7502ba3c7a2abb72eff01215f9fb26bfaf0 SHA512 f0f3ada007f8214b97a8557bddca87eded48ee01a8bb88aba6476e52881ead52d9f47e2666a9292b5c6a490e4cfdc7d8bb322e8489f78eaac7b0f80b6d1e87bc
diff --git a/dev-ml/merlin/files/50merlin-gentoo.el b/dev-ml/merlin/files/50merlin-gentoo.el
new file mode 100644
index 000000000000..fbbbf2019411
--- /dev/null
+++ b/dev-ml/merlin/files/50merlin-gentoo.el
@@ -0,0 +1,4 @@
+(push "@SLITELISP@" load-path) ; directory containing merlin.el
+(autoload 'merlin-mode "merlin" "Merlin mode" t)
+(add-hook 'tuareg-mode-hook 'merlin-mode)
+(add-hook 'caml-mode-hook 'merlin-mode)
diff --git a/dev-ml/merlin/merlin-3.4.2.ebuild b/dev-ml/merlin/merlin-3.4.2.ebuild
new file mode 100644
index 000000000000..6a56c013b530
--- /dev/null
+++ b/dev-ml/merlin/merlin-3.4.2.ebuild
@@ -0,0 +1,68 @@
+# 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.09:=
+ <dev-lang/ocaml-4.12:=
+ 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
+}
diff --git a/dev-ml/merlin/metadata.xml b/dev-ml/merlin/metadata.xml
new file mode 100644
index 000000000000..fe5fd4f15a0a
--- /dev/null
+++ b/dev-ml/merlin/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>ml@gentoo.org</email>
+ <name>ML</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">ocaml/merlin</remote-id>
+ </upstream>
+</pkgmetadata>