pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/devel/ocaml-deriving-ocsigen Added patches to devel/oc...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/c3d175537d88
branches:  trunk
changeset: 373829:c3d175537d88
user:      jaapb <jaapb%pkgsrc.org@localhost>
date:      Wed Jan 10 14:57:34 2018 +0000

description:
Added patches to devel/ocaml-deriving-ocsigen for OCaml 4.06.

diffstat:

 devel/ocaml-deriving-ocsigen/Makefile                                |   6 +-
 devel/ocaml-deriving-ocsigen/distinfo                                |   5 +-
 devel/ocaml-deriving-ocsigen/patches/patch-lib_deriving__Dump.ml     |  32 ++++++++++
 devel/ocaml-deriving-ocsigen/patches/patch-lib_deriving__interned.ml |  26 ++++++++
 devel/ocaml-deriving-ocsigen/patches/patch-syntax_common_utils.ml    |  14 ++++
 5 files changed, 79 insertions(+), 4 deletions(-)

diffs (125 lines):

diff -r e43567babc95 -r c3d175537d88 devel/ocaml-deriving-ocsigen/Makefile
--- a/devel/ocaml-deriving-ocsigen/Makefile     Wed Jan 10 14:48:49 2018 +0000
+++ b/devel/ocaml-deriving-ocsigen/Makefile     Wed Jan 10 14:57:34 2018 +0000
@@ -1,11 +1,11 @@
-# $NetBSD: Makefile,v 1.15 2017/09/08 09:51:20 jaapb Exp $
+# $NetBSD: Makefile,v 1.16 2018/01/10 14:57:34 jaapb Exp $
 #
 
 VERSION=       0.7.1
 GITHUB_PROJECT=        deriving
 DISTNAME=      ${GITHUB_PROJECT}-${VERSION}
 PKGNAME=       ocaml-${GITHUB_PROJECT}-ocsigen-${VERSION}
-PKGREVISION=   3
+PKGREVISION=   4
 COMMENT=       Extension to OCaml for deriving functions from type declarations
 CATEGORIES=    devel
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=ocsigen/}
@@ -18,8 +18,8 @@
 OCAML_USE_OASIS_DYNRUN=        yes
 OCAML_FINDLIB_DIRS=    deriving
 
-# Package actually needs ocaml-oasis to be installed
 .include "../../devel/ocaml-optcomp/buildlink3.mk"
 .include "../../lang/camlp4/buildlink3.mk"
+.include "../../math/ocaml-num/buildlink3.mk"
 .include "../../mk/ocaml.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r e43567babc95 -r c3d175537d88 devel/ocaml-deriving-ocsigen/distinfo
--- a/devel/ocaml-deriving-ocsigen/distinfo     Wed Jan 10 14:48:49 2018 +0000
+++ b/devel/ocaml-deriving-ocsigen/distinfo     Wed Jan 10 14:57:34 2018 +0000
@@ -1,6 +1,9 @@
-$NetBSD: distinfo,v 1.6 2016/06/17 10:48:57 jaapb Exp $
+$NetBSD: distinfo,v 1.7 2018/01/10 14:57:34 jaapb Exp $
 
 SHA1 (deriving-0.7.1.tar.gz) = b9c97910225081be8577eabdef798698db406e1d
 RMD160 (deriving-0.7.1.tar.gz) = 7a512dcf8ead03aeb9092b5e8ee4c9b90a13263f
 SHA512 (deriving-0.7.1.tar.gz) = d4c4b38321f2fc5ed1a9ea7910ec4fae15b08485ae9067048a609d5b9d76188da02995cd18a034c561494cdd3aa8dbb57a1a1c69918b1f79d70f89c96a26d342
 Size (deriving-0.7.1.tar.gz) = 68550 bytes
+SHA1 (patch-lib_deriving__Dump.ml) = bc905b5d1c697dcce0e84f359bdb047eb055a3a4
+SHA1 (patch-lib_deriving__interned.ml) = f261797e7987bbafdaddfed23002a0c54b3bf7ff
+SHA1 (patch-syntax_common_utils.ml) = ec24c7caa342ea93a7fa445e834848644e9537fb
diff -r e43567babc95 -r c3d175537d88 devel/ocaml-deriving-ocsigen/patches/patch-lib_deriving__Dump.ml
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/ocaml-deriving-ocsigen/patches/patch-lib_deriving__Dump.ml  Wed Jan 10 14:57:34 2018 +0000
@@ -0,0 +1,32 @@
+$NetBSD: patch-lib_deriving__Dump.ml,v 1.1 2018/01/10 14:57:35 jaapb Exp $
+
+Patch to compile with safe-string.
+--- lib/deriving_Dump.ml.orig  2016-05-25 16:51:52.000000000 +0000
++++ lib/deriving_Dump.ml
+@@ -142,7 +142,7 @@ module Dump_string = Defaults (
+         for i = 0 to len - 1 do
+           Bytes.unsafe_set s i (Stream.next stream)
+         done;
+-        s
++        Bytes.to_string s
+   end
+ )
+ 
+@@ -226,8 +226,8 @@ module Dump_alpha(P: sig type a end) = D
+   let from_stream _ = assert false
+ end)
+ 
+-module Dump_undumpable (P : sig type a val tname : string end) = Defaults ( 
+-  struct 
++module Dump_undumpable (P : sig type a val tname : string end) = Defaults (
++  struct
+     type a = P.a
+     let to_buffer _ _ = failwith ("Dump: attempt to serialise a value of unserialisable type : " ^ P.tname)
+     let from_stream _ = failwith ("Dump: attempt to deserialise a value of unserialisable type : " ^ P.tname)
+@@ -252,5 +252,5 @@ module Dump_via_marshal (P : sig type a 
+       let header = readn Marshal.header_size in
+       let datasize = Marshal.data_size header 0 in
+       let datapart = readn datasize in
+-        Marshal.from_string (header ^ datapart) 0
++        Marshal.from_bytes (Bytes.cat header datapart) 0
+   end)
diff -r e43567babc95 -r c3d175537d88 devel/ocaml-deriving-ocsigen/patches/patch-lib_deriving__interned.ml
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/ocaml-deriving-ocsigen/patches/patch-lib_deriving__interned.ml      Wed Jan 10 14:57:34 2018 +0000
@@ -0,0 +1,26 @@
+$NetBSD: patch-lib_deriving__interned.ml,v 1.1 2018/01/10 14:57:35 jaapb Exp $
+
+Patch to compile with safe-string.
+--- lib/deriving_interned.ml.orig      2016-05-25 16:51:52.000000000 +0000
++++ lib/deriving_interned.ml
+@@ -14,15 +14,16 @@ type t = int * string
+     deriving (Show)
+ 
+ let intern s =
+-  try BytesMap.find s !map
++      let bs = Bytes.of_string s in
++  try BytesMap.find bs !map
+   with Not_found ->
+-    let fresh = (!counter, Bytes.of_string s) in begin
+-      map := BytesMap.add s fresh !map;
++    let fresh = (!counter, s) in begin
++      map := BytesMap.add bs fresh !map;
+       incr counter;
+       fresh
+     end
+ 
+-let to_string (_,s) = Bytes.to_string s
++let to_string (_,s) = s
+ let name = snd
+ let compare (l,_) (r,_) = compare l r
+ let eq (l,_) (r,_) = l = r
diff -r e43567babc95 -r c3d175537d88 devel/ocaml-deriving-ocsigen/patches/patch-syntax_common_utils.ml
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/ocaml-deriving-ocsigen/patches/patch-syntax_common_utils.ml Wed Jan 10 14:57:34 2018 +0000
@@ -0,0 +1,14 @@
+$NetBSD: patch-syntax_common_utils.ml,v 1.1 2018/01/10 14:57:35 jaapb Exp $
+
+Patch to compile with safe-string.
+--- syntax/common/utils.ml.orig        2016-05-25 16:51:52.000000000 +0000
++++ syntax/common/utils.ml
+@@ -216,7 +216,7 @@ let random_id length =
+     for i = 0 to length - 1 do
+       Bytes.set s i idchars.[Random.int nidchars]
+     done;
+-    s
++    Bytes.to_string s
+ 
+ (* The function used in OCaml to convert variant labels to their
+    integer representations.  The formula is given in Jacques



Home | Main Index | Thread Index | Old Index