1 |
commit: 6f9ce785a4a5d5a9b4593d900557d23e4c81ac73 |
2 |
Author: Alexis Ballier <aballier <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue May 3 16:29:56 2016 +0000 |
4 |
Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue May 3 17:44:22 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6f9ce785 |
7 |
|
8 |
dev-ml/ppx_pipebang: 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/ppx_pipebang/files/oc43.patch | 46 +++++++++++++++++++++++ |
14 |
dev-ml/ppx_pipebang/ppx_pipebang-113.33.00.ebuild | 4 ++ |
15 |
2 files changed, 50 insertions(+) |
16 |
|
17 |
diff --git a/dev-ml/ppx_pipebang/files/oc43.patch b/dev-ml/ppx_pipebang/files/oc43.patch |
18 |
new file mode 100644 |
19 |
index 0000000..5f10fc0 |
20 |
--- /dev/null |
21 |
+++ b/dev-ml/ppx_pipebang/files/oc43.patch |
22 |
@@ -0,0 +1,46 @@ |
23 |
+diff -uNr ppx_pipebang-113.33.00/_oasis ppx_pipebang-113.33.00+4.03/_oasis |
24 |
+--- ppx_pipebang-113.33.00/_oasis 2016-03-09 16:44:54.000000000 +0100 |
25 |
++++ ppx_pipebang-113.33.00+4.03/_oasis 2016-03-22 15:13:51.000000000 +0100 |
26 |
+@@ -1,8 +1,8 @@ |
27 |
+ OASISFormat: 0.4 |
28 |
+-OCamlVersion: >= 4.02.3 |
29 |
++OCamlVersion: >= 4.03.0 |
30 |
+ FindlibVersion: >= 1.3.2 |
31 |
+ Name: ppx_pipebang |
32 |
+-Version: 113.33.00 |
33 |
++Version: 113.33.00+4.03 |
34 |
+ Synopsis: A ppx rewriter that inlines reverse application operators `|>` and `|!` |
35 |
+ Authors: Jane Street Group, LLC <opensource@××××××××××.com> |
36 |
+ Copyrights: (C) 2015-2016 Jane Street Group LLC <opensource@××××××××××.com> |
37 |
+diff -uNr ppx_pipebang-113.33.00/opam ppx_pipebang-113.33.00+4.03/opam |
38 |
+--- ppx_pipebang-113.33.00/opam 2016-03-18 12:08:01.000000000 +0100 |
39 |
++++ ppx_pipebang-113.33.00+4.03/opam 2016-03-22 17:51:37.000000000 +0100 |
40 |
+@@ -16,4 +16,4 @@ |
41 |
+ "ppx_driver" |
42 |
+ "ppx_tools" {>= "0.99.3"} |
43 |
+ ] |
44 |
+-available: [ ocaml-version >= "4.02.3" ] |
45 |
++available: [ ocaml-version >= "4.03.0" ] |
46 |
+diff -uNr ppx_pipebang-113.33.00/src/ppx_pipebang.ml ppx_pipebang-113.33.00+4.03/src/ppx_pipebang.ml |
47 |
+--- ppx_pipebang-113.33.00/src/ppx_pipebang.ml 2016-03-09 16:44:54.000000000 +0100 |
48 |
++++ ppx_pipebang-113.33.00+4.03/src/ppx_pipebang.ml 2016-03-22 15:13:51.000000000 +0100 |
49 |
+@@ -11,16 +11,16 @@ |
50 |
+ let loc = e.pexp_loc in |
51 |
+ match e.pexp_desc with |
52 |
+ | Pexp_apply ({ pexp_desc = Pexp_ident { txt = Lident ("|!" | "|>"); _ }; _ }, |
53 |
+- [("", x); ("", y)]) -> begin |
54 |
++ [(Nolabel, x); (Nolabel, y)]) -> begin |
55 |
+ let x = self#expression x in |
56 |
+ let y = self#expression y in |
57 |
+ match y with |
58 |
+ | { pexp_desc = Pexp_construct (id, None); _ } -> |
59 |
+ { y with pexp_desc = Pexp_construct (id, Some x) } |
60 |
+ | { pexp_desc = Pexp_apply (f, args); pexp_attributes = []; _ } -> |
61 |
+- { e with pexp_desc = Pexp_apply (f, args @ [("", x)]) } |
62 |
++ { e with pexp_desc = Pexp_apply (f, args @ [(Nolabel, x)]) } |
63 |
+ | _ -> |
64 |
+- { e with pexp_desc = Pexp_apply (y, [("", x)]) } |
65 |
++ { e with pexp_desc = Pexp_apply (y, [(Nolabel, x)]) } |
66 |
+ end |
67 |
+ | Pexp_ident { txt = Lident ("|!" | "|>" as s); _ } -> |
68 |
+ Location.raise_errorf ~loc "%s must be applied to two arguments" s |
69 |
|
70 |
diff --git a/dev-ml/ppx_pipebang/ppx_pipebang-113.33.00.ebuild b/dev-ml/ppx_pipebang/ppx_pipebang-113.33.00.ebuild |
71 |
index ae35794..867ca54 100644 |
72 |
--- a/dev-ml/ppx_pipebang/ppx_pipebang-113.33.00.ebuild |
73 |
+++ b/dev-ml/ppx_pipebang/ppx_pipebang-113.33.00.ebuild |
74 |
@@ -22,6 +22,10 @@ DEPEND="dev-ml/ppx_tools:= |
75 |
RDEPEND="${DEPEND}" |
76 |
DEPEND="${DEPEND} dev-ml/opam" |
77 |
|
78 |
+src_prepare() { |
79 |
+ has_version '>=dev-lang/ocaml-4.03' && epatch "${FILESDIR}/oc43.patch" |
80 |
+} |
81 |
+ |
82 |
src_configure() { |
83 |
emake setup.exe |
84 |
OASIS_SETUP_COMMAND="./setup.exe" oasis_src_configure |