1 |
commit: 465a0b6ddf8ec19f73947a28719bf7c472e975fa |
2 |
Author: Alexis Ballier <aballier <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue May 3 18:16:11 2016 +0000 |
4 |
Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue May 3 18:29:42 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=465a0b6d |
7 |
|
8 |
dev-ml/async_unix: fix build with ocaml 4.03 |
9 |
|
10 |
Package-Manager: portage-2.2.28 |
11 |
Signed-off-by: Alexis Ballier <aballier <AT> gentoo.org> |
12 |
|
13 |
dev-ml/async_unix/async_unix-113.33.00.ebuild | 4 ++ |
14 |
dev-ml/async_unix/files/oc43.patch | 87 +++++++++++++++++++++++++++ |
15 |
2 files changed, 91 insertions(+) |
16 |
|
17 |
diff --git a/dev-ml/async_unix/async_unix-113.33.00.ebuild b/dev-ml/async_unix/async_unix-113.33.00.ebuild |
18 |
index ab692ee..ed75add 100644 |
19 |
--- a/dev-ml/async_unix/async_unix-113.33.00.ebuild |
20 |
+++ b/dev-ml/async_unix/async_unix-113.33.00.ebuild |
21 |
@@ -35,6 +35,10 @@ RDEPEND=" |
22 |
" |
23 |
DEPEND="${RDEPEND} dev-ml/opam" |
24 |
|
25 |
+src_prepare() { |
26 |
+ has_version '>=dev-lang/ocaml-4.03' && epatch "${FILESDIR}/oc43.patch" |
27 |
+} |
28 |
+ |
29 |
src_configure() { |
30 |
emake setup.exe |
31 |
OASIS_SETUP_COMMAND="./setup.exe" oasis_src_configure |
32 |
|
33 |
diff --git a/dev-ml/async_unix/files/oc43.patch b/dev-ml/async_unix/files/oc43.patch |
34 |
new file mode 100644 |
35 |
index 0000000..8d8cc17 |
36 |
--- /dev/null |
37 |
+++ b/dev-ml/async_unix/files/oc43.patch |
38 |
@@ -0,0 +1,87 @@ |
39 |
+diff -uNr async_unix-113.33.00/_oasis async_unix-113.33.00+4.03/_oasis |
40 |
+--- async_unix-113.33.00/_oasis 2016-03-09 16:44:52.000000000 +0100 |
41 |
++++ async_unix-113.33.00+4.03/_oasis 2016-03-22 15:13:48.000000000 +0100 |
42 |
+@@ -1,8 +1,8 @@ |
43 |
+ OASISFormat: 0.4 |
44 |
+-OCamlVersion: >= 4.02.3 |
45 |
++OCamlVersion: >= 4.03.0 |
46 |
+ FindlibVersion: >= 1.3.2 |
47 |
+ Name: async_unix |
48 |
+-Version: 113.33.00 |
49 |
++Version: 113.33.00+4.03 |
50 |
+ Synopsis: Monadic concurrency library |
51 |
+ Authors: Jane Street Group, LLC <opensource@××××××××××.com> |
52 |
+ Copyrights: (C) 2008-2016 Jane Street Group LLC <opensource@××××××××××.com> |
53 |
+diff -uNr async_unix-113.33.00/opam async_unix-113.33.00+4.03/opam |
54 |
+--- async_unix-113.33.00/opam 2016-03-18 12:08:01.000000000 +0100 |
55 |
++++ async_unix-113.33.00+4.03/opam 2016-03-22 17:51:33.000000000 +0100 |
56 |
+@@ -26,4 +26,4 @@ |
57 |
+ "typerep" |
58 |
+ "variantslib" |
59 |
+ ] |
60 |
+-available: [ ocaml-version >= "4.02.3" ] |
61 |
++available: [ ocaml-version >= "4.03.0" ] |
62 |
+diff -uNr async_unix-113.33.00/src/raw_scheduler.ml async_unix-113.33.00+4.03/src/raw_scheduler.ml |
63 |
+--- async_unix-113.33.00/src/raw_scheduler.ml 2016-03-09 16:44:52.000000000 +0100 |
64 |
++++ async_unix-113.33.00+4.03/src/raw_scheduler.ml 2016-03-22 15:13:48.000000000 +0100 |
65 |
+@@ -587,7 +587,7 @@ |
66 |
+ |
67 |
+ let sync_changed_fds_to_file_descr_watcher t = |
68 |
+ let module F = (val t.file_descr_watcher : File_descr_watcher.S) in |
69 |
+- let make_file_descr_watcher_agree_with (fd : Fd.t) = |
70 |
++ let make_file_descr_watcher_agree_with = (fun (fd : Fd.t) -> |
71 |
+ fd.watching_has_changed <- false; |
72 |
+ let desired = |
73 |
+ Read_write.mapi fd.watching ~f:(fun read_or_write watching -> |
74 |
+@@ -607,7 +607,7 @@ |
75 |
+ with exn -> |
76 |
+ failwiths "sync_changed_fds_to_file_descr_watcher unable to set fd" |
77 |
+ (desired, fd, exn, t) [%sexp_of: bool Read_write.t * Fd.t * exn * t] |
78 |
+- in |
79 |
++ ) [@inline always] in |
80 |
+ let changed = t.fds_whose_watching_has_changed in |
81 |
+ t.fds_whose_watching_has_changed <- []; |
82 |
+ List.iter changed ~f:make_file_descr_watcher_agree_with; |
83 |
+diff -uNr async_unix-113.33.00/src/std.ml async_unix-113.33.00+4.03/src/std.ml |
84 |
+--- async_unix-113.33.00/src/std.ml 2016-03-09 16:44:52.000000000 +0100 |
85 |
++++ async_unix-113.33.00+4.03/src/std.ml 2016-03-22 15:13:48.000000000 +0100 |
86 |
+@@ -60,10 +60,9 @@ |
87 |
+ |
88 |
+ module Overwrite_ = struct |
89 |
+ let overwrite1 (`This_is_async__Think_about_blocking as x) = x |
90 |
+- let wrap f `This_is_async__Think_about_blocking = f |
91 |
+- let overwrite2 = wrap overwrite1 |
92 |
+- let overwrite3 = wrap overwrite2 |
93 |
+- let overwrite4 = wrap overwrite3 |
94 |
++ let overwrite2 `This_is_async__Think_about_blocking = overwrite1 |
95 |
++ let overwrite3 `This_is_async__Think_about_blocking = overwrite2 |
96 |
++ let overwrite4 `This_is_async__Think_about_blocking = overwrite3 |
97 |
+ let overwritef f = ksprintf (fun _ -> `This_is_async__Think_about_blocking) f |
98 |
+ end |
99 |
+ open Overwrite_ |
100 |
+diff -uNr async_unix-113.33.00/src/unix_syscalls.ml async_unix-113.33.00+4.03/src/unix_syscalls.ml |
101 |
+--- async_unix-113.33.00/src/unix_syscalls.ml 2016-03-09 16:44:52.000000000 +0100 |
102 |
++++ async_unix-113.33.00+4.03/src/unix_syscalls.ml 2016-03-22 15:13:48.000000000 +0100 |
103 |
+@@ -365,8 +365,8 @@ |
104 |
+ ;; |
105 |
+ |
106 |
+ (* symlinks *) |
107 |
+-let symlink ~src ~dst = |
108 |
+- In_thread.syscall_exn ~name:"symlink" (fun () -> Unix.symlink ~src ~dst) |
109 |
++let symlink ?to_dir ~src ~dst = |
110 |
++ In_thread.syscall_exn ~name:"symlink" (fun () -> Unix.symlink ?to_dir ~src ~dst) |
111 |
+ ;; |
112 |
+ |
113 |
+ let readlink filename = |
114 |
+diff -uNr async_unix-113.33.00/src/unix_syscalls.mli async_unix-113.33.00+4.03/src/unix_syscalls.mli |
115 |
+--- async_unix-113.33.00/src/unix_syscalls.mli 2016-03-09 16:44:52.000000000 +0100 |
116 |
++++ async_unix-113.33.00+4.03/src/unix_syscalls.mli 2016-03-22 15:13:48.000000000 +0100 |
117 |
+@@ -223,7 +223,7 @@ |
118 |
+ -> string |
119 |
+ -> unit Deferred.t |
120 |
+ |
121 |
+-val symlink : src:string -> dst:string -> unit Deferred.t |
122 |
++val symlink : ?to_dir:bool -> src:string -> dst:string -> unit Deferred.t |
123 |
+ |
124 |
+ val readlink : string -> string Deferred.t |
125 |
+ |