dev-ml/ppx_bin_prot: Bump to 0.9.0
authorAlexis Ballier <aballier@gentoo.org>
Sat, 1 Apr 2017 16:12:09 +0000 (18:12 +0200)
committerAlexis Ballier <aballier@gentoo.org>
Sun, 2 Apr 2017 08:37:49 +0000 (10:37 +0200)
Package-Manager: Portage-2.3.5, Repoman-2.3.2

dev-ml/ppx_bin_prot/Manifest
dev-ml/ppx_bin_prot/files/oc43.patch [deleted file]
dev-ml/ppx_bin_prot/ppx_bin_prot-0.9.0.ebuild [new file with mode: 0644]
dev-ml/ppx_bin_prot/ppx_bin_prot-113.33.00.ebuild [deleted file]

index 89d988de44e62abc41e41c9503aa2fe5d18c21fc..0f09baa4f5dfb628faf0cbd96164a8ff41026b76 100644 (file)
@@ -1 +1 @@
-DIST ppx_bin_prot-113.33.00.tar.gz 68597 SHA256 958c10a6a621e861b1c58677d37ad711fd073331f5e60178adae31e214af0870 SHA512 5085187e7e82068628dd1c53de1313c6b2608c9fceb00c3c5ce924d5808b37b7f9dbd70926907f850e838e778d878dad4c8cc6404d25d06bab6e26af3e02890f WHIRLPOOL 86262b307a70deaac901cf8dffa8f5eb2de4b4d6bf36e2c542cd7c518845bd241424a8a0b18993804f663d7c6594e128b0b0695734b2161a7058c58ab326c4c8
+DIST ppx_bin_prot-0.9.0.tar.gz 35234 SHA256 c2ea25830089867abe991f8eacc20a4415956e8d5f3568f54d092cac5bbaf018 SHA512 f900741f4caeec86ec9d73a086ffeec21789bdd99ca7b09a808a3e281038d587c9c326cc1217957fcd828c4e1da5902f6dee3bf4ba7a22feca5424573215a00c WHIRLPOOL 49e67715f9a1b34a921a972c7e391a745dabd7aeffacca4c42bf1cf363791a6b514dd2ddf543b47a8634749ebb2aad2602433f44ada6f12369a42b64d5d9bbc4
diff --git a/dev-ml/ppx_bin_prot/files/oc43.patch b/dev-ml/ppx_bin_prot/files/oc43.patch
deleted file mode 100644 (file)
index d328d5b..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-diff -uNr ppx_bin_prot-113.33.00/_oasis ppx_bin_prot-113.33.00+4.03/_oasis
---- ppx_bin_prot-113.33.00/_oasis      2016-03-09 16:44:53.000000000 +0100
-+++ ppx_bin_prot-113.33.00+4.03/_oasis 2016-03-22 15:13:49.000000000 +0100
-@@ -1,8 +1,8 @@
- OASISFormat:      0.4
--OCamlVersion:     >= 4.02.3
-+OCamlVersion:     >= 4.03.0
- FindlibVersion:   >= 1.3.2
- Name:             ppx_bin_prot
--Version:          113.33.00
-+Version:          113.33.00+4.03
- Synopsis:         Generation of bin_prot readers and writers from types
- Authors:          Jane Street Group, LLC <opensource@janestreet.com>
- Copyrights:       (C) 2015-2016 Jane Street Group LLC <opensource@janestreet.com>
-diff -uNr ppx_bin_prot-113.33.00/opam ppx_bin_prot-113.33.00+4.03/opam
---- ppx_bin_prot-113.33.00/opam        2016-03-18 12:08:01.000000000 +0100
-+++ ppx_bin_prot-113.33.00+4.03/opam   2016-03-22 17:51:35.000000000 +0100
-@@ -17,4 +17,4 @@
-   "ppx_tools"     {>= "0.99.3"}
-   "ppx_type_conv"
- ]
--available: [ ocaml-version >= "4.02.3" ]
-+available: [ ocaml-version >= "4.03.0" ]
-diff -uNr ppx_bin_prot-113.33.00/src/ppx_bin_prot.ml ppx_bin_prot-113.33.00+4.03/src/ppx_bin_prot.ml
---- ppx_bin_prot-113.33.00/src/ppx_bin_prot.ml 2016-03-09 16:44:53.000000000 +0100
-+++ ppx_bin_prot-113.33.00+4.03/src/ppx_bin_prot.ml    2016-03-22 15:13:49.000000000 +0100
-@@ -37,7 +37,7 @@
-         ~init:result_type
-         ~f:(fun (tp, _variance) acc ->
-           let loc = tp.ptyp_loc in
--          ptyp_arrow ~loc "" (wrap_type ~loc tp) acc)
-+          ptyp_arrow ~loc Nolabel (wrap_type ~loc tp) acc)
-     in
-     psig_value ~loc (value_description ~loc ~name ~type_:typ ~prim:[])
-@@ -72,7 +72,12 @@
-     | Rinherit _ -> false)
- ;;
--let atoms_in_variant cds = List.exists cds ~f:(fun cds -> cds.pcd_args = [])
-+let atoms_in_variant cds =
-+  List.exists cds ~f:(fun cds ->
-+    match cds.pcd_args with
-+    | Pcstr_tuple [] -> true
-+    | Pcstr_tuple _ -> false
-+    | Pcstr_record _ -> failwith "Pcstr_record not supported")
- let let_ins loc bindings expr =
-   List.fold_right bindings ~init:expr ~f:(fun binding expr ->
-@@ -327,8 +332,8 @@
-            Location.raise_errorf ~loc:ty.ptyp_loc
-              "bin_size_sum: GADTs are not supported by bin_prot");
-         match cd.pcd_args with
--        | [] -> acc
--        | args ->
-+        | Pcstr_tuple [] -> acc
-+        | Pcstr_tuple args ->
-           let get_tp tp = tp in
-           let mk_patt loc v_name _ = pvar ~loc v_name in
-           let patts, size_args =
-@@ -344,7 +349,8 @@
-               let size = [%e size_tag] in
-               [%e size_args]
-             ]
--          :: acc)
-+          :: acc
-+        | Pcstr_record _ -> failwith "Pcstr_record not supported")
-     in
-     let matchings =
-       if atoms_in_variant alts then
-@@ -585,13 +591,13 @@
-            Location.raise_errorf ~loc:ty.ptyp_loc
-              "bin_write_sum: GADTs are not supported by bin_prot");
-         match cd.pcd_args with
--        | [] ->
-+        | Pcstr_tuple [] ->
-           let loc = cd.pcd_loc in
-           case
-             ~lhs:(pconstruct cd None)
-             ~guard:None
-             ~rhs:(eapply ~loc write_tag [eint ~loc i])
--        | args ->
-+        | Pcstr_tuple args ->
-           let get_tp tp = tp in
-           let mk_patt loc v_name _ = pvar ~loc v_name in
-           let patts, write_args =
-@@ -606,7 +612,8 @@
-             ~rhs:[%expr
-               let pos = [%e write_tag] [%e eint ~loc i] in
-               [%e write_args]
--            ])
-+            ]
-+        | Pcstr_record _ -> failwith "Pcstr_record not supported")
-     in
-     `Match matchings
-@@ -934,13 +941,14 @@
-          Location.raise_errorf ~loc:cd.pcd_loc
-            "bin_read_sum: GADTs are not supported by bin_prot");
-       match cd.pcd_args with
--      | [] ->
-+      | Pcstr_tuple [] ->
-         let loc = cd.pcd_loc in
-         case ~lhs:(pint ~loc mi) ~guard:None ~rhs:(econstruct cd None)
--      | args ->
-+      | Pcstr_tuple args ->
-         let bindings, args_expr = handle_arg_tp loc full_type_name args in
-         let rhs = let_ins loc bindings (econstruct cd (Some args_expr)) in
-         case ~lhs:(pint ~loc mi) ~guard:None ~rhs
-+      | Pcstr_record _ -> failwith "Pcstr_record not supported"
-     in
-     let mcs = List.mapi alts ~f:map in
-     let n_alts = List.length alts in
diff --git a/dev-ml/ppx_bin_prot/ppx_bin_prot-0.9.0.ebuild b/dev-ml/ppx_bin_prot/ppx_bin_prot-0.9.0.ebuild
new file mode 100644 (file)
index 0000000..6be0676
--- /dev/null
@@ -0,0 +1,35 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="Generation of bin_prot readers and writers from types"
+HOMEPAGE="https://github.com/janestreet/ppx_bin_prot"
+SRC_URI="https://github.com/janestreet/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0/${PV}"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND="
+       dev-lang/ocaml:=
+       dev-ml/bin-prot:=
+       dev-ml/ppx_core:=
+       dev-ml/ppx_driver:=
+       dev-ml/ppx_here:=
+       dev-ml/ppx_metaquot:=
+       dev-ml/ppx_type_conv:=
+       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_bin_prot/ppx_bin_prot-113.33.00.ebuild b/dev-ml/ppx_bin_prot/ppx_bin_prot-113.33.00.ebuild
deleted file mode 100644 (file)
index b219718..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-inherit oasis
-
-MY_P=${PN/-/_}-${PV}
-DESCRIPTION="Generation of bin_prot readers and writers from types"
-HOMEPAGE="http://www.janestreet.com/ocaml"
-SRC_URI="http://ocaml.janestreet.com/ocaml-core/${PV%.*}/files/${MY_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/bin-prot-113.24.00:=
-       "
-
-RDEPEND="${DEPEND}"
-DEPEND="${DEPEND} dev-ml/opam"
-
-S="${WORKDIR}/${MY_P}"
-
-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
-}