commit: 9b70a6dd5d643a058947703c75a50f40ef1797d8 Author: Alfredo Tupone <tupone <AT> gentoo <DOT> org> AuthorDate: Tue Mar 22 07:40:38 2022 +0000 Commit: Alfredo Tupone <tupone <AT> gentoo <DOT> org> CommitDate: Tue Mar 22 07:40:38 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9b70a6dd
app-misc/ledit: fix build with newer ocaml Closes: https://bugs.gentoo.org/772347 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org> app-misc/ledit/files/ledit-2.04-ocaml4.09.patch | 34 +++++++++++++++++++++++++ app-misc/ledit/ledit-2.04.ebuild | 2 ++ 2 files changed, 36 insertions(+) diff --git a/app-misc/ledit/files/ledit-2.04-ocaml4.09.patch b/app-misc/ledit/files/ledit-2.04-ocaml4.09.patch new file mode 100644 index 000000000000..2ececde9e922 --- /dev/null +++ b/app-misc/ledit/files/ledit-2.04-ocaml4.09.patch @@ -0,0 +1,34 @@ +diff --git a/ext/pa_def.ml b/ext/pa_def.ml +index 812240d..871bfe2 100644 +--- a/ext/pa_def.ml ++++ b/ext/pa_def.ml +@@ -33,7 +33,7 @@ value subst mloc env = + loop where rec loop = + fun + [ <:expr< let $opt:rf$ $list:pel$ in $e$ >> -> +- let pel = List.map (fun (p, e) -> (p, loop e)) pel in ++ let pel = List.map (fun (p, e, al) -> (p, loop e, al)) pel in + <:expr< let $opt:rf$ $list:pel$ in $loop e$ >> + | <:expr< if $e1$ then $e2$ else $e3$ >> -> + <:expr< if $loop e1$ then $loop e2$ else $loop e3$ >> +diff --git a/ext/pa_local.ml b/ext/pa_local.ml +index b65704d..3ef9cd1 100644 +--- a/ext/pa_local.ml ++++ b/ext/pa_local.ml +@@ -23,13 +23,15 @@ value expr_of_patt p = + | _ -> Stdpp.raise_with_loc loc (Stream.Error "identifier expected") ] + ; + ++value fst3 (a,b,c) = a ; ++ + EXTEND + str_item: + [ [ "local"; rf = [ "rec" -> True | -> False ]; + lb = LIST1 let_binding SEP "and"; "in"; "value"; + rf1 = [ "rec" -> True | -> False ]; + lb1 = LIST1 let_binding SEP "and" -> +- let pl = List.map fst lb1 in ++ let pl = List.map fst3 lb1 in + let el = List.map expr_of_patt pl in + <:str_item< + value ($list:pl$) = diff --git a/app-misc/ledit/ledit-2.04.ebuild b/app-misc/ledit/ledit-2.04.ebuild index 211bc15f3c27..617592ad1b50 100644 --- a/app-misc/ledit/ledit-2.04.ebuild +++ b/app-misc/ledit/ledit-2.04.ebuild @@ -22,6 +22,8 @@ RDEPEND="${DEPEND}" # https://github.com/gentoo/gentoo/pull/14865#issuecomment-605697524 QA_FLAGS_IGNORED="/usr/bin/ledit" +PATCHES=( "${FILESDIR}"/${P}-ocaml4.09.patch ) + src_compile() { emake -j1 all if use ocamlopt; then