View | Details | Raw Unified | Return to bug 262788
Collapse All | Expand All

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

Return to bug 262788