diff options
Diffstat (limited to 'dev-ml')
-rw-r--r-- | dev-ml/ppx_fields_conv/Manifest | 2 | ||||
-rw-r--r-- | dev-ml/ppx_fields_conv/files/oc43.patch | 223 | ||||
-rw-r--r-- | dev-ml/ppx_fields_conv/ppx_fields_conv-0.9.0.ebuild (renamed from dev-ml/ppx_fields_conv/ppx_fields_conv-113.33.00.ebuild) | 30 |
3 files changed, 9 insertions, 246 deletions
diff --git a/dev-ml/ppx_fields_conv/Manifest b/dev-ml/ppx_fields_conv/Manifest index 001635eade4..cb6014ad986 100644 --- a/dev-ml/ppx_fields_conv/Manifest +++ b/dev-ml/ppx_fields_conv/Manifest @@ -1 +1 @@ -DIST ppx_fields_conv-113.33.00.tar.gz 60510 SHA256 33f70d23679530bb50c3b3f518b578a4f6a90a5301032ddb39ba42a42f4b9193 SHA512 cfda9fdefda933c8bd4d7c5791df96642c0ce94a45e5b69b30300d255e4d8a0d8d872008a914f5d51d7611f1a26162af9a56f6b752c9ee33f131ade85d4bfeca WHIRLPOOL 0b30347da9b6dedd87ac4cdaa1fd16f194e6a056b516edaaafa541063720ca0d48791e24eb31ba2bc6374f9aa287835eb879d4dd1d959d26848fccea791b0028 +DIST ppx_fields_conv-0.9.0.tar.gz 15171 SHA256 ddededc293a5eb933dbaa27b5dd273fd8f7e723fabd60c0df405f2a14061ef1d SHA512 1edcd7076c1dbba84b86f05624b3792404b24ae4414ee0c3b32dcfc998da77a2a9d52d063fefc24be21d98472d6f58880c37ac29c610fb5b8a401224fc654ec1 WHIRLPOOL 762170b3fa2d3dd6abb8ecda2d51692667783df86aebe8603b8b7effbb9ffa1f165f9b19f51a330b86005adba4638d172c0c3427ce18209d7247638def2d4178 diff --git a/dev-ml/ppx_fields_conv/files/oc43.patch b/dev-ml/ppx_fields_conv/files/oc43.patch deleted file mode 100644 index f1cc40c1501..00000000000 --- a/dev-ml/ppx_fields_conv/files/oc43.patch +++ /dev/null @@ -1,223 +0,0 @@ -diff -uNr ppx_fields_conv-113.33.00/_oasis ppx_fields_conv-113.33.00+4.03/_oasis ---- ppx_fields_conv-113.33.00/_oasis 2016-03-09 16:44:54.000000000 +0100 -+++ ppx_fields_conv-113.33.00+4.03/_oasis 2016-03-22 15:13:50.000000000 +0100 -@@ -1,8 +1,8 @@ - OASISFormat: 0.4 --OCamlVersion: >= 4.02.3 -+OCamlVersion: >= 4.03.0 - FindlibVersion: >= 1.3.2 - Name: ppx_fields_conv --Version: 113.33.00 -+Version: 113.33.00+4.03 - Synopsis: Generation of accessor and iteration functions for ocaml records - Authors: Jane Street Group, LLC <opensource@janestreet.com> - Copyrights: (C) 2015-2016 Jane Street Group LLC <opensource@janestreet.com> -diff -uNr ppx_fields_conv-113.33.00/opam ppx_fields_conv-113.33.00+4.03/opam ---- ppx_fields_conv-113.33.00/opam 2016-03-18 12:08:01.000000000 +0100 -+++ ppx_fields_conv-113.33.00+4.03/opam 2016-03-22 17:51:36.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_fields_conv-113.33.00/src/ppx_fields_conv.ml ppx_fields_conv-113.33.00+4.03/src/ppx_fields_conv.ml ---- ppx_fields_conv-113.33.00/src/ppx_fields_conv.ml 2016-03-09 16:44:54.000000000 +0100 -+++ ppx_fields_conv-113.33.00+4.03/src/ppx_fields_conv.ml 2016-03-22 15:13:50.000000000 +0100 -@@ -18,7 +18,7 @@ - module A = struct (* Additional AST construction helpers *) - - let exp_string : (loc:Location.t -> string -> expression) = fun ~loc s -> -- pexp_constant ~loc (Const_string (s,None)) -+ pexp_constant ~loc (Pconst_string (s,None)) - - let pat_name : (loc:Location.t -> string -> pattern) = fun ~loc name -> - ppat_var ~loc (Location.mkloc name loc) -@@ -115,10 +115,10 @@ - let apply_type ~loc ~ty_name ~tps = - ptyp_constr ~loc (A.lid_name ~loc ty_name) tps - -- let label_arg name ty = (name,ty) -+ let label_arg name ty = (Asttypes.Labelled name,ty) - - let field_arg ~loc ~private_ ~record -- (f: field:core_type -> ty:core_type -> 'a) labdec : string * 'a = -+ (f: field:core_type -> ty:core_type -> 'a) labdec : Asttypes.arg_label * 'a = - let {pld_name=name; pld_type=ty; _} = labdec in - label_arg name.txt ( - f ~field:(field_t ~loc private_ [record; ty]) ~ty) -@@ -133,7 +133,7 @@ - let types = List.mapi labdecs ~f in - let create_record_f = [%type: 'input__ -> ([%t record]) ] in - let t = Create.lambda_sig ~loc -- (types @ [ "", acc 0 ]) -+ (types @ [ Nolabel, acc 0 ]) - ([%type: ( [%t create_record_f] * [%t acc (List.length labdecs)]) ]) - in - A.sig_item ~loc "make_creator" t -@@ -153,7 +153,7 @@ - let acc i = - ptyp_var ~loc ("acc__" ^ string_of_int i) - in -- let f i arg : (string * core_type) = -+ let f i arg : (Asttypes.arg_label * core_type) = - field_arg ~loc ~private_ ~record (fun ~field ~ty:_ -> - [%type: [%t acc i] -> [%t field] -> [%t acc (i+1)]]) arg - in -@@ -177,7 +177,7 @@ - let types = List.mapi labdecs ~f in - let init_ty = label_arg "init" (acc 0) in - let t = -- Create.lambda_sig ~loc (("",record) :: init_ty :: types) (acc (List.length labdecs)) -+ Create.lambda_sig ~loc ((Nolabel,record) :: init_ty :: types) (acc (List.length labdecs)) - in - A.sig_item ~loc "fold" t - -@@ -194,7 +194,7 @@ - let f = field_arg ~loc ~private_ ~record (fun ~field ~ty:field_ty -> - [%type: [%t field] -> [%t record] -> [%t field_ty] -> bool ] ) in - let types = List.map labdecs ~f in -- let t = Create.lambda_sig ~loc (("",record) :: types) [%type: bool ] in -+ let t = Create.lambda_sig ~loc ((Nolabel,record) :: types) [%type: bool ] in - A.sig_item ~loc fun_name t - - let iter_fun ~private_ ~ty_name ~tps ~loc labdecs = -@@ -210,7 +210,7 @@ - let f = field_arg ~loc ~private_ ~record (fun ~field ~ty:field_ty -> - [%type: [%t field] -> [%t record] -> [%t field_ty] -> unit ]) in - let types = List.map labdecs ~f in -- let t = Create.lambda_sig ~loc (("",record) :: types) [%type: unit ] in -+ let t = Create.lambda_sig ~loc ((Nolabel,record) :: types) [%type: unit ] in - A.sig_item ~loc "iter" t - - let to_list_fun ~private_ ~ty_name ~tps ~loc labdecs = -@@ -227,7 +227,7 @@ - let f = field_arg ~loc ~private_ ~record (fun ~field ~ty:field_ty -> - [%type: [%t field] -> [%t record] -> [%t field_ty] -> 'elem__ ]) in - let types = List.map labdecs ~f in -- let t = Create.lambda_sig ~loc (("",record) :: types) [%type: 'elem__ list] in -+ let t = Create.lambda_sig ~loc ((Nolabel,record) :: types) [%type: 'elem__ list] in - A.sig_item ~loc "to_list" t - - let map_fun ~ty_name ~tps ~loc labdecs = -@@ -243,7 +243,7 @@ - let f = field_arg ~loc ~private_:Public ~record (fun ~field ~ty:field_ty -> - [%type: [%t field] -> [%t record] -> [%t field_ty] -> [%t field_ty] ]) in - let types = List.map labdecs ~f in -- let t = Create.lambda_sig ~loc (("",record) :: types) record in -+ let t = Create.lambda_sig ~loc ((Nolabel,record) :: types) record in - A.sig_item ~loc "map" t - - let map_poly ~private_ ~ty_name ~tps ~loc _ = -@@ -281,7 +281,7 @@ - List.fold_right labdecs ~init:[%type: unit] ~f:(fun labdec acc -> - match labdec.pld_mutable with - | Immutable -> acc -- | Mutable -> ptyp_arrow ~loc labdec.pld_name.txt labdec.pld_type acc -+ | Mutable -> ptyp_arrow ~loc (Labelled labdec.pld_name.txt) labdec.pld_type acc - ) - in - A.sig_item ~loc "set_all_mutable_fields" [%type: [%t record] -> [%t labels]] -@@ -440,7 +440,7 @@ - match label with - | None -> name - | Some n -> n in -- l, -+ (Labelled l), - A.pat_name ~loc name - - let label_arg_fun ~loc name = -@@ -460,7 +460,7 @@ - ~expr:[%expr [%e A.exp_name ~loc (field_name ^ "_gen__")] acc__] - ] acc) - in -- Create.lambda ~loc [ ("",[%pat? acc__ ]) ] body -+ Create.lambda ~loc [ (Nolabel,[%pat? acc__ ]) ] body - in - let patterns = List.map names ~f:(label_arg_fun ~loc) in - let body0 = [%expr ([%e f], compile_acc__) ] in -@@ -480,7 +480,7 @@ - compile_acc__] - ] acc) - in -- let f = Create.lambda ~loc (patterns @ [ ("",[%pat? compile_acc__ ]) ]) body in -+ let f = Create.lambda ~loc (patterns @ [ (Nolabel,[%pat? compile_acc__ ]) ]) body in - A.str_item ~loc "make_creator" f - - let simple_creation_fun ~loc _record_name labdecs = -@@ -515,7 +515,7 @@ - let body = List.fold_left names ~init:[%expr init__ ] ~f:field_fold in - let patterns = List.map names ~f:(label_arg_fun ~loc) in - let init = label_arg ~label:"init" ~loc "init__" in -- let lambda = Create.lambda ~loc ( ("",[%pat? record__ ]) :: init :: patterns ) body in -+ let lambda = Create.lambda ~loc ( (Nolabel,[%pat? record__ ]) :: init :: patterns ) body in - A.str_item ~loc "fold" lambda - - let and_fun ~loc labdecs = -@@ -540,7 +540,7 @@ - in - let body = List.fold_left names ~init:(A.exp_true ~loc) ~f:field_fold in - let patterns = List.map names ~f:(label_arg_fun ~loc) in -- let lambda = Create.lambda ~loc (("",[%pat? record__ ]) :: patterns) body in -+ let lambda = Create.lambda ~loc ((Nolabel,[%pat? record__ ]) :: patterns) body in - A.str_item ~loc "for_all" lambda - - let or_fun ~loc labdecs = -@@ -566,7 +566,7 @@ - let body = - List.fold_left names ~init:[%expr false ] ~f:field_fold in - let patterns = List.map names ~f:(label_arg_fun ~loc) in -- let lambda = Create.lambda ~loc (("",[%pat? record__ ]) :: patterns) body in -+ let lambda = Create.lambda ~loc ((Nolabel,[%pat? record__ ]) :: patterns) body in - A.str_item ~loc "exists" lambda - - let iter_fun ~loc labdecs = -@@ -599,7 +599,7 @@ - ~init:(iter_field (List.hd names)) - ~f:(fun acc n -> [%expr ( [%e acc] ; [%e iter_field n] ) ]) in - let patterns = List.map names ~f:(label_arg_fun ~loc) in -- let lambda = Create.lambda ~loc (("",[%pat? record__ ]) :: patterns) body in -+ let lambda = Create.lambda ~loc ((Nolabel,[%pat? record__ ]) :: patterns) body in - A.str_item ~loc "iter" lambda - - let map_fun ~loc labdecs = -@@ -624,7 +624,7 @@ - in (field_name, e ))) - in - let patterns = List.map names ~f:(label_arg_fun ~loc) in -- let lambda = Create.lambda ~loc (("",[%pat? record__ ]) :: patterns) body in -+ let lambda = Create.lambda ~loc ((Nolabel,[%pat? record__ ]) :: patterns) body in - A.str_item ~loc "map" lambda - - let to_list_fun ~loc labdecs = -@@ -649,7 +649,7 @@ - :: [%e tail] ] - in - let body = List.fold_right names ~init:[%expr [ ] ] ~f:fold in -- let lambda = Create.lambda ~loc (("",[%pat? record__ ]) :: patterns) body in -+ let lambda = Create.lambda ~loc ((Nolabel,[%pat? record__ ]) :: patterns) body in - A.str_item ~loc "to_list" lambda - - let map_poly ~loc labdecs = -@@ -658,7 +658,7 @@ - [%expr record__.Fieldslib.Field.f [%e A.exp_name ~loc name] :: [%e acc] ] - in - let body = List.fold_right names ~init:[%expr []] ~f:fold in -- A.str_item ~loc "map_poly" (pexp_fun ~loc "" None [%pat? record__] body) -+ A.str_item ~loc "map_poly" (pexp_fun ~loc Nolabel None [%pat? record__] body) - - let sequence_ ~loc xs = - match (List.rev xs) with -@@ -688,10 +688,10 @@ - | Immutable -> acc - | Mutable -> - let field_name = labdec.pld_name.txt in -- pexp_fun ~loc field_name None (A.pat_name ~loc field_name) acc) -+ pexp_fun ~loc (Labelled field_name) None (A.pat_name ~loc field_name) acc) - in - A.str_item ~loc "set_all_mutable_fields" ( -- pexp_fun ~loc "" None (A.pat_name ~loc record_name) function_) -+ pexp_fun ~loc Nolabel None (A.pat_name ~loc record_name) function_) - - let record ~private_ ~record_name ~loc (labdecs:label_declaration list) : structure = - let getter_and_setters, fields = gen_fields ~private_ ~loc labdecs in diff --git a/dev-ml/ppx_fields_conv/ppx_fields_conv-113.33.00.ebuild b/dev-ml/ppx_fields_conv/ppx_fields_conv-0.9.0.ebuild index 34ab331c85e..f1c457e311c 100644 --- a/dev-ml/ppx_fields_conv/ppx_fields_conv-113.33.00.ebuild +++ b/dev-ml/ppx_fields_conv/ppx_fields_conv-0.9.0.ebuild @@ -1,13 +1,11 @@ -# Copyright 1999-2015 Gentoo Foundation +# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -EAPI="5" - -inherit oasis +EAPI=6 DESCRIPTION="Generation of accessor and iteration functions for ocaml records" -HOMEPAGE="http://www.janestreet.com/ocaml" -SRC_URI="http://ocaml.janestreet.com/ocaml-core/${PV%.*}/files/${P}.tar.gz" +HOMEPAGE="https://github.com/janestreet/ppx_fields_conv" +SRC_URI="https://github.com/janestreet/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" LICENSE="Apache-2.0" SLOT="0/${PV}" @@ -15,26 +13,15 @@ KEYWORDS="~amd64" IUSE="" DEPEND=" - dev-ml/ppx_tools:= dev-ml/ppx_core:= + dev-ml/ppx_driver:= + dev-ml/ppx_metaquot:= dev-ml/ppx_type_conv:= dev-ml/fieldslib:= + dev-ml/ocaml-migrate-parsetree:= " 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 -} +DEPEND="${DEPEND} dev-ml/opam dev-ml/jbuilder" src_install() { opam-installer -i \ @@ -42,5 +29,4 @@ src_install() { --libdir="${D}/$(ocamlc -where)" \ --docdir="${ED}/usr/share/doc/${PF}" \ ${PN}.install || die - dodoc CHANGES.md } |