pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/converters/bibtex2html Fix build with ocaml 4.06.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/3d5230e88d93
branches:  trunk
changeset: 377217:3d5230e88d93
user:      dholland <dholland%pkgsrc.org@localhost>
date:      Wed Mar 14 08:28:44 2018 +0000

description:
Fix build with ocaml 4.06.

diffstat:

 converters/bibtex2html/distinfo                        |   5 +-
 converters/bibtex2html/patches/patch-biboutput.ml      |  59 ++++++++++++++++++
 converters/bibtex2html/patches/patch-bibtex__lexer.mll |  15 ++++
 converters/bibtex2html/patches/patch-condition.ml      |  17 +++++
 4 files changed, 95 insertions(+), 1 deletions(-)

diffs (117 lines):

diff -r 85a617d2185f -r 3d5230e88d93 converters/bibtex2html/distinfo
--- a/converters/bibtex2html/distinfo   Wed Mar 14 08:05:45 2018 +0000
+++ b/converters/bibtex2html/distinfo   Wed Mar 14 08:28:44 2018 +0000
@@ -1,6 +1,9 @@
-$NetBSD: distinfo,v 1.16 2015/11/03 01:43:47 agc Exp $
+$NetBSD: distinfo,v 1.17 2018/03/14 08:28:44 dholland Exp $
 
 SHA1 (bibtex2html-1.98.tar.gz) = daaa082885a30dae38263614565298d4862b8331
 RMD160 (bibtex2html-1.98.tar.gz) = f47dda14108c3f53bca64352bfb7455f1b79d964
 SHA512 (bibtex2html-1.98.tar.gz) = 7d8480ed87bef74a1e0c970446fba4d30b103df3e78f127a051efff875032ac7f52d3d6baab0c6a2fc67ca11f3d558d7be4439311934f99067993b5891ff6ad4
 Size (bibtex2html-1.98.tar.gz) = 92719 bytes
+SHA1 (patch-biboutput.ml) = 42d07071fd85fd1be47e522a4f957b53693d5b0d
+SHA1 (patch-bibtex__lexer.mll) = 207d8442dc87465cfed478d2d97445ba3bd90d9f
+SHA1 (patch-condition.ml) = f00078a8a16a6c47416e08b378d51db782f8e7f2
diff -r 85a617d2185f -r 3d5230e88d93 converters/bibtex2html/patches/patch-biboutput.ml
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/converters/bibtex2html/patches/patch-biboutput.ml Wed Mar 14 08:28:44 2018 +0000
@@ -0,0 +1,59 @@
+$NetBSD: patch-biboutput.ml,v 1.1 2018/03/14 08:28:44 dholland Exp $
+
+Fix build with ocaml 4.06.
+Silence deprecation warnings.
+
+--- biboutput.ml~      2014-07-04 07:51:21.000000000 +0000
++++ biboutput.ml
+@@ -32,7 +32,7 @@ let is_url s = Str.string_match url_re s
+ 
+ let print_atom html ch = function
+   | Id s ->
+-      if html & not (abbrev_is_implicit s) then
++      if html && not (abbrev_is_implicit s) then
+       begin
+         Html.open_href ch ("#" ^ s);
+         output_string ch s;
+@@ -40,7 +40,7 @@ let print_atom html ch = function
+       end
+       else
+       output_string ch s
+-  | String s when html & is_url s ->
++  | String s when html && is_url s ->
+       output_string ch "{";
+       Html.open_href ch s;
+       output_string ch s;
+@@ -131,9 +131,9 @@ let print_command remove rename html htm
+                      with Not_found -> field
+                    in
+                  output_string ch (",\n  " ^ ofield ^ " = ");
+-                 if html & field = "crossref" then
++                 if html && field = "crossref" then
+                    print_crossref html ch l
+-                 else if html & is_link_field field then
++                 else if html && is_link_field field then
+                    print_link_field ch l
+                  else
+                    print_atom_list html ch l
+@@ -162,17 +162,17 @@ let add_backslashes s =
+          | _ -> 1)
+   done;
+   if !n = String.length s then s else begin
+-    let s' = String.create !n in
++    let s' = Bytes.create !n in
+     n := 0;
+     for i = 0 to String.length s - 1 do
+       let c = String.unsafe_get s i in
+       begin match c with
+-        | ('\'' | '\\') -> String.unsafe_set s' !n '\\'; incr n
++        | ('\'' | '\\') -> Bytes.unsafe_set s' !n '\\'; incr n
+         | _ -> ()
+       end;
+-      String.unsafe_set s' !n c; incr n
++      Bytes.unsafe_set s' !n c; incr n
+     done;
+-    s'
++    Bytes.to_string s'
+   end
+ 
+ let php_print_atom ch = function
diff -r 85a617d2185f -r 3d5230e88d93 converters/bibtex2html/patches/patch-bibtex__lexer.mll
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/converters/bibtex2html/patches/patch-bibtex__lexer.mll    Wed Mar 14 08:28:44 2018 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-bibtex__lexer.mll,v 1.1 2018/03/14 08:28:44 dholland Exp $
+
+Silence deprecation warning.
+
+--- bibtex_lexer.mll~  2014-07-04 07:51:21.000000000 +0000
++++ bibtex_lexer.mll
+@@ -60,7 +60,7 @@ rule token = parse
+     (('{' | '(') as delim) space*
+        { serious := true; 
+        start_delim := delim; 
+-       match String.lowercase entry_type with 
++       match String.lowercase_ascii entry_type with 
+          | "string" -> 
+              Tabbrev
+          | "comment" -> 
diff -r 85a617d2185f -r 3d5230e88d93 converters/bibtex2html/patches/patch-condition.ml
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/converters/bibtex2html/patches/patch-condition.ml Wed Mar 14 08:28:44 2018 +0000
@@ -0,0 +1,17 @@
+$NetBSD: patch-condition.ml,v 1.1 2018/03/14 08:28:44 dholland Exp $
+
+Silence deprecation warnings.
+
+--- condition.ml~      2014-07-04 07:51:21.000000000 +0000
++++ condition.ml
+@@ -54,8 +54,8 @@ let evaluate_constante entrytype key fie
+ 
+ let eval_comp v1 op v2 = 
+   match op with
+-    | "=" -> String.lowercase v1 = String.lowercase v2
+-    | "<>" -> String.lowercase v1 <> String.lowercase v2          
++    | "=" -> String.lowercase_ascii v1 = String.lowercase_ascii v2
++    | "<>" -> String.lowercase_ascii v1 <> String.lowercase_ascii v2      
+     | "==" -> v1 = v2
+     | "!=" -> v1 <> v2            
+     | _ ->



Home | Main Index | Thread Index | Old Index