diff options
author | Alexis Ballier <aballier@gentoo.org> | 2017-04-12 20:27:36 +0200 |
---|---|---|
committer | Alexis Ballier <aballier@gentoo.org> | 2017-04-12 21:20:25 +0200 |
commit | 0d1a0a850438d8304669a1831c1423824e9aba03 (patch) | |
tree | 6137ff529d8647ef02605bb4a626e91d2357cac5 /dev-ml | |
parent | dev-ml/opam: forward port ~arm keywords to latest (diff) | |
download | gentoo-0d1a0a850438d8304669a1831c1423824e9aba03.tar.gz gentoo-0d1a0a850438d8304669a1831c1423824e9aba03.tar.bz2 gentoo-0d1a0a850438d8304669a1831c1423824e9aba03.zip |
dev-ml/ocaml-dns: Fix build with lwt3
Package-Manager: Portage-2.3.5, Repoman-2.3.2
Diffstat (limited to 'dev-ml')
-rw-r--r-- | dev-ml/ocaml-dns/files/lwt3.patch | 18 | ||||
-rw-r--r-- | 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 000000000000..a158d8f75599 --- /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 ccfefee54eb4..7f438c62e281 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) \ |