pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/js_of_ocaml Updated devel/js_of_ocaml to compile...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/136318e3c987
branches:  trunk
changeset: 373820:136318e3c987
user:      jaapb <jaapb%pkgsrc.org@localhost>
date:      Wed Jan 10 14:37:29 2018 +0000

description:
Updated devel/js_of_ocaml to compile with ocaml 4.06.

diffstat:

 devel/js_of_ocaml/Makefile                                                              |   4 +-
 devel/js_of_ocaml/PLIST                                                                 |  11 +-
 devel/js_of_ocaml/distinfo                                                              |   3 +-
 devel/js_of_ocaml/patches/patch-ppx_ppx__deriving__json_lib_ppx__deriving__json.cppo.ml |  64 ++++++++++
 4 files changed, 69 insertions(+), 13 deletions(-)

diffs (122 lines):

diff -r b576c65df9af -r 136318e3c987 devel/js_of_ocaml/Makefile
--- a/devel/js_of_ocaml/Makefile        Wed Jan 10 14:30:48 2018 +0000
+++ b/devel/js_of_ocaml/Makefile        Wed Jan 10 14:37:29 2018 +0000
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.21 2017/09/08 17:04:57 jaapb Exp $
+# $NetBSD: Makefile,v 1.22 2018/01/10 14:37:29 jaapb Exp $
 #
 
 GITHUB_PROJECT=        js_of_ocaml
 DISTNAME=      ${GITHUB_PROJECT}-3.0.0
-PKGREVISION=   1
+PKGREVISION=   2
 CATEGORIES=    devel
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=ocsigen/}
 
diff -r b576c65df9af -r 136318e3c987 devel/js_of_ocaml/PLIST
--- a/devel/js_of_ocaml/PLIST   Wed Jan 10 14:30:48 2018 +0000
+++ b/devel/js_of_ocaml/PLIST   Wed Jan 10 14:37:29 2018 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.13 2017/09/08 17:04:57 jaapb Exp $
+@comment $NetBSD: PLIST,v 1.14 2018/01/10 14:37:29 jaapb Exp $
 bin/js_of_ocaml
 bin/js_of_ocaml.exe
 bin/jsoo_link
@@ -6,15 +6,6 @@
 bin/jsoo_minify
 bin/jsoo_minify.exe
 ${PLIST.camlp4}${OCAML_SITELIB}/js_of_ocaml-camlp4/META
-${PLIST.camlp4}${PLIST.ocaml-opt}${OCAML_SITELIB}/js_of_ocaml-camlp4/deriving/pa_deriving_Json.a
-${PLIST.camlp4}${OCAML_SITELIB}/js_of_ocaml-camlp4/deriving/pa_deriving_Json.cma
-${PLIST.camlp4}${OCAML_SITELIB}/js_of_ocaml-camlp4/deriving/pa_deriving_Json.cmi
-${PLIST.camlp4}${OCAML_SITELIB}/js_of_ocaml-camlp4/deriving/pa_deriving_Json.cmt
-${PLIST.camlp4}${OCAML_SITELIB}/js_of_ocaml-camlp4/deriving/pa_deriving_Json.cmti
-${PLIST.camlp4}${PLIST.ocaml-opt}${OCAML_SITELIB}/js_of_ocaml-camlp4/deriving/pa_deriving_Json.cmx
-${PLIST.camlp4}${PLIST.ocaml-opt}${OCAML_SITELIB}/js_of_ocaml-camlp4/deriving/pa_deriving_Json.cmxa
-${PLIST.camlp4}${PLIST.ocaml-opt}${OCAML_SITELIB}/js_of_ocaml-camlp4/deriving/pa_deriving_Json.cmxs
-${PLIST.camlp4}${OCAML_SITELIB}/js_of_ocaml-camlp4/deriving/pa_deriving_Json.mli
 ${PLIST.camlp4}${OCAML_SITELIB}/js_of_ocaml-camlp4/opam
 ${PLIST.camlp4}${PLIST.ocaml-opt}${OCAML_SITELIB}/js_of_ocaml-camlp4/pa_js.a
 ${PLIST.camlp4}${OCAML_SITELIB}/js_of_ocaml-camlp4/pa_js.cma
diff -r b576c65df9af -r 136318e3c987 devel/js_of_ocaml/distinfo
--- a/devel/js_of_ocaml/distinfo        Wed Jan 10 14:30:48 2018 +0000
+++ b/devel/js_of_ocaml/distinfo        Wed Jan 10 14:37:29 2018 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.12 2017/09/08 13:19:34 jaapb Exp $
+$NetBSD: distinfo,v 1.13 2018/01/10 14:37:29 jaapb Exp $
 
 SHA1 (js_of_ocaml-3.0.0.tar.gz) = fe20efe864b2e52303ff71073b782ce203cae999
 RMD160 (js_of_ocaml-3.0.0.tar.gz) = 8863a224b6211a23d77d8c73a9461966779e65ce
@@ -6,3 +6,4 @@
 Size (js_of_ocaml-3.0.0.tar.gz) = 1433377 bytes
 SHA1 (patch-lib_generate_stubs.sh) = 120c972aa6aa30bd778134ce88d275e98067f4ca
 SHA1 (patch-lib_lwt_log_jbuild) = 414e17fc6ee78db2ec87e244259b939009b04336
+SHA1 (patch-ppx_ppx__deriving__json_lib_ppx__deriving__json.cppo.ml) = 38ff24c8490fefc97bd447059183a6e110c2b6e0
diff -r b576c65df9af -r 136318e3c987 devel/js_of_ocaml/patches/patch-ppx_ppx__deriving__json_lib_ppx__deriving__json.cppo.ml
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/js_of_ocaml/patches/patch-ppx_ppx__deriving__json_lib_ppx__deriving__json.cppo.ml   Wed Jan 10 14:37:29 2018 +0000
@@ -0,0 +1,64 @@
+$NetBSD: patch-ppx_ppx__deriving__json_lib_ppx__deriving__json.cppo.ml,v 1.1 2018/01/10 14:37:30 jaapb Exp $
+
+Compile with OCaml 4.06
+--- ppx/ppx_deriving_json/lib/ppx_deriving_json.cppo.ml.orig   2017-06-22 04:36:10.000000000 +0000
++++ ppx/ppx_deriving_json/lib/ppx_deriving_json.cppo.ml
+@@ -112,7 +112,11 @@ and write_body_of_tuple_type l ~arg ~pol
+ 
+ and write_poly_case r ~arg ~poly =
+   match r with
++#if OCAML_VERSION < (4, 06, 0)
+   | Parsetree.Rtag (label, _, _, l) ->
++#else
++  | Parsetree.Rtag ({txt=label;_}, _, _, l) ->
++#endif
+     let i = Ppx_deriving.hash_variant label
+     and n = List.length l in
+     let v = Ppx_deriving.fresh_var [] in
+@@ -221,7 +225,11 @@ let recognize_case_of_constructor i l =
+ let recognize_body_of_poly_variant l ~loc =
+   let l =
+     let f = function
++#if OCAML_VERSION < (4, 06, 0)
+       | Parsetree.Rtag (label, _, _, l) ->
++#else
++      | Parsetree.Rtag ({txt=label;_}, _, _, l) ->
++#endif
+         let i = Ppx_deriving.hash_variant label in
+         recognize_case_of_constructor i l
+       | Rinherit {ptyp_desc = Ptyp_constr (lid, _); _} ->
+@@ -246,7 +254,11 @@ let maybe_tuple_type = function
+   | l -> Ast_helper.Typ.tuple l
+ 
+ let rec read_poly_case ?decl y = function
++#if OCAML_VERSION < (4, 06, 0)
+   | Parsetree.Rtag (label, _, _, l) ->
++#else
++  | Parsetree.Rtag ({txt=label;_}, _, _, l) ->
++#endif
+     let i = Ppx_deriving.hash_variant label |> Ast_convenience.pint in
+     (match l with
+      | [] ->
+@@ -433,12 +445,22 @@ let json_str_wrap d e =
+ let json_str d =
+   let write =
+     let f acc id =
++#if OCAML_VERSION < (4, 05, 0)
++      let id = id in
++#else
++      let id = id.Location.txt in
++#endif
+       let poly = Ast_convenience.evar ("poly_" ^ id) in
+       [%expr [%e acc] (Deriving_Json.write [%e poly])]
+     and acc = suffix_decl d ~suffix:"to_json" in
+     Ppx_deriving.fold_left_type_decl f acc d
+   and read =
+     let f acc id =
++#if OCAML_VERSION < (4, 05, 0)
++      let id = id in
++#else
++      let id = id.Location.txt in
++#endif
+       let poly = Ast_convenience.evar ("poly_" ^ id) in
+       [%expr [%e acc] (Deriving_Json.read [%e poly])]
+     and acc = suffix_decl d ~suffix:"of_json" in



Home | Main Index | Thread Index | Old Index