1 |
commit: 0d1a0a850438d8304669a1831c1423824e9aba03 |
2 |
Author: Alexis Ballier <aballier <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Apr 12 18:27:36 2017 +0000 |
4 |
Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Apr 12 19:20:25 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0d1a0a85 |
7 |
|
8 |
dev-ml/ocaml-dns: Fix build with lwt3 |
9 |
|
10 |
Package-Manager: Portage-2.3.5, Repoman-2.3.2 |
11 |
|
12 |
dev-ml/ocaml-dns/files/lwt3.patch | 18 ++++++++++++++++++ |
13 |
dev-ml/ocaml-dns/ocaml-dns-0.20.0.ebuild | 8 ++++++-- |
14 |
2 files changed, 24 insertions(+), 2 deletions(-) |
15 |
|
16 |
diff --git a/dev-ml/ocaml-dns/files/lwt3.patch b/dev-ml/ocaml-dns/files/lwt3.patch |
17 |
new file mode 100644 |
18 |
index 00000000000..a158d8f7559 |
19 |
--- /dev/null |
20 |
+++ b/dev-ml/ocaml-dns/files/lwt3.patch |
21 |
@@ -0,0 +1,18 @@ |
22 |
+Index: ocaml-dns-0.20.0/lwt/dns_server_unix.ml |
23 |
+=================================================================== |
24 |
+--- ocaml-dns-0.20.0.orig/lwt/dns_server_unix.ml |
25 |
++++ ocaml-dns-0.20.0/lwt/dns_server_unix.ml |
26 |
+@@ -31,10 +31,10 @@ let bind_fd ~address ~port = |
27 |
+ let err = sp "cannot resolve %s: %s" address (Printexc.to_string exn) in |
28 |
+ Lwt.fail (Failure err)) |
29 |
+ in |
30 |
+- src >|= fun src -> |
31 |
++ src >>= fun src -> |
32 |
+ let fd = Lwt_unix.(socket PF_INET SOCK_DGRAM 0) in |
33 |
+- let () = Lwt_unix.bind fd src in |
34 |
+- (fd, src) |
35 |
++ Lwt_unix.bind fd src >>= fun () -> |
36 |
++ Lwt.return (fd, src) |
37 |
+ |
38 |
+ let eventual_process_of_zonefiles zonefiles = |
39 |
+ Lwt_list.map_s (fun zonefile -> |
40 |
|
41 |
diff --git a/dev-ml/ocaml-dns/ocaml-dns-0.20.0.ebuild b/dev-ml/ocaml-dns/ocaml-dns-0.20.0.ebuild |
42 |
index ccfefee54eb..7f438c62e28 100644 |
43 |
--- a/dev-ml/ocaml-dns/ocaml-dns-0.20.0.ebuild |
44 |
+++ b/dev-ml/ocaml-dns/ocaml-dns-0.20.0.ebuild |
45 |
@@ -3,7 +3,7 @@ |
46 |
|
47 |
EAPI=5 |
48 |
|
49 |
-inherit findlib |
50 |
+inherit findlib eutils |
51 |
|
52 |
DESCRIPTION="A pure OCaml implementation of the DNS protocol" |
53 |
HOMEPAGE="https://github.com/mirage/ocaml-dns https://mirage.io" |
54 |
@@ -16,7 +16,7 @@ IUSE="async +lwt +ocamlopt test" |
55 |
|
56 |
RDEPEND=" |
57 |
async? ( dev-ml/async:= ) |
58 |
- lwt? ( >=dev-ml/lwt-2.4.7:= |
59 |
+ lwt? ( >=dev-ml/lwt-3:= |
60 |
dev-ml/ocaml-cstruct:=[lwt(-)] ) |
61 |
>=dev-lang/ocaml-4:= |
62 |
dev-ml/cmdliner:= |
63 |
@@ -43,6 +43,10 @@ DEPEND=" |
64 |
# Missing mirage deps |
65 |
RESTRICT="test" |
66 |
|
67 |
+src_prepare() { |
68 |
+ epatch "${FILESDIR}/lwt3.patch" |
69 |
+} |
70 |
+ |
71 |
src_compile() { |
72 |
ocaml pkg/pkg.ml build \ |
73 |
--tests $(usex test true false) \ |