From 83a6c73dff37fe418d247c91b99c05b235cd2753 Mon Sep 17 00:00:00 2001 From: Thierry Thomas Date: Sun, 20 Mar 2022 11:52:22 +0100 Subject: [PATCH] devel/ocaml-camomile: make it builld with recent OCaml Remark: this project seems abandonned, and patches have been taken from the forked repository . To avoid these patches it could be better to switch to this repository. --- devel/ocaml-camomile/Makefile | 13 ++++++- .../ocaml-camomile/files/patch-Camomile_dune | 11 ++++++ ...ch-Camomile_internal_byte__labeled__dag.ml | 11 ++++++ .../files/patch-Camomile_internal_unidata.ml | 16 ++++++++ .../patch-Camomile_public_charEncoding.ml | 17 +++++++++ .../patch-Camomile_public_charEncoding.mli | 17 +++++++++ .../files/patch-Camomile_public_oOChannel.mli | 12 ++++++ .../files/patch-Camomile_public_uCS4.ml | 18 +++++++++ .../files/patch-Camomile_public_uCS4.mli | 14 +++++++ .../files/patch-Camomile_public_uCol.ml | 37 +++++++++++++++++++ .../files/patch-Camomile_public_uTF16.ml | 11 ++++++ .../files/patch-Camomile_public_uTF16.mli | 14 +++++++ .../files/patch-Camomile_public_uTF8.ml | 11 ++++++ .../files/patch-Camomile_tools_dune | 19 ++++++++++ ...tch-Camomile_tools_parse__specialcasing.ml | 16 ++++++++ .../files/patch-Camomile_toolslib_absCe.ml | 11 ++++++ .../files/patch-Camomile_toolslib_dune | 11 ++++++ devel/ocaml-camomile/files/patch-Makefile | 10 +++++ devel/ocaml-camomile/files/patch-README.md | 11 ++++++ ...atch-camomile-test_tester_test__caseMap.ml | 16 ++++++++ .../patch-camomile-test_tester_uCS4__test.ml | 11 ++++++ .../patch-camomile-test_tester_uTF16__test.ml | 23 ++++++++++++ .../ocaml-camomile/files/patch-camomile.opam | 14 +++++++ devel/ocaml-camomile/files/patch-dune-project | 11 ++++++ .../files/patch-dune-workspace.dev | 8 ++++ devel/ocaml-camomile/pkg-descr | 1 + 26 files changed, 362 insertions(+), 2 deletions(-) create mode 100644 devel/ocaml-camomile/files/patch-Camomile_dune create mode 100644 devel/ocaml-camomile/files/patch-Camomile_internal_byte__labeled__dag.ml create mode 100644 devel/ocaml-camomile/files/patch-Camomile_internal_unidata.ml create mode 100644 devel/ocaml-camomile/files/patch-Camomile_public_charEncoding.ml create mode 100644 devel/ocaml-camomile/files/patch-Camomile_public_charEncoding.mli create mode 100644 devel/ocaml-camomile/files/patch-Camomile_public_oOChannel.mli create mode 100644 devel/ocaml-camomile/files/patch-Camomile_public_uCS4.ml create mode 100644 devel/ocaml-camomile/files/patch-Camomile_public_uCS4.mli create mode 100644 devel/ocaml-camomile/files/patch-Camomile_public_uCol.ml create mode 100644 devel/ocaml-camomile/files/patch-Camomile_public_uTF16.ml create mode 100644 devel/ocaml-camomile/files/patch-Camomile_public_uTF16.mli create mode 100644 devel/ocaml-camomile/files/patch-Camomile_public_uTF8.ml create mode 100644 devel/ocaml-camomile/files/patch-Camomile_tools_dune create mode 100644 devel/ocaml-camomile/files/patch-Camomile_tools_parse__specialcasing.ml create mode 100644 devel/ocaml-camomile/files/patch-Camomile_toolslib_absCe.ml create mode 100644 devel/ocaml-camomile/files/patch-Camomile_toolslib_dune create mode 100644 devel/ocaml-camomile/files/patch-Makefile create mode 100644 devel/ocaml-camomile/files/patch-README.md create mode 100644 devel/ocaml-camomile/files/patch-camomile-test_tester_test__caseMap.ml create mode 100644 devel/ocaml-camomile/files/patch-camomile-test_tester_uCS4__test.ml create mode 100644 devel/ocaml-camomile/files/patch-camomile-test_tester_uTF16__test.ml create mode 100644 devel/ocaml-camomile/files/patch-camomile.opam create mode 100644 devel/ocaml-camomile/files/patch-dune-project create mode 100644 devel/ocaml-camomile/files/patch-dune-workspace.dev diff --git a/devel/ocaml-camomile/Makefile b/devel/ocaml-camomile/Makefile index 7f0fd12383b1..e38735292f30 100644 --- a/devel/ocaml-camomile/Makefile +++ b/devel/ocaml-camomile/Makefile @@ -2,6 +2,7 @@ PORTNAME= camomile PORTVERSION= 1.0.2 +PORTREVISION= 1 CATEGORIES= devel PKGNAMEPREFIX= ocaml- @@ -10,7 +11,10 @@ COMMENT= Comprehensive Unicode library for Objective Caml LICENSE= LGPL21 -BUILD_DEPENDS= jbuilder:devel/ocaml-dune +BUILD_DEPENDS= dune:devel/ocaml-dune \ + ocaml-stdlib-shims>0:devel/ocaml-stdlib-shims \ + ocaml-camlp-streams>0:devel/ocaml-camlp-streams \ + ocaml-bigarray-compat>0:devel/ocaml-bigarray-compat USES= gmake USE_GITHUB= yes @@ -25,7 +29,7 @@ PORTDOCS= CHANGES.md LICENSE.md README.md OPTIONS_DEFINE= DOCS -post-patch: +pre-configure: @${REINPLACE_CMD} -e '/^INSTALL_ARGS/ \ s:$$: $$(if $$(LIBDIR),--libdir $$(LIBDIR),):' \ ${WRKSRC}/Makefile @@ -33,4 +37,9 @@ post-patch: ${WRKSRC}/Camomile/public/uCharInfo.mli \ ${WRKSRC}/Camomile/public/stringPrep.ml* +post-install: + ${RM} ${STAGEDIR}${DOCSDIR}/README.md.orig + ${FIND} ${STAGEDIR}${PREFIX}/${OCAML_SITELIBDIR}/${PORTNAME} -name "*.cmxs" | \ + ${XARGS} ${STRIP_CMD} + .include diff --git a/devel/ocaml-camomile/files/patch-Camomile_dune b/devel/ocaml-camomile/files/patch-Camomile_dune new file mode 100644 index 000000000000..0733a6f4f424 --- /dev/null +++ b/devel/ocaml-camomile/files/patch-Camomile_dune @@ -0,0 +1,11 @@ +--- Camomile/dune.orig 2019-08-08 07:10:33 UTC ++++ Camomile/dune +@@ -9,7 +9,7 @@ + (name camomileLibrary) + (public_name camomile.library) + (wrapped true) +- (libraries bigarray camomileDefaultConfig) ++ (libraries bigarray-compat camomileDefaultConfig camlp-streams stdlib-shims) + (modules + :standard \ camomileDefaultConfig + camomile_do_not_use diff --git a/devel/ocaml-camomile/files/patch-Camomile_internal_byte__labeled__dag.ml b/devel/ocaml-camomile/files/patch-Camomile_internal_byte__labeled__dag.ml new file mode 100644 index 000000000000..1c54e490dcdb --- /dev/null +++ b/devel/ocaml-camomile/files/patch-Camomile_internal_byte__labeled__dag.ml @@ -0,0 +1,11 @@ +--- Camomile/internal/byte_labeled_dag.ml.orig 2019-08-08 07:10:33 UTC ++++ Camomile/internal/byte_labeled_dag.ml +@@ -87,7 +87,7 @@ let make_bytes def vs = + branch.(Char.code c') <- Some node; + scan d c leaf branch rest + in +- let comp (s1, _) (s2, _) = Pervasives.compare s1 s2 in ++ let comp (s1, _) (s2, _) = Stdlib.compare s1 s2 in + let vs = List.sort comp vs in + match vs with + (_, _) :: _ -> diff --git a/devel/ocaml-camomile/files/patch-Camomile_internal_unidata.ml b/devel/ocaml-camomile/files/patch-Camomile_internal_unidata.ml new file mode 100644 index 000000000000..2ad3d4ff6ad8 --- /dev/null +++ b/devel/ocaml-camomile/files/patch-Camomile_internal_unidata.ml @@ -0,0 +1,16 @@ +--- Camomile/internal/unidata.ml.orig 2019-08-08 07:10:33 UTC ++++ Camomile/internal/unidata.ml +@@ -299,13 +299,6 @@ module Make (Config : ConfigInt.Type) = struct + | `Buhid + | `Tagbanwa ] + +- (* little hack to maintain 4.02.3 compat with warnings *) +- module String = struct +- [@@@ocaml.warning "-3-32"] +- let lowercase_ascii = StringLabels.lowercase +- include String +- end +- + let script_of_name name = + match String.lowercase_ascii name with + | "common" -> `Common diff --git a/devel/ocaml-camomile/files/patch-Camomile_public_charEncoding.ml b/devel/ocaml-camomile/files/patch-Camomile_public_charEncoding.ml new file mode 100644 index 000000000000..2184d2265b87 --- /dev/null +++ b/devel/ocaml-camomile/files/patch-Camomile_public_charEncoding.ml @@ -0,0 +1,17 @@ +--- Camomile/public/charEncoding.ml.orig 2019-08-08 07:10:33 UTC ++++ Camomile/public/charEncoding.ml +@@ -131,12 +131,12 @@ module type Interface = sig + {!OOChannel.obj_output_channel} which + receives Unicode characters and outputs them to [outchan] using + the encoding [enc]. *) +- class out_channel : t -> Pervasives.out_channel -> [UChar.t] obj_output_channel ++ class out_channel : t -> Stdlib.out_channel -> [UChar.t] obj_output_channel + + (** [new in_channel enc inchan] creates the intput channel object + {!OOChannel.obj_input_channel} which + reads bytes from [inchan] and converts them to Unicode characters. *) +- class in_channel : t -> Pervasives.in_channel -> [UChar.t] obj_input_channel ++ class in_channel : t -> Stdlib.in_channel -> [UChar.t] obj_input_channel + + (** [ustream_of enc chars] converts the byte stream [chars] + to the Unicode character stream by the encoding [enc]. *) diff --git a/devel/ocaml-camomile/files/patch-Camomile_public_charEncoding.mli b/devel/ocaml-camomile/files/patch-Camomile_public_charEncoding.mli new file mode 100644 index 000000000000..6eeda087d6ea --- /dev/null +++ b/devel/ocaml-camomile/files/patch-Camomile_public_charEncoding.mli @@ -0,0 +1,17 @@ +--- Camomile/public/charEncoding.mli.orig 2019-08-08 07:10:33 UTC ++++ Camomile/public/charEncoding.mli +@@ -130,12 +130,12 @@ module type Interface = sig + {!OOChannel.obj_output_channel} which + receives Unicode characters and outputs them to [outchan] using + the encoding [enc]. *) +- class out_channel : t -> Pervasives.out_channel -> [UChar.t] obj_output_channel ++ class out_channel : t -> Stdlib.out_channel -> [UChar.t] obj_output_channel + + (** [new in_channel enc inchan] creates the intput channel object + {!OOChannel.obj_input_channel} which + reads bytes from [inchan] and converts them to Unicode characters. *) +- class in_channel : t -> Pervasives.in_channel -> [UChar.t] obj_input_channel ++ class in_channel : t -> Stdlib.in_channel -> [UChar.t] obj_input_channel + + (** [ustream_of enc chars] converts the byte stream [chars] + to the Unicode character stream by the encoding [enc]. *) diff --git a/devel/ocaml-camomile/files/patch-Camomile_public_oOChannel.mli b/devel/ocaml-camomile/files/patch-Camomile_public_oOChannel.mli new file mode 100644 index 000000000000..51fd55e6ddcb --- /dev/null +++ b/devel/ocaml-camomile/files/patch-Camomile_public_oOChannel.mli @@ -0,0 +1,12 @@ +--- Camomile/public/oOChannel.mli.orig 2019-08-08 07:10:33 UTC ++++ Camomile/public/oOChannel.mli +@@ -113,7 +113,7 @@ class char_obj_output_channel_of : char_output_channel + [char] obj_output_channel + + (** Convert an OCaml input channel to an OO-based character input channel *) +-class of_in_channel : Pervasives.in_channel -> char_input_channel ++class of_in_channel : Stdlib.in_channel -> char_input_channel + + (** Convert an OCaml output channel to an OO-based character output channel *) +-class of_out_channel : Pervasives.out_channel -> char_output_channel ++class of_out_channel : Stdlib.out_channel -> char_output_channel diff --git a/devel/ocaml-camomile/files/patch-Camomile_public_uCS4.ml b/devel/ocaml-camomile/files/patch-Camomile_public_uCS4.ml new file mode 100644 index 000000000000..8865ce5aed51 --- /dev/null +++ b/devel/ocaml-camomile/files/patch-Camomile_public_uCS4.ml @@ -0,0 +1,18 @@ +--- Camomile/public/uCS4.ml.orig 2019-08-08 07:10:33 UTC ++++ Camomile/public/uCS4.ml +@@ -36,7 +36,7 @@ + (* yoriyuki.y@gmail.com *) + + +-open Bigarray ++open Bigarray_compat + + (* UCS4 encoded string. the type is bigarray of 32-bit integers. *) + type t = (int32, int32_elt, c_layout) Array1.t +@@ -140,5 +140,5 @@ end + + let compare (a:t) (b:t) = + match Array1.dim a - Array1.dim b with +- 0 -> Pervasives.compare a b ++ 0 -> Stdlib.compare a b + | sgn -> sgn diff --git a/devel/ocaml-camomile/files/patch-Camomile_public_uCS4.mli b/devel/ocaml-camomile/files/patch-Camomile_public_uCS4.mli new file mode 100644 index 000000000000..9f19d89d62d7 --- /dev/null +++ b/devel/ocaml-camomile/files/patch-Camomile_public_uCS4.mli @@ -0,0 +1,14 @@ +--- Camomile/public/uCS4.mli.orig 2019-08-08 07:10:33 UTC ++++ Camomile/public/uCS4.mli +@@ -36,7 +36,10 @@ + (* yoriyuki.y@gmail.com *) + + type t = +- (int32, Bigarray.int32_elt, Bigarray.c_layout) Bigarray.Array1.t ++ (int32, ++ Bigarray_compat.int32_elt, ++ Bigarray_compat.c_layout) ++ Bigarray_compat.Array1.t + + exception Malformed_code + diff --git a/devel/ocaml-camomile/files/patch-Camomile_public_uCol.ml b/devel/ocaml-camomile/files/patch-Camomile_public_uCol.ml new file mode 100644 index 000000000000..00a2a8fe4e56 --- /dev/null +++ b/devel/ocaml-camomile/files/patch-Camomile_public_uCol.ml @@ -0,0 +1,37 @@ +--- Camomile/public/uCol.ml.orig 2019-08-08 07:10:33 UTC ++++ Camomile/public/uCol.ml +@@ -52,14 +52,14 @@ sig + If [prec] is omitted, the maximum possible strength is used. + If [variable] is omitted, the default of the locale + (usually [`Shifted]) is used. +- The meaning of the returned value is similar to Pervasives.compare *) ++ The meaning of the returned value is similar to Stdlib.compare *) + val compare : + ?locale:string -> ?prec:precision -> ?variable:variable_option -> + text -> text -> int + + (** Binary comparison of sort_key gives the same result as [compare]. + i.e. +- [compare t1 t2 = Pervasives.compare (sort_key t1) (sort_key t2)] ++ [compare t1 t2 = Stdlib.compare (sort_key t1) (sort_key t2)] + If the same texts are repeatedly compared, + pre-computation of sort_key gives better performance. *) + val sort_key : +@@ -731,7 +731,7 @@ module Make (Config : ConfigInt.Type) (Text : UnicodeS + | _ -> + let key1 = key_of_inc prec col_info x1 in + let key2 = key_of_inc prec col_info x2 in +- Pervasives.compare key1 key2 ++ Stdlib.compare key1 key2 + + let compare ?locale ?prec ?variable t1 t2 = + let col_info = +@@ -782,7 +782,7 @@ module Make (Config : ConfigInt.Type) (Text : UnicodeS + | _ -> + let key = key_of_inc prec col_info x in + (* Printf.printf "key_of_inc %s\n" (String.escaped key);*) +- Pervasives.compare k key ++ Stdlib.compare k key + + let compare_with_key ?locale ?prec ?variable k t = + let col_info = diff --git a/devel/ocaml-camomile/files/patch-Camomile_public_uTF16.ml b/devel/ocaml-camomile/files/patch-Camomile_public_uTF16.ml new file mode 100644 index 000000000000..596e839775c5 --- /dev/null +++ b/devel/ocaml-camomile/files/patch-Camomile_public_uTF16.ml @@ -0,0 +1,11 @@ +--- Camomile/public/uTF16.ml.orig 2019-08-08 07:10:33 UTC ++++ Camomile/public/uTF16.ml +@@ -34,7 +34,7 @@ + (* You can contact the authour by sending email to *) + (* yoriyuki.y@gmail.com *) + +-open Bigarray ++open Bigarray_compat + + exception Out_of_range + diff --git a/devel/ocaml-camomile/files/patch-Camomile_public_uTF16.mli b/devel/ocaml-camomile/files/patch-Camomile_public_uTF16.mli new file mode 100644 index 000000000000..d733c9583937 --- /dev/null +++ b/devel/ocaml-camomile/files/patch-Camomile_public_uTF16.mli @@ -0,0 +1,14 @@ +--- Camomile/public/uTF16.mli.orig 2019-08-08 07:10:33 UTC ++++ Camomile/public/uTF16.mli +@@ -37,7 +37,10 @@ + 0xfffe, 0xffff. + Bigarray.cma or Bigarray.cmxa must be linked when this module is used. *) + type t = +- (int, Bigarray.int16_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t ++ (int, ++ Bigarray_compat.int16_unsigned_elt, ++ Bigarray_compat.c_layout) ++ Bigarray_compat.Array1.t + + exception Malformed_code + diff --git a/devel/ocaml-camomile/files/patch-Camomile_public_uTF8.ml b/devel/ocaml-camomile/files/patch-Camomile_public_uTF8.ml new file mode 100644 index 000000000000..0537d52cd661 --- /dev/null +++ b/devel/ocaml-camomile/files/patch-Camomile_public_uTF8.ml @@ -0,0 +1,11 @@ +--- Camomile/public/uTF8.ml.orig 2019-08-08 07:10:33 UTC ++++ Camomile/public/uTF8.ml +@@ -194,7 +194,7 @@ let rec iter_aux proc s i = + + let iter proc s = iter_aux proc s 0 + +-let compare s1 s2 = Pervasives.compare s1 s2 ++let compare s1 s2 = Stdlib.compare s1 s2 + + exception Malformed_code + diff --git a/devel/ocaml-camomile/files/patch-Camomile_tools_dune b/devel/ocaml-camomile/files/patch-Camomile_tools_dune new file mode 100644 index 000000000000..e1a77cf11717 --- /dev/null +++ b/devel/ocaml-camomile/files/patch-Camomile_tools_dune @@ -0,0 +1,19 @@ +--- Camomile/tools/dune.orig 2019-08-08 07:10:33 UTC ++++ Camomile/tools/dune +@@ -12,7 +12,7 @@ + camomilestringprep) + (flags -I Camomile :standard) + (modules :standard \ camomilelocaledef camomilelocaledef_lexer iana) +- (libraries toolslib camomile camomile.library)) ++ (libraries toolslib camomile camomile.library camlp-streams)) + + (executable + (name iana) +@@ -21,6 +21,6 @@ + + (executable + (name camomilelocaledef) +- (libraries toolslib camomile.library) ++ (libraries toolslib camomile.library camlp-streams) + (flags -I Camomile :standard) + (modules camomilelocaledef camomilelocaledef_lexer)) diff --git a/devel/ocaml-camomile/files/patch-Camomile_tools_parse__specialcasing.ml b/devel/ocaml-camomile/files/patch-Camomile_tools_parse__specialcasing.ml new file mode 100644 index 000000000000..3828cfac7f55 --- /dev/null +++ b/devel/ocaml-camomile/files/patch-Camomile_tools_parse__specialcasing.ml @@ -0,0 +1,16 @@ +--- Camomile/tools/parse_specialcasing.ml.orig 2019-08-08 07:10:33 UTC ++++ Camomile/tools/parse_specialcasing.ml +@@ -49,13 +49,6 @@ let us_of_codes codes = List.map uchar_of_code codes + let not_pat = Str.regexp "not_\\(.*\\)" + let locale_pat = Str.regexp "\\(..\\)\\(_\\(..\\)\\)?\\(_\\(.+\\)\\)?" + +-(* little hack to maintain 4.02.3 compat with warnings *) +-module String = struct +- [@@@ocaml.warning "-3-32"] +- let lowercase_ascii = StringLabels.lowercase +- include String +-end +- + let rec parse_condition condition = + let s = String.lowercase_ascii condition in + match s with diff --git a/devel/ocaml-camomile/files/patch-Camomile_toolslib_absCe.ml b/devel/ocaml-camomile/files/patch-Camomile_toolslib_absCe.ml new file mode 100644 index 000000000000..24edea2b7c70 --- /dev/null +++ b/devel/ocaml-camomile/files/patch-Camomile_toolslib_absCe.ml @@ -0,0 +1,11 @@ +--- Camomile/toolslib/absCe.ml.orig 2019-08-08 07:10:33 UTC ++++ Camomile/toolslib/absCe.ml +@@ -49,7 +49,7 @@ type elt = + | `FirstImplicit + | `FirstTrailing ] + +-module Elt = struct type t = elt let compare = Pervasives.compare end ++module Elt = struct type t = elt let compare = Stdlib.compare end + module EltMap = Map.Make (Elt) + + type ce = AbsOrd.point * AbsOrd.point * AbsOrd.point diff --git a/devel/ocaml-camomile/files/patch-Camomile_toolslib_dune b/devel/ocaml-camomile/files/patch-Camomile_toolslib_dune new file mode 100644 index 000000000000..8ecdaeabcf7d --- /dev/null +++ b/devel/ocaml-camomile/files/patch-Camomile_toolslib_dune @@ -0,0 +1,11 @@ +--- Camomile/toolslib/dune.orig 2019-08-08 07:10:33 UTC ++++ Camomile/toolslib/dune +@@ -4,7 +4,7 @@ + (name toolslib) + (wrapped false) + (flags -I Camomile :standard) +- (libraries camomile camomile.library bigarray str)) ++ (libraries camomile camomile.library bigarray-compat str stdlib-shims)) + + (ocamllex colLexer) + (ocamlyacc colParser) diff --git a/devel/ocaml-camomile/files/patch-Makefile b/devel/ocaml-camomile/files/patch-Makefile new file mode 100644 index 000000000000..5e1c6b1b7980 --- /dev/null +++ b/devel/ocaml-camomile/files/patch-Makefile @@ -0,0 +1,10 @@ +--- Makefile.orig 2019-08-08 07:10:33 UTC ++++ Makefile +@@ -17,7 +17,6 @@ test: + clean: + dune clean + +-# unfortunately we cannot turn on warnings in development because of 4.02.3 + all-supported-ocaml-versions: + dune build --workspace dune-workspace.dev + diff --git a/devel/ocaml-camomile/files/patch-README.md b/devel/ocaml-camomile/files/patch-README.md new file mode 100644 index 000000000000..8d23829c9513 --- /dev/null +++ b/devel/ocaml-camomile/files/patch-README.md @@ -0,0 +1,11 @@ +--- README.md.orig 2019-08-08 07:10:33 UTC ++++ README.md +@@ -10,7 +10,7 @@ OCaml packages. See [LICENSE.md](LICENSE.md) + + ## Installation + +-To build and install Camomile, you need [OCaml](https://ocaml.org) >= 4.02.3 [dune](https://dune.build) >= 1.0.0 ++To build and install Camomile, you need [OCaml](https://ocaml.org) >= 4.03 [dune](https://dune.build) >= 1.11 + + To build the library, on the top directory do + ```sh diff --git a/devel/ocaml-camomile/files/patch-camomile-test_tester_test__caseMap.ml b/devel/ocaml-camomile/files/patch-camomile-test_tester_test__caseMap.ml new file mode 100644 index 000000000000..7c61187a5092 --- /dev/null +++ b/devel/ocaml-camomile/files/patch-camomile-test_tester_test__caseMap.ml @@ -0,0 +1,16 @@ +--- camomile-test/tester/test_caseMap.ml.orig 2019-08-08 07:10:33 UTC ++++ camomile-test/tester/test_caseMap.ml +@@ -7,13 +7,6 @@ open CamomileLibraryTest.Camomile + + module UTF8Casing = CaseMap.Make (UTF8) + +-(* little hack to maintain 4.02.3 compat with warnings *) +-module String = struct +- [@@@ocaml.warning "-3-32"] +- let lowercase_ascii = StringLabels.lowercase +- include String +-end +- + let _ = random_test + ~desc:"ASCII" + ~log:"caseMap_ASCII" diff --git a/devel/ocaml-camomile/files/patch-camomile-test_tester_uCS4__test.ml b/devel/ocaml-camomile/files/patch-camomile-test_tester_uCS4__test.ml new file mode 100644 index 000000000000..49defea5d029 --- /dev/null +++ b/devel/ocaml-camomile/files/patch-camomile-test_tester_uCS4__test.ml @@ -0,0 +1,11 @@ +--- camomile-test/tester/uCS4_test.ml.orig 2019-08-08 07:10:33 UTC ++++ camomile-test/tester/uCS4_test.ml +@@ -2,7 +2,7 @@ + open CamomileLibraryTest.Camomile + open UPervasives + open Blender +-open Bigarray ++open Bigarray_compat + + module UCS4Test = UStorageTest.Make (UCS4) + diff --git a/devel/ocaml-camomile/files/patch-camomile-test_tester_uTF16__test.ml b/devel/ocaml-camomile/files/patch-camomile-test_tester_uTF16__test.ml new file mode 100644 index 000000000000..7146e8765430 --- /dev/null +++ b/devel/ocaml-camomile/files/patch-camomile-test_tester_uTF16__test.ml @@ -0,0 +1,23 @@ +--- camomile-test/tester/uTF16_test.ml.orig 2019-08-08 07:10:33 UTC ++++ camomile-test/tester/uTF16_test.ml +@@ -2,7 +2,7 @@ + open CamomileLibraryTest.Camomile + open UPervasives + open Blender +-open Bigarray ++open Bigarray_compat + + module UTF16Conv = CharEncoding.Make (UTF16) + module UTF16Test = UStorageTest.Make (UTF16) +@@ -18,9 +18,9 @@ let char_gen _ = + let _ = UTF16Test.test ~desc:"UTF16 test" ~log:"base_utf16" ~char_gen () + + let string_of_int16array a = +- let s = Bytes.create (2 + 2 * Bigarray.Array1.dim a) in ++ let s = Bytes.create (2 + 2 * Bigarray_compat.Array1.dim a) in + Bytes.set s 0 (Char.chr 0xfe); Bytes.set s 1 (Char.chr 0xff); +- for i = 0 to Bigarray.Array1.dim a - 1 do ++ for i = 0 to Bigarray_compat.Array1.dim a - 1 do + Bytes.set s (2 * i + 2) (Char.chr (a.{i} lsr 8)); + Bytes.set s (2 * i + 3) (Char.chr (a.{i} land 255)) + done; diff --git a/devel/ocaml-camomile/files/patch-camomile.opam b/devel/ocaml-camomile/files/patch-camomile.opam new file mode 100644 index 000000000000..4334179a9e2a --- /dev/null +++ b/devel/ocaml-camomile/files/patch-camomile.opam @@ -0,0 +1,14 @@ +--- camomile.opam.orig 2019-08-08 07:10:33 UTC ++++ camomile.opam +@@ -14,7 +14,10 @@ doc: "https://yoriyuki.github.io/Camomile/" + bug-reports: "https://github.com/yoriyuki/Camomile/issues" + depends: [ + "dune" {>= "1.11"} +- "ocaml" {>= "4.02.3"} ++ "ocaml" {>= "4.03"} ++ "camlp-streams" ++ "stdlib-shims" ++ "bigarray-compat" + ] + dev-repo: "git+https://github.com/yoriyuki/Camomile.git" + build: [ diff --git a/devel/ocaml-camomile/files/patch-dune-project b/devel/ocaml-camomile/files/patch-dune-project new file mode 100644 index 000000000000..7d6e6a463541 --- /dev/null +++ b/devel/ocaml-camomile/files/patch-dune-project @@ -0,0 +1,11 @@ +--- dune-project.orig 2019-08-08 07:10:33 UTC ++++ dune-project +@@ -19,4 +19,7 @@ collation and locale-sensitive case mappings, and more + designed for Unicode Standard 3.2.") + (depends + (dune (>= 1.11)) +- (ocaml (>= "4.02.3")))) ++ (ocaml (>= 4.03)) ++ camlp-streams ++ stdlib-shims ++ bigarray-compat)) diff --git a/devel/ocaml-camomile/files/patch-dune-workspace.dev b/devel/ocaml-camomile/files/patch-dune-workspace.dev new file mode 100644 index 000000000000..ae6ce5002c4d --- /dev/null +++ b/devel/ocaml-camomile/files/patch-dune-workspace.dev @@ -0,0 +1,8 @@ +--- dune-workspace.dev.orig 2019-08-08 07:10:33 UTC ++++ dune-workspace.dev +@@ -1,5 +1,4 @@ + ;; This file is used by `make all-supported-ocaml-versions` +-(context ((switch 4.02.3))) + (context ((switch 4.03.0))) + (context ((switch 4.04.2))) + (context ((switch 4.05.0))) diff --git a/devel/ocaml-camomile/pkg-descr b/devel/ocaml-camomile/pkg-descr index 163f0042194a..e6e00a777487 100644 --- a/devel/ocaml-camomile/pkg-descr +++ b/devel/ocaml-camomile/pkg-descr @@ -2,3 +2,4 @@ Camomile is a comprehensive Unicode library for objective caml language. The library is currently designed to conform Unicode Standard 3.2. WWW: http://camomile.sourceforge.net/ +WWW: https://github.com/yoriyuki/Camomile -- 2.35.1