commit: 0d1a0a850438d8304669a1831c1423824e9aba03 Author: Alexis Ballier <aballier <AT> gentoo <DOT> org> AuthorDate: Wed Apr 12 18:27:36 2017 +0000 Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org> CommitDate: Wed Apr 12 19:20:25 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0d1a0a85
dev-ml/ocaml-dns: Fix build with lwt3 Package-Manager: Portage-2.3.5, Repoman-2.3.2 dev-ml/ocaml-dns/files/lwt3.patch | 18 ++++++++++++++++++ dev-ml/ocaml-dns/ocaml-dns-0.20.0.ebuild | 8 ++++++-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/dev-ml/ocaml-dns/files/lwt3.patch b/dev-ml/ocaml-dns/files/lwt3.patch new file mode 100644 index 00000000000..a158d8f7559 --- /dev/null +++ b/dev-ml/ocaml-dns/files/lwt3.patch @@ -0,0 +1,18 @@ +Index: ocaml-dns-0.20.0/lwt/dns_server_unix.ml +=================================================================== +--- ocaml-dns-0.20.0.orig/lwt/dns_server_unix.ml ++++ ocaml-dns-0.20.0/lwt/dns_server_unix.ml +@@ -31,10 +31,10 @@ let bind_fd ~address ~port = + let err = sp "cannot resolve %s: %s" address (Printexc.to_string exn) in + Lwt.fail (Failure err)) + in +- src >|= fun src -> ++ src >>= fun src -> + let fd = Lwt_unix.(socket PF_INET SOCK_DGRAM 0) in +- let () = Lwt_unix.bind fd src in +- (fd, src) ++ Lwt_unix.bind fd src >>= fun () -> ++ Lwt.return (fd, src) + + let eventual_process_of_zonefiles zonefiles = + Lwt_list.map_s (fun zonefile -> diff --git a/dev-ml/ocaml-dns/ocaml-dns-0.20.0.ebuild b/dev-ml/ocaml-dns/ocaml-dns-0.20.0.ebuild index ccfefee54eb..7f438c62e28 100644 --- a/dev-ml/ocaml-dns/ocaml-dns-0.20.0.ebuild +++ b/dev-ml/ocaml-dns/ocaml-dns-0.20.0.ebuild @@ -3,7 +3,7 @@ EAPI=5 -inherit findlib +inherit findlib eutils DESCRIPTION="A pure OCaml implementation of the DNS protocol" HOMEPAGE="https://github.com/mirage/ocaml-dns https://mirage.io" @@ -16,7 +16,7 @@ IUSE="async +lwt +ocamlopt test" RDEPEND=" async? ( dev-ml/async:= ) - lwt? ( >=dev-ml/lwt-2.4.7:= + lwt? ( >=dev-ml/lwt-3:= dev-ml/ocaml-cstruct:=[lwt(-)] ) >=dev-lang/ocaml-4:= dev-ml/cmdliner:= @@ -43,6 +43,10 @@ DEPEND=" # Missing mirage deps RESTRICT="test" +src_prepare() { + epatch "${FILESDIR}/lwt3.patch" +} + src_compile() { ocaml pkg/pkg.ml build \ --tests $(usex test true false) \
