Wed Mar 14 09:14:05 2018 UTC ()
Fix build with ocaml 4.06.


(dholland)
diff -r1.6 -r1.7 pkgsrc/time/wyrd/distinfo
diff -r0 -r1.1 pkgsrc/time/wyrd/patches/patch-utility.ml

cvs diff -r1.6 -r1.7 pkgsrc/time/wyrd/Attic/distinfo (expand / switch to unified diff)

--- pkgsrc/time/wyrd/Attic/distinfo 2015/11/02 23:31:46 1.6
+++ pkgsrc/time/wyrd/Attic/distinfo 2018/03/14 09:14:05 1.7
@@ -1,8 +1,9 @@ @@ -1,8 +1,9 @@
1$NetBSD: distinfo,v 1.6 2015/11/02 23:31:46 agc Exp $ 1$NetBSD: distinfo,v 1.7 2018/03/14 09:14:05 dholland Exp $
2 2
3SHA1 (wyrd-1.4.6.tar.gz) = aaeca29b844825f45aadcf5207f4d1c875e4dc82 3SHA1 (wyrd-1.4.6.tar.gz) = aaeca29b844825f45aadcf5207f4d1c875e4dc82
4RMD160 (wyrd-1.4.6.tar.gz) = 47319812942195d4b56f861b7cbb527e94e7495f 4RMD160 (wyrd-1.4.6.tar.gz) = 47319812942195d4b56f861b7cbb527e94e7495f
5SHA512 (wyrd-1.4.6.tar.gz) = fc09c4567ea8d6225638ee6851ddab716665913b7d7b2f6b5a3cc7f2af9144df617e2a95ca78c74874bec3ff355aba028c7c51eafe1426d9ae803ab77ce84477 5SHA512 (wyrd-1.4.6.tar.gz) = fc09c4567ea8d6225638ee6851ddab716665913b7d7b2f6b5a3cc7f2af9144df617e2a95ca78c74874bec3ff355aba028c7c51eafe1426d9ae803ab77ce84477
6Size (wyrd-1.4.6.tar.gz) = 425829 bytes 6Size (wyrd-1.4.6.tar.gz) = 425829 bytes
7SHA1 (patch-Makefile.in) = 0dbd5042fa40810a76cb89b677ce3a71ececde9e 7SHA1 (patch-Makefile.in) = 0dbd5042fa40810a76cb89b677ce3a71ececde9e
8SHA1 (patch-curses_Makefile.in) = 26602a2b71bacd37555ad6a1c3966f7b25721f34 8SHA1 (patch-curses_Makefile.in) = 26602a2b71bacd37555ad6a1c3966f7b25721f34
 9SHA1 (patch-utility.ml) = 529b15bc306bddf41992a299001966e00f631e69

File Added: pkgsrc/time/wyrd/patches/Attic/patch-utility.ml
$NetBSD: patch-utility.ml,v 1.1 2018/03/14 09:14:05 dholland Exp $

Fix build with ocaml 4.06.

--- utility.ml~	2013-02-03 03:40:39.000000000 +0000
+++ utility.ml
@@ -270,7 +270,7 @@ let read_all_shell_command_output shell_
          let (read_list, _, _) = Unix.select (out_lst @ err_lst) [] [] (10.0) in
          if List.length read_list > 0 then begin
             let chan = List.hd read_list in
-            let buf = String.make 256 ' ' in
+            let buf = Bytes.make 256 ' ' in
             let chars_read = Unix.read chan buf 0 256 in
             if chars_read = 0 then
                (* no chars read indicates EOF *)
@@ -281,7 +281,7 @@ let read_all_shell_command_output shell_
             else
                (* if 1-256 characters are read, append them to the proper
                 * buffer and continue *)
-               let s = String.sub buf 0 chars_read in
+               let s = Bytes.to_string (Bytes.sub buf 0 chars_read) in
                if chan = out_read then
                   read_output (out_str ^ s) err_str out_done err_done
                else
@@ -354,11 +354,11 @@ let utf8_string_before s n =
          substr
       else
          let num_new_bytes = utf8_width s.[byte_pos] in
-         let new_bytes = String.make num_new_bytes s.[byte_pos] in
+         let new_bytes = Bytes.make num_new_bytes s.[byte_pos] in
          for i = 1 to pred num_new_bytes do
-            new_bytes.[i] <- s.[byte_pos + i]
+            Bytes.set new_bytes i s.[byte_pos + i]
          done;
-         build_substr (substr ^ new_bytes) (succ utf8_pos) 
+         build_substr (substr ^ (Bytes.to_string new_bytes)) (succ utf8_pos) 
             (byte_pos + num_new_bytes)
    in
    if Curses.Curses_config.wide_ncurses then