--- /dev/null
+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 ->
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"
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:=
# Missing mirage deps
RESTRICT="test"
+src_prepare() {
+ epatch "${FILESDIR}/lwt3.patch"
+}
+
src_compile() {
ocaml pkg/pkg.ml build \
--tests $(usex test true false) \