1 |
commit: 411ae34eb1cccbca5fc1825c728c1e7d31115493 |
2 |
Author: Alexis Ballier <aballier <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue May 3 13:54:14 2016 +0000 |
4 |
Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue May 3 14:17:38 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=411ae34e |
7 |
|
8 |
dev-ml/ppx_inline_test: 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_inline_test/files/oc43.patch | 59 ++++++++++++++++++++++ |
14 |
.../ppx_inline_test-113.33.00.ebuild | 6 ++- |
15 |
2 files changed, 64 insertions(+), 1 deletion(-) |
16 |
|
17 |
diff --git a/dev-ml/ppx_inline_test/files/oc43.patch b/dev-ml/ppx_inline_test/files/oc43.patch |
18 |
new file mode 100644 |
19 |
index 0000000..b5fbe11 |
20 |
--- /dev/null |
21 |
+++ b/dev-ml/ppx_inline_test/files/oc43.patch |
22 |
@@ -0,0 +1,59 @@ |
23 |
+diff -uNr ppx_inline_test-113.33.00/_oasis ppx_inline_test-113.33.00+4.03/_oasis |
24 |
+--- ppx_inline_test-113.33.00/_oasis 2016-03-09 16:44:54.000000000 +0100 |
25 |
++++ ppx_inline_test-113.33.00+4.03/_oasis 2016-03-22 15:13:50.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_inline_test |
32 |
+-Version: 113.33.00 |
33 |
++Version: 113.33.00+4.03 |
34 |
+ Synopsis: Syntax extension for writing in-line tests in ocaml code |
35 |
+ Authors: Jane Street Group, LLC <opensource@××××××××××.com> |
36 |
+ Copyrights: (C) 2015-2016 Jane Street Group LLC <opensource@××××××××××.com> |
37 |
+diff -uNr ppx_inline_test-113.33.00/opam ppx_inline_test-113.33.00+4.03/opam |
38 |
+--- ppx_inline_test-113.33.00/opam 2016-03-18 12:08:01.000000000 +0100 |
39 |
++++ ppx_inline_test-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_inline_test-113.33.00/src/ppx_inline_test.ml ppx_inline_test-113.33.00+4.03/src/ppx_inline_test.ml |
47 |
+--- ppx_inline_test-113.33.00/src/ppx_inline_test.ml 2016-03-09 16:44:54.000000000 +0100 |
48 |
++++ ppx_inline_test-113.33.00+4.03/src/ppx_inline_test.ml 2016-03-22 15:13:50.000000000 +0100 |
49 |
+@@ -96,18 +96,18 @@ |
50 |
+ |
51 |
+ let expand_test ~loc ~path:_ id e = |
52 |
+ assert_enabled loc; |
53 |
+- apply_to_descr "test" ~loc (Some e) id (pexp_fun ~loc "" None (punit ~loc) e) |
54 |
++ apply_to_descr "test" ~loc (Some e) id (pexp_fun ~loc Nolabel None (punit ~loc) e) |
55 |
+ ;; |
56 |
+ |
57 |
+ let expand_test_unit ~loc ~path:_ id e = |
58 |
+ assert_enabled loc; |
59 |
+- apply_to_descr "test_unit" ~loc (Some e) id (pexp_fun ~loc "" None (punit ~loc) e) |
60 |
++ apply_to_descr "test_unit" ~loc (Some e) id (pexp_fun ~loc Nolabel None (punit ~loc) e) |
61 |
+ ;; |
62 |
+ |
63 |
+ let expand_test_module ~loc ~path:_ id m = |
64 |
+ assert_enabled loc; |
65 |
+ apply_to_descr "test_module" ~loc ~inner_loc:m.pmod_loc None id |
66 |
+- (pexp_fun ~loc "" None (punit ~loc) |
67 |
++ (pexp_fun ~loc Nolabel None (punit ~loc) |
68 |
+ (pexp_letmodule ~loc (Located.mk ~loc "M") |
69 |
+ m |
70 |
+ (eunit ~loc))) |
71 |
+@@ -120,9 +120,8 @@ |
72 |
+ pstr (( |
73 |
+ pstr_value nonrecursive ( |
74 |
+ value_binding |
75 |
+- ~pat:(map (pstring __) ~f:(fun f x -> f (Some x))) |
76 |
++ ~pat:(alt_option (pstring __) ppat_any) |
77 |
+ ~expr ^:: nil) |
78 |
+- ||| map (pstr_eval expr nil) ~f:(fun f -> f None) |
79 |
+ ) ^:: nil) |
80 |
+ |
81 |
+ let test = |
82 |
|
83 |
diff --git a/dev-ml/ppx_inline_test/ppx_inline_test-113.33.00.ebuild b/dev-ml/ppx_inline_test/ppx_inline_test-113.33.00.ebuild |
84 |
index 65a4219..79eb843 100644 |
85 |
--- a/dev-ml/ppx_inline_test/ppx_inline_test-113.33.00.ebuild |
86 |
+++ b/dev-ml/ppx_inline_test/ppx_inline_test-113.33.00.ebuild |
87 |
@@ -4,7 +4,7 @@ |
88 |
|
89 |
EAPI="5" |
90 |
|
91 |
-inherit oasis |
92 |
+inherit oasis eutils |
93 |
|
94 |
MY_P=${PN/-/_}-${PV} |
95 |
DESCRIPTION="Syntax extension for writing in-line tests in ocaml code" |
96 |
@@ -25,6 +25,10 @@ DEPEND="${DEPEND} dev-ml/opam" |
97 |
|
98 |
S="${WORKDIR}/${MY_P}" |
99 |
|
100 |
+src_prepare() { |
101 |
+ has_version '>=dev-lang/ocaml-4.03' && epatch "${FILESDIR}/oc43.patch" |
102 |
+} |
103 |
+ |
104 |
src_configure() { |
105 |
emake setup.exe |
106 |
OASIS_SETUP_COMMAND="./setup.exe" oasis_src_configure |