Gentoo Archives: gentoo-commits

From: Alexis Ballier <aballier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-ml/ppx_sexp_value/, dev-ml/ppx_sexp_value/files/
Date: Tue, 03 May 2016 17:44:38
Message-Id: 1462297462.7aab055ad4a92787d3216d12faf17fa2d16a7a23.aballier@gentoo
1 commit: 7aab055ad4a92787d3216d12faf17fa2d16a7a23
2 Author: Alexis Ballier <aballier <AT> gentoo <DOT> org>
3 AuthorDate: Tue May 3 15:08:42 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=7aab055a
7
8 dev-ml/ppx_sexp_value: 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_sexp_value/files/oc43.patch | 62 ++++++++++++++++++++++
14 .../ppx_sexp_value/ppx_sexp_value-113.33.00.ebuild | 4 ++
15 2 files changed, 66 insertions(+)
16
17 diff --git a/dev-ml/ppx_sexp_value/files/oc43.patch b/dev-ml/ppx_sexp_value/files/oc43.patch
18 new file mode 100644
19 index 0000000..36cc972
20 --- /dev/null
21 +++ b/dev-ml/ppx_sexp_value/files/oc43.patch
22 @@ -0,0 +1,62 @@
23 +diff -uNr ppx_sexp_value-113.33.00/_oasis ppx_sexp_value-113.33.00+4.03/_oasis
24 +--- ppx_sexp_value-113.33.00/_oasis 2016-03-09 16:44:54.000000000 +0100
25 ++++ ppx_sexp_value-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_sexp_value
32 +-Version: 113.33.00
33 ++Version: 113.33.00+4.03
34 + Synopsis: A ppx rewriter that simplifies building s-expressions from ocaml values
35 + Authors: Jane Street Group, LLC <opensource@××××××××××.com>
36 + Copyrights: (C) 2015-2016 Jane Street Group LLC <opensource@××××××××××.com>
37 +diff -uNr ppx_sexp_value-113.33.00/opam ppx_sexp_value-113.33.00+4.03/opam
38 +--- ppx_sexp_value-113.33.00/opam 2016-03-18 12:08:01.000000000 +0100
39 ++++ ppx_sexp_value-113.33.00+4.03/opam 2016-03-22 17:51:37.000000000 +0100
40 +@@ -18,4 +18,4 @@
41 + "ppx_sexp_conv"
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_sexp_value-113.33.00/src/ppx_sexp_value.ml ppx_sexp_value-113.33.00+4.03/src/ppx_sexp_value.ml
47 +--- ppx_sexp_value-113.33.00/src/ppx_sexp_value.ml 2016-03-09 16:44:54.000000000 +0100
48 ++++ ppx_sexp_value-113.33.00+4.03/src/ppx_sexp_value.ml 2016-03-22 15:13:51.000000000 +0100
49 +@@ -25,13 +25,10 @@
50 + eapply ~loc (evar ~loc ("Sexplib.Conv.sexp_of_" ^ typ)) [pexp_constant ~loc const]
51 + in
52 + match const with
53 +- | Const_int _ -> f "int"
54 +- | Const_char _ -> f "char"
55 +- | Const_string _ -> f "string"
56 +- | Const_float _ -> f "float"
57 +- | Const_int32 _ -> f "int32"
58 +- | Const_int64 _ -> f "int64"
59 +- | Const_nativeint _ -> f "nativeint"
60 ++ | Pconst_integer _ -> f "int"
61 ++ | Pconst_char _ -> f "char"
62 ++ | Pconst_string _ -> f "string"
63 ++ | Pconst_float _ -> f "float"
64 + ;;
65 +
66 + let sexp_of_constraint ~loc expr ctyp =
67 +@@ -90,7 +87,7 @@
68 + | Pexp_record (fields, None) ->
69 + sexp_of_record ~loc fields
70 + | Pexp_apply ({ pexp_desc = Pexp_ident { txt = Lident "~~"; _ }; _},
71 +- [ ("", { pexp_desc = Pexp_constraint (expr, ctyp); _ }) ]) ->
72 ++ [ (Nolabel, { pexp_desc = Pexp_constraint (expr, ctyp); _ }) ]) ->
73 + let expr_str = Pprintast.string_of_expression expr in
74 + sexp_list ~loc
75 + (elist ~loc [ sexp_atom ~loc (estring ~loc expr_str)
76 +@@ -168,7 +165,7 @@
77 + (* Don't misinterpret [%sexp ~~(e : t)] for the deprecated application syntax. *)
78 + | Pexp_apply ({ pexp_desc = Pexp_ident { txt = Lident "~~"; _}; _ }, _) -> expr
79 + | Pexp_apply (f, (_ :: _ as args))
80 +- when List.for_all args ~f:(fun (lab, _) -> lab = "") ->
81 ++ when List.for_all args ~f:(fun (lab, _) -> lab = Nolabel) ->
82 + let el = List.map (f :: List.map args ~f:snd) ~f:rewrite_arg in
83 + let e = pexp_tuple ~loc el in
84 + if !allow_deprecated_syntax then
85
86 diff --git a/dev-ml/ppx_sexp_value/ppx_sexp_value-113.33.00.ebuild b/dev-ml/ppx_sexp_value/ppx_sexp_value-113.33.00.ebuild
87 index 5d69b0b..09fc807 100644
88 --- a/dev-ml/ppx_sexp_value/ppx_sexp_value-113.33.00.ebuild
89 +++ b/dev-ml/ppx_sexp_value/ppx_sexp_value-113.33.00.ebuild
90 @@ -24,6 +24,10 @@ DEPEND="dev-ml/ppx_tools:=
91 RDEPEND="${DEPEND}"
92 DEPEND="${DEPEND} dev-ml/opam"
93
94 +src_prepare() {
95 + has_version '>=dev-lang/ocaml-4.03' && epatch "${FILESDIR}/oc43.patch"
96 +}
97 +
98 src_configure() {
99 emake setup.exe
100 OASIS_SETUP_COMMAND="./setup.exe" oasis_src_configure