Added OCaml 4.06 support to misc/dose3 (and revbump).

This commit is contained in:
jaapb 2018-01-10 16:31:34 +00:00
parent 89b424f770
commit e6b767e38d
4 changed files with 33 additions and 5 deletions

View file

@ -1,7 +1,7 @@
# $NetBSD: Makefile,v 1.12 2017/09/08 09:51:24 jaapb Exp $
# $NetBSD: Makefile,v 1.13 2018/01/10 16:31:34 jaapb Exp $
DISTNAME= dose3-5.0.1
PKGREVISION= 1
PKGREVISION= 2
CATEGORIES= misc
MASTER_SITES= https://gforge.inria.fr/frs/download.php/file/36063/

View file

@ -1,4 +1,4 @@
# $NetBSD: buildlink3.mk,v 1.4 2017/07/11 10:32:28 jaapb Exp $
# $NetBSD: buildlink3.mk,v 1.5 2018/01/10 16:31:34 jaapb Exp $
BUILDLINK_TREE+= dose3
@ -6,7 +6,7 @@ BUILDLINK_TREE+= dose3
DOSE3_BUILDLINK3_MK:=
BUILDLINK_API_DEPENDS.dose3+= dose3>=5.0rc2
BUILDLINK_API_DEPENDS.dose3+= dose3>=5.0.1
BUILDLINK_API_DEPENDS.dose3+= dose3>=5.0.1nb2
BUILDLINK_PKGSRCDIR.dose3?= ../../misc/dose3
.include "../../devel/ocaml-extlib/buildlink3.mk"

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.4 2017/07/11 10:32:28 jaapb Exp $
$NetBSD: distinfo,v 1.5 2018/01/10 16:31:34 jaapb Exp $
SHA1 (dose3-5.0.1.tar.gz) = c2ed5c1b1f389d4e7cc58fbb01ca04c80df81a66
RMD160 (dose3-5.0.1.tar.gz) = 5e006235243a9bf6009ae8de4368d21c16b79413
@ -6,3 +6,4 @@ SHA512 (dose3-5.0.1.tar.gz) = e66526319446054041f138ee2633043d0832089f6a554cf566
Size (dose3-5.0.1.tar.gz) = 297433 bytes
SHA1 (patch-Makefile) = 1be9791f9d225d8adf81c309fd4c0aac1a6078ef
SHA1 (patch-Makefile.config.in) = cae3219764b2f9ba75ae8bdd3d79d9e2e71c7234
SHA1 (patch-common_criteria_lexer.mll) = e13ee091f509197332e79f5786b615bd009615a2

View file

@ -0,0 +1,27 @@
$NetBSD: patch-common_criteria_lexer.mll,v 1.1 2018/01/10 16:31:34 jaapb Exp $
Compatibility updates for safe-string (and ocaml 4.06)
--- common/criteria_lexer.mll.orig 2016-07-20 11:45:05.000000000 +0000
+++ common/criteria_lexer.mll
@@ -18,7 +18,7 @@
let c = Lexing.lexeme_char lexbuf 2 in (* the delimiter can be any character *)
(* find the terminating delimiter *)
let endpos =
- try String.index_from lexbuf.lex_buffer (lexbuf.lex_start_pos + 3) c with
+ try Bytes.index_from lexbuf.lex_buffer (lexbuf.lex_start_pos + 4) c with
|Invalid_argument _ ->
raise (Format822.Syntax_error (
Format822.error lexbuf "String too short"))
@@ -27,9 +27,9 @@
Format822.error lexbuf (Printf.sprintf "cannot find: %c" c)))
in
let len = endpos - (lexbuf.lex_start_pos + 3) in
- let s = String.sub lexbuf.lex_buffer (lexbuf.lex_start_pos + 3) len in
- lexbuf.Lexing.lex_curr_pos <- lexbuf.Lexing.lex_start_pos + ((String.length s)+4);
- s
+ let s = Bytes.sub lexbuf.lex_buffer (lexbuf.lex_start_pos + 3) len in
+ lexbuf.Lexing.lex_curr_pos <- lexbuf.Lexing.lex_start_pos + ((Bytes.length s)+4);
+ Bytes.to_string s
}