diff options
author | Alexis Ballier <aballier@gentoo.org> | 2017-04-01 16:47:21 +0200 |
---|---|---|
committer | Alexis Ballier <aballier@gentoo.org> | 2017-04-02 10:37:44 +0200 |
commit | f1720706493c06761ad22e77b48b9a045680d838 (patch) | |
tree | 3857496414ef4ac42cb7d54d81702f0c2afaf90e | |
parent | 11195c2b1ef4c6a0936f0e9ca73913155ee4f010 (diff) | |
download | gentoo-f1720706493c06761ad22e77b48b9a045680d838.tar.gz gentoo-f1720706493c06761ad22e77b48b9a045680d838.tar.xz |
dev-ml/ppx_sexp_conv: Bump to 0.9.0
Package-Manager: Portage-2.3.5, Repoman-2.3.2
-rw-r--r-- | dev-ml/ppx_sexp_conv/Manifest | 2 | ||||
-rw-r--r-- | dev-ml/ppx_sexp_conv/files/oc43.patch | 193 | ||||
-rw-r--r-- | dev-ml/ppx_sexp_conv/ppx_sexp_conv-0.9.0.ebuild | 32 | ||||
-rw-r--r-- | dev-ml/ppx_sexp_conv/ppx_sexp_conv-113.33.00.ebuild | 46 |
4 files changed, 33 insertions, 240 deletions
diff --git a/dev-ml/ppx_sexp_conv/Manifest b/dev-ml/ppx_sexp_conv/Manifest index 25d91a6e899..68419144050 100644 --- a/dev-ml/ppx_sexp_conv/Manifest +++ b/dev-ml/ppx_sexp_conv/Manifest @@ -1 +1 @@ -DIST ppx_sexp_conv-113.33.00.tar.gz 79043 SHA256 fdd6b6f1c8dc81ae969fef74724bc72346f79bf7750aebe88f1e0abf526e4710 SHA512 398e13b3689874aab627d192a05ea746c7fcd1ab38443757e9ff4be7592899f80d1d007d6330880f59d34ebf93cf4cae78da90b9418729854cc4cbe2c218b21d WHIRLPOOL 2db0bc7d8915e3fcba772e81801413e84b974533a47a128e6b12da8506a0a8ccb119a2e16fc2b231f00d8caed3e02edadaa0905160cb26a612391633cc8cc315 +DIST ppx_sexp_conv-0.9.0.tar.gz 28000 SHA256 3f79fdc1caa1a8ba8e02291c1572e5524ae057de31f62b62766d2ec06a989091 SHA512 af3d28a3cdb7c796549a2598c218f69a69d58da715ef2d16077c3adeb22823fa7bec6bc0d8cb6caaf2a0adb56dfcb39d667975959251fb310b69d6abe8302845 WHIRLPOOL 8f54bdaf830801ecbd1682aedbf1384e88d4fb85f575332150729e927d4b9a4deb4c3ed4e0473cf64502db4cc393c0025e087c92e41b306e42445c3da0a931c6 diff --git a/dev-ml/ppx_sexp_conv/files/oc43.patch b/dev-ml/ppx_sexp_conv/files/oc43.patch deleted file mode 100644 index efb85e29306..00000000000 --- a/dev-ml/ppx_sexp_conv/files/oc43.patch +++ /dev/null @@ -1,193 +0,0 @@ -diff -uNr ppx_sexp_conv-113.33.00/expander/ppx_sexp_conv_expander.ml ppx_sexp_conv-113.33.01+4.03/expander/ppx_sexp_conv_expander.ml ---- ppx_sexp_conv-113.33.00/expander/ppx_sexp_conv_expander.ml 2016-03-09 16:44:54.000000000 +0100 -+++ ppx_sexp_conv-113.33.01+4.03/expander/ppx_sexp_conv_expander.ml 2016-04-18 12:09:44.000000000 +0200 -@@ -491,30 +491,33 @@ - let lid = Located.map lident cnstr in - let str = estring ~loc cnstr.txt in - match cd.pcd_args with -- | [] -> -- ppat_construct ~loc lid None --> [%expr Sexplib.Sexp.Atom [%e str]] -- | args -> -- match args with -- | [ [%type: [%t? tp] sexp_list ] ] -> -- let cnv_expr = Fun_or_match.expr ~loc (sexp_of_type renaming tp) in -- ppat_construct ~loc lid (Some [%pat? l]) --> -- [%expr -- Sexplib.Sexp.List -- (Sexplib.Sexp.Atom [%e str] :: -- Sexplib.Conv.list_map [%e cnv_expr] l)] -- | _ -> -- let sexp_of_args = List.map ~f:(sexp_of_type renaming) args in -- let cnstr_expr = [%expr Sexplib.Sexp.Atom [%e str] ] in -- let bindings, patts, vars = Fun_or_match.map_tmp_vars ~loc sexp_of_args in -- let patt = -- match patts with -- | [patt] -> patt -- | _ -> ppat_tuple ~loc patts -- in -- ppat_construct ~loc lid (Some patt) --> -- pexp_let ~loc Nonrecursive bindings -- [%expr Sexplib.Sexp.List [%e elist ~loc (cnstr_expr :: vars)]] -- ) -+ | Pcstr_record _ -> failwith "Pcstr_record unsupported" -+ | Pcstr_tuple pcd_args -> -+ match pcd_args with -+ | [] -> -+ ppat_construct ~loc lid None --> [%expr Sexplib.Sexp.Atom [%e str]] -+ | args -> -+ match args with -+ | [ [%type: [%t? tp] sexp_list ] ] -> -+ let cnv_expr = Fun_or_match.expr ~loc (sexp_of_type renaming tp) in -+ ppat_construct ~loc lid (Some [%pat? l]) --> -+ [%expr -+ Sexplib.Sexp.List -+ (Sexplib.Sexp.Atom [%e str] :: -+ Sexplib.Conv.list_map [%e cnv_expr] l)] -+ | _ -> -+ let sexp_of_args = List.map ~f:(sexp_of_type renaming) args in -+ let cnstr_expr = [%expr Sexplib.Sexp.Atom [%e str] ] in -+ let bindings, patts, vars = Fun_or_match.map_tmp_vars ~loc sexp_of_args in -+ let patt = -+ match patts with -+ | [patt] -> patt -+ | _ -> ppat_tuple ~loc patts -+ in -+ ppat_construct ~loc lid (Some patt) --> -+ pexp_let ~loc Nonrecursive bindings -+ [%expr Sexplib.Sexp.List [%e elist ~loc (cnstr_expr :: vars)]] -+ ) - - let sexp_of_sum tps cds = Fun_or_match.Match (branch_sum tps cds) - -@@ -721,7 +724,7 @@ - let sexp_of_tds ~loc ~path:_ (rec_flag, tds) = - let rec_flag = really_recursive rec_flag tds in - let bindings = List.map tds ~f:sexp_of_td |> List.concat in -- [pstr_value ~loc rec_flag bindings] -+ pstr_value_list ~loc rec_flag bindings - - let sexp_of_exn ~loc:_ ~path ec = - let renaming = Renaming.identity in -@@ -730,14 +733,14 @@ - let expr = - match ec with - | {pext_name = {loc; txt = cnstr}; -- pext_kind = Pext_decl ([], None); _;} -> -+ pext_kind = Pext_decl (Pcstr_tuple [], None); _;} -> - [%expr - Sexplib.Exn_magic.register [%e pexp_construct ~loc - (Located.lident ~loc cnstr) None] - [%e estring ~loc (get_full_cnstr cnstr)] - ] - | {pext_name = {loc; txt = cnstr}; -- pext_kind = Pext_decl (_::_ as tps, None); _;} -> -+ pext_kind = Pext_decl (Pcstr_tuple ((_::_) as tps), None); _;} -> - let fps = List.map ~f:(fun tp -> sexp_of_type renaming tp) tps in - let sexp_converters = List.map fps ~f:Fun_or_match.(expr ~loc) in - let _, patts, vars = Fun_or_match.map_tmp_vars ~loc fps in -@@ -761,6 +764,8 @@ - eapply ~loc partial sexp_converters - in - [%expr [%e call] ] -+ | { pext_kind = Pext_decl (Pcstr_record _, _); _;} -> -+ failwith "Pcstr_record not supported" - | { pext_kind = Pext_decl (_, Some _); _} -> - Location.raise_errorf ~loc "sexp_of_exn/:" - | { pext_kind = Pext_rebind _; _} -> -@@ -1089,13 +1094,14 @@ - (* Generate matching code for well-formed S-expressions wrt. sum types *) - let mk_good_sum_matches (loc,cds) = - List.map cds ~f:(function -- | { pcd_name = cnstr; pcd_args = []; _} -> -+ | { pcd_args = Pcstr_record _; _} -> failwith "Pcstr_record unsupported" -+ | { pcd_name = cnstr; pcd_args = Pcstr_tuple []; _} -> - let lcstr = pstring ~loc (String.uncapitalize cnstr.txt) in - let str = pstring ~loc cnstr.txt in - [%pat? Sexplib.Sexp.Atom ([%p lcstr] | [%p str])] --> - pexp_construct ~loc (Located.lident ~loc cnstr.txt) None - -- | { pcd_name = cnstr; pcd_args = (_::_ as tps); _} -> -+ | { pcd_name = cnstr; pcd_args = Pcstr_tuple (_::_ as tps); _} -> - let lcstr = pstring ~loc (String.uncapitalize cnstr.txt) in - let str = pstring ~loc cnstr.txt in - [%pat? (Sexplib.Sexp.List -@@ -1109,14 +1115,15 @@ - wrt. sum types *) - let mk_bad_sum_matches (loc,cds) = - List.map cds ~f:(function -- | { pcd_name = cnstr; pcd_args = []; _} -> -+ | { pcd_args = Pcstr_record _; _} -> failwith "Pcstr_record unsupported" -+ | { pcd_name = cnstr; pcd_args = Pcstr_tuple []; _} -> - let lcstr = pstring ~loc (String.uncapitalize cnstr.txt) in - let str = pstring ~loc cnstr.txt in - [%pat? Sexplib.Sexp.List - (Sexplib.Sexp.Atom ([%p lcstr] | [%p str]) :: _) as sexp - ] --> - [%expr Sexplib.Conv_error.stag_no_args _tp_loc sexp] -- | { pcd_name = cnstr; pcd_args = _::_; _} -> -+ | { pcd_name = cnstr; pcd_args = Pcstr_tuple (_::_); _} -> - let lcstr = pstring ~loc (String.uncapitalize cnstr.txt) in - let str = pstring ~loc cnstr.txt in - [%pat? Sexplib.Sexp.Atom ([%p lcstr] | [%p str]) as sexp] --> -@@ -1479,13 +1486,14 @@ - internals @ externals) - |> List.concat - in -- [pstr_value ~loc Recursive bindings] -+ pstr_value_list ~loc Recursive bindings - | Nonrecursive -> - let bindings = - List.map tds ~f:(fun td -> - let internals,externals = td_of_sexp ~loc ~poly ~path td in -- [pstr_value ~loc Nonrecursive internals; -- pstr_value ~loc Nonrecursive externals]) -+ pstr_value_list ~loc Nonrecursive internals @ -+ pstr_value_list ~loc Nonrecursive externals -+ ) - |> List.concat - in - bindings -@@ -1496,7 +1504,7 @@ - internals @ externals) - |> List.concat - in -- [pstr_value ~loc rec_flag bindings] -+ pstr_value_list ~loc rec_flag bindings - end - - let type_of_sexp ~path ctyp = -diff -uNr ppx_sexp_conv-113.33.00/js-utils/gen_install.ml ppx_sexp_conv-113.33.01+4.03/js-utils/gen_install.ml ---- ppx_sexp_conv-113.33.00/js-utils/gen_install.ml 2016-03-09 16:44:54.000000000 +0100 -+++ ppx_sexp_conv-113.33.01+4.03/js-utils/gen_install.ml 2016-04-18 12:09:44.000000000 +0200 -@@ -31,7 +31,7 @@ - |> List.map (fun line -> Scanf.sscanf line "%[^=]=%S" (fun k v -> (k, v))) - - let remove_cwd = -- let prefix = Sys.getcwd () ^ "/" in -+ let prefix = Sys.getcwd () ^ Filename.dir_sep in - let len_prefix = String.length prefix in - fun fn -> - let len = String.length fn in -diff -uNr ppx_sexp_conv-113.33.00/_oasis ppx_sexp_conv-113.33.01+4.03/_oasis ---- ppx_sexp_conv-113.33.00/_oasis 2016-03-09 16:44:54.000000000 +0100 -+++ ppx_sexp_conv-113.33.01+4.03/_oasis 2016-04-18 12:09:44.000000000 +0200 -@@ -1,8 +1,8 @@ - OASISFormat: 0.4 --OCamlVersion: >= 4.02.3 -+OCamlVersion: >= 4.03.0 - FindlibVersion: >= 1.3.2 - Name: ppx_sexp_conv --Version: 113.33.00 -+Version: 113.33.01+4.03 - Synopsis: Generation of S-expression conversion functions from type definitions - Authors: Jane Street Group, LLC <opensource@janestreet.com> - Copyrights: (C) 2015-2016 Jane Street Group LLC <opensource@janestreet.com> -diff -uNr ppx_sexp_conv-113.33.00/opam ppx_sexp_conv-113.33.01+4.03/opam ---- ppx_sexp_conv-113.33.00/opam 2016-03-18 12:08:01.000000000 +0100 -+++ ppx_sexp_conv-113.33.01+4.03/opam 2016-04-18 12:27:13.000000000 +0200 -@@ -17,4 +17,4 @@ - "ppx_type_conv" - "sexplib" - ] --available: [ ocaml-version >= "4.02.3" ] -+available: [ ocaml-version >= "4.03.0" ] diff --git a/dev-ml/ppx_sexp_conv/ppx_sexp_conv-0.9.0.ebuild b/dev-ml/ppx_sexp_conv/ppx_sexp_conv-0.9.0.ebuild new file mode 100644 index 00000000000..f5d0e8d3410 --- /dev/null +++ b/dev-ml/ppx_sexp_conv/ppx_sexp_conv-0.9.0.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +DESCRIPTION="Support Library for type-driven code generators" +HOMEPAGE="https://github.com/janestreet/ppx_sexp_conv" +SRC_URI="https://github.com/janestreet/ppx_sexp_conv/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0/${PV}" +KEYWORDS="~amd64" +IUSE="" + +DEPEND=" + dev-ml/ppx_core:= + dev-ml/ppx_driver:= + dev-ml/ppx_type_conv:= + dev-ml/ppx_metaquot:= + dev-ml/sexplib:= + dev-ml/ocaml-migrate-parsetree:= + " +RDEPEND="${DEPEND}" +DEPEND="${DEPEND} dev-ml/opam dev-ml/jbuilder" + +src_install() { + opam-installer -i \ + --prefix="${ED}/usr" \ + --libdir="${D}/$(ocamlc -where)" \ + --docdir="${ED}/usr/share/doc/${PF}" \ + ${PN}.install || die +} diff --git a/dev-ml/ppx_sexp_conv/ppx_sexp_conv-113.33.00.ebuild b/dev-ml/ppx_sexp_conv/ppx_sexp_conv-113.33.00.ebuild deleted file mode 100644 index ea7fda7b466..00000000000 --- a/dev-ml/ppx_sexp_conv/ppx_sexp_conv-113.33.00.ebuild +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="5" - -inherit oasis eutils - -DESCRIPTION="Support Library for type-driven code generators" -HOMEPAGE="http://www.janestreet.com/ocaml" -SRC_URI="http://ocaml.janestreet.com/ocaml-core/${PV%.*}/files/${P}.tar.gz" - -LICENSE="Apache-2.0" -SLOT="0/${PV}" -KEYWORDS="~amd64" -IUSE="" - -DEPEND="dev-ml/ppx_tools:= - dev-ml/ppx_core:= - dev-ml/ppx_type_conv:= - dev-ml/sexplib:= - " - -RDEPEND="${DEPEND}" -DEPEND="${DEPEND} dev-ml/opam" - -src_prepare() { - has_version '>=dev-lang/ocaml-4.03' && epatch "${FILESDIR}/oc43.patch" -} - -src_configure() { - emake setup.exe - OASIS_SETUP_COMMAND="./setup.exe" oasis_src_configure -} - -src_compile() { - emake -} - -src_install() { - opam-installer -i \ - --prefix="${ED}/usr" \ - --libdir="${D}/$(ocamlc -where)" \ - --docdir="${ED}/usr/share/doc/${PF}" \ - ${PN}.install || die - dodoc CHANGES.md -} |