commit: e7b8b57321a46b7179e273ebdbb6e3b9bc16b140 Author: Alfredo Tupone <tupone <AT> gentoo <DOT> org> AuthorDate: Fri Jul 11 17:05:12 2025 +0000 Commit: Alfredo Tupone <tupone <AT> gentoo <DOT> org> CommitDate: Fri Jul 11 17:05:45 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e7b8b573
dev-ml/lwt: fix build with ppxlib-0.36.0 Closes: https://bugs.gentoo.org/959806 Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org> dev-ml/lwt/files/lwt-5.9.1-ppxlib.patch | 36 ++++++++++++++++++++++ .../lwt/{lwt-5.9.1.ebuild => lwt-5.9.1-r1.ebuild} | 16 +++++----- 2 files changed, 45 insertions(+), 7 deletions(-) diff --git a/dev-ml/lwt/files/lwt-5.9.1-ppxlib.patch b/dev-ml/lwt/files/lwt-5.9.1-ppxlib.patch new file mode 100644 index 000000000000..77145903c378 --- /dev/null +++ b/dev-ml/lwt/files/lwt-5.9.1-ppxlib.patch @@ -0,0 +1,36 @@ +--- a/src/ppx/ppx_lwt.ml 2025-07-11 18:54:31.821983681 +0200 ++++ b/src/ppx/ppx_lwt.ml 2025-07-11 18:57:23.788153921 +0200 +@@ -144,12 +144,12 @@ + match exns with + | [] -> + let loc = !default_loc in +- [%expr Lwt.bind [%e e] [%e pexp_function ~loc cases]] ++ [%expr Lwt.bind [%e e] [%e pexp_function_cases ~loc cases]] + | _ -> + let loc = !default_loc in + [%expr Lwt.try_bind (fun () -> [%e e]) +- [%e pexp_function ~loc cases] +- [%e pexp_function ~loc exns]] ++ [%e pexp_function_cases ~loc cases] ++ [%e pexp_function_cases ~loc exns]] + in + Some (mapper#expression { new_exp with pexp_attributes }) + +@@ -223,7 +223,7 @@ + Lwt.backtrace_catch + (fun exn -> try Lwt.reraise exn with exn -> exn) + (fun () -> [%e expr]) +- [%e pexp_function ~loc cases] ++ [%e pexp_function_cases ~loc cases] + ] + in + Some (mapper#expression { new_exp with pexp_attributes }) +@@ -248,7 +248,7 @@ + in + let new_exp = + let loc = !default_loc in +- [%expr Lwt.bind [%e cond] [%e pexp_function ~loc cases]] ++ [%expr Lwt.bind [%e cond] [%e pexp_function_cases ~loc cases]] + in + Some (mapper#expression { new_exp with pexp_attributes }) + diff --git a/dev-ml/lwt/lwt-5.9.1.ebuild b/dev-ml/lwt/lwt-5.9.1-r1.ebuild similarity index 76% rename from dev-ml/lwt/lwt-5.9.1.ebuild rename to dev-ml/lwt/lwt-5.9.1-r1.ebuild index 68a1d6c33b92..ed3b7eb04290 100644 --- a/dev-ml/lwt/lwt-5.9.1.ebuild +++ b/dev-ml/lwt/lwt-5.9.1-r1.ebuild @@ -16,13 +16,13 @@ IUSE="+ocamlopt" DEPEND=" dev-libs/libev - dev-ml/luv:= - dev-ml/mmap:= - dev-ml/ocplib-endian:= - dev-ml/ppx_let:= - dev-ml/ppxlib:= + dev-ml/luv:=[ocamlopt?] + dev-ml/mmap:=[ocamlopt?] + dev-ml/ocplib-endian:=[ocamlopt?] + dev-ml/ppx_let:=[ocamlopt?] + dev-ml/ppxlib:=[ocamlopt?] dev-ml/react:= - dev-ml/result:= + dev-ml/result:=[ocamlopt?] " RDEPEND="${DEPEND}" BDEPEND=" @@ -40,7 +40,9 @@ OCAML_SUBPACKAGES=( src_prepare() { sed -i "s| seq||" "${S}"/src/core/dune || die - + if has_version ">=dev-ml/ppxlib-0.36.0"; then + eapply "${FILESDIR}"/${P}-ppxlib.patch + fi default }
