Gentoo Archives: gentoo-commits

From: Alfredo Tupone <tupone@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-ml/merlin/, dev-ml/merlin/files/
Date: Thu, 14 Oct 2021 20:31:58
Message-Id: 1634243505.159e2e33cbd7462cf7c42615dbb741823a4623d1.tupone@gentoo
1 commit: 159e2e33cbd7462cf7c42615dbb741823a4623d1
2 Author: Alfredo Tupone <tupone <AT> gentoo <DOT> org>
3 AuthorDate: Thu Oct 14 20:31:14 2021 +0000
4 Commit: Alfredo Tupone <tupone <AT> gentoo <DOT> org>
5 CommitDate: Thu Oct 14 20:31:45 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=159e2e33
7
8 dev-ml/merlin: bump to 4.2
9
10 Package-Manager: Portage-3.0.20, Repoman-3.0.3
11 Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>
12
13 dev-ml/merlin/Manifest | 1 +
14 dev-ml/merlin/files/merlin-4.2-ocaml-4.12.patch | 30 +++++++++
15 dev-ml/merlin/merlin-4.2.ebuild | 82 +++++++++++++++++++++++++
16 3 files changed, 113 insertions(+)
17
18 diff --git a/dev-ml/merlin/Manifest b/dev-ml/merlin/Manifest
19 index 22bfea096e9..2cc2c5d29fb 100644
20 --- a/dev-ml/merlin/Manifest
21 +++ b/dev-ml/merlin/Manifest
22 @@ -1,2 +1,3 @@
23 DIST merlin-3.4.2.tar.gz 11016272 BLAKE2B 6fa55423df7ae8f7a8056e90be630f148dd101194de1921605843caf805bd6c9694fa3fe5b8c2f8eff5d57d7d0e9d8653036b6165a49af655158925c7af87d2f SHA512 8225366ebf27ca656ca89fe00d5aec581487ae332aeab81568e7606eaf575648a7614d4d2de8e0757a4e69c6f4014fefa4574c95da13d42acb310c9dd58a468a
24 DIST merlin-4.1.tar.gz 2136082 BLAKE2B 3e7e1996611f0cefb3a33b2a78cd36b6e8b84d48bc48f46c45ba340c4be1b93b4a1876f8f4192e911c1c384c416ad7502ba3c7a2abb72eff01215f9fb26bfaf0 SHA512 f0f3ada007f8214b97a8557bddca87eded48ee01a8bb88aba6476e52881ead52d9f47e2666a9292b5c6a490e4cfdc7d8bb322e8489f78eaac7b0f80b6d1e87bc
25 +DIST merlin-4.2-411.tar.gz 1601588 BLAKE2B 348b48ccf2b209bb511450e4ba46ceb3639b1a5facd70bec4519369907e162e95575fa101aa1b79c56719927272a4feebf981692ea2bcb2299fc2c284833b1be SHA512 9ca8d3690621019b8213abcc1a32e1d754b93849f0bbd79bcab3a14915acc295eb60a7b68e997a75e777daaef83d5ca3e81944b7baf352dc4cce8480905ea2d7
26
27 diff --git a/dev-ml/merlin/files/merlin-4.2-ocaml-4.12.patch b/dev-ml/merlin/files/merlin-4.2-ocaml-4.12.patch
28 new file mode 100644
29 index 00000000000..f0d0c430193
30 --- /dev/null
31 +++ b/dev-ml/merlin/files/merlin-4.2-ocaml-4.12.patch
32 @@ -0,0 +1,30 @@
33 +diff -u merlin-4.2-411/dot-merlin-reader.opam merlin-4.2-412/dot-merlin-reader.opam
34 +--- merlin-4.2-411/dot-merlin-reader.opam 2021-04-13 11:01:00.000000000 +0200
35 ++++ merlin-4.2-412/dot-merlin-reader.opam 2021-04-13 10:53:39.000000000 +0200
36 +@@ -10,10 +10,12 @@
37 + ["dune" "build" "-p" name "-j" jobs]
38 + ]
39 + depends: [
40 +- "ocaml" {>= "4.02.1" & < "4.12"}
41 +- "dune" {>= "1.8.0"}
42 ++ "ocaml" {>= "4.06.1" }
43 ++ "dune" {>= "2.7.0"}
44 + "yojson" {>= "1.6.0"}
45 + "ocamlfind" {>= "1.6.0"}
46 + "csexp" {>= "1.2.3"}
47 + "result" {>= "1.5"}
48 + ]
49 ++description:
50 ++ "Helper process: reads .merlin files and gives the normalized content to merlin"
51 +diff -u merlin-4.2-411/merlin.opam merlin-4.2-412/merlin.opam
52 +--- merlin-4.2-411/merlin.opam 2021-04-13 11:01:00.000000000 +0200
53 ++++ merlin-4.2-412/merlin.opam 2021-04-13 10:53:39.000000000 +0200
54 +@@ -10,7 +10,7 @@
55 + ["dune" "runtest" "-p" "merlin,dot-merlin-reader" "-j" "1"] {with-test}
56 + ]
57 + depends: [
58 +- "ocaml" {>= "4.11.0" & < "4.12"}
59 ++ "ocaml" {>= "4.12" & < "4.13"}
60 + "dune" {>= "2.7.0"}
61 + "dot-merlin-reader" {>= "4.0"}
62 + "yojson" {>= "1.6.0"}
63
64 diff --git a/dev-ml/merlin/merlin-4.2.ebuild b/dev-ml/merlin/merlin-4.2.ebuild
65 new file mode 100644
66 index 00000000000..e3b8f11d972
67 --- /dev/null
68 +++ b/dev-ml/merlin/merlin-4.2.ebuild
69 @@ -0,0 +1,82 @@
70 +# Copyright 1999-2021 Gentoo Authors
71 +# Distributed under the terms of the GNU General Public License v2
72 +
73 +EAPI=7
74 +
75 +# TODO: vim-plugin, although it's not clear how to make it work here
76 +inherit elisp-common dune
77 +
78 +DESCRIPTION="Context sensitive completion for OCaml in Vim and Emacs"
79 +HOMEPAGE="https://github.com/ocaml/merlin"
80 +SRC_URI="https://github.com/ocaml/merlin/archive/v${PV}-411.tar.gz -> ${P}-411.tar.gz"
81 +
82 +LICENSE="MIT"
83 +SLOT="0/${PV}"
84 +KEYWORDS="~amd64"
85 +IUSE="emacs +ocamlopt test"
86 +RESTRICT="!test? ( test )"
87 +
88 +RDEPEND="
89 + dev-ml/csexp:=
90 + dev-ml/yojson:=
91 + dev-ml/menhir:=
92 + || (
93 + dev-lang/ocaml:0/4.11
94 + dev-lang/ocaml:0/4.12
95 + )
96 + emacs? (
97 + >=app-editors/emacs-23.1:*
98 + app-emacs/auto-complete
99 + app-emacs/company-mode
100 + )
101 +"
102 +DEPEND="${RDEPEND}
103 + test? ( app-misc/jq )"
104 +
105 +SITEFILE="50${PN}-gentoo.el"
106 +
107 +S="${WORKDIR}"/${P}-411
108 +
109 +src_prepare() {
110 + has_version "dev-lang/ocaml:0/4.12" && \
111 + eapply "${FILESDIR}"/${P}-ocaml-4.12.patch
112 + default
113 +
114 + # Handle installation via the eclass
115 + rm emacs/dune || die
116 +
117 + # rm failing test
118 + rm -r tests/test-dirs/locate/context-detection/cd-mod_constr.t || die
119 +}
120 +
121 +src_compile() {
122 + dune build @install
123 +
124 + if use emacs ; then
125 + # Build the emacs integration
126 + cd emacs || die
127 +
128 + # iedit isn't packaged yet
129 + rm merlin-iedit.el || die
130 +
131 + elisp-compile *.el
132 + fi
133 +}
134 +
135 +src_install() {
136 + dune_src_install
137 +
138 + if use emacs ; then
139 + cd "${S}/emacs" || die
140 + elisp-install ${PN} *.el *.elc
141 + elisp-site-file-install "${FILESDIR}/${SITEFILE}"
142 + fi
143 +}
144 +
145 +pkg_postinst() {
146 + use emacs && elisp-site-regen
147 +}
148 +
149 +pkg_postrm() {
150 + use emacs && elisp-site-regen
151 +}