Update aider (#375634)
[NixPkgs.git] / pkgs / development / ocaml-modules / camlimages / camlimages.patch
blobeeeaa723c2069fcc4b10d14913d413818961b58d
1 diff --git a/config/xConfigurator.ml b/config/xConfigurator.ml
2 index 268df4a..73e1850 100644
3 --- a/config/xConfigurator.ml
4 +++ b/config/xConfigurator.ml
5 @@ -8,7 +8,7 @@ let (!%) fmt = Printf.sprintf fmt
6 module Configurator = struct
7 include Configurator.V1
9 - let ( ^/ ) = Caml.Filename.concat
10 + let ( ^/ ) = Stdlib.Filename.concat
12 let path_sep =
13 if Sys.win32 then
14 @@ -19,7 +19,7 @@ module Configurator = struct
15 let exe = if Sys.win32 then ".exe" else ""
17 let get_path () =
18 - match Caml.Sys.getenv "PATH" with
19 + match Stdlib.Sys.getenv "PATH" with
20 | exception Not_found -> []
21 | s -> String.split ~on:path_sep s
23 @@ -27,7 +27,7 @@ module Configurator = struct
24 List.find_map dirs ~f:(fun dir ->
25 List.find_map bases ~f:(fun base ->
26 let path = dir ^/ base in
27 - if Caml.Sys.file_exists path then Some path else None))
28 + if Stdlib.Sys.file_exists path then Some path else None))
30 let find_program prog =
31 let prog = prog ^ exe in
32 @@ -45,13 +45,13 @@ module Configurator = struct
33 | s ->
34 (* findlib 1.7.3 installs META file for graphics
35 even when there is no graphics library installed. *)
36 - let dest = Caml.Filename.temp_file "test" ".cma" in
37 - let res = match Caml.Sys.command & !% "ocamlfind ocamlc -package %s -o %s -linkpkg" n dest with
38 + let dest = Stdlib.Filename.temp_file "test" ".cma" in
39 + let res = match Stdlib.Sys.command & !% "ocamlfind ocamlc -package %s -o %s -linkpkg" n dest with
40 | 0 -> Some s
41 | _ -> None
42 | exception _ -> None
44 - (try Caml.Sys.remove dest with _ -> ());
45 + (try Stdlib.Sys.remove dest with _ -> ());
46 res
47 | exception Findlib.No_such_package _ -> None
49 @@ -83,14 +83,14 @@ type item =
50 module Make(A : sig val name : string end) = struct
51 let t = create A.name
53 - let log fmt = Caml.Format.eprintf fmt
54 + let log fmt = Stdlib.Format.eprintf fmt
56 module Package_conf = Package_conf
57 open Package_conf
59 let extract_package_conf xs =
60 - Caml.List.fold_left merge empty
61 - (Caml.List.map (fun item -> match item with
62 + Stdlib.List.fold_left merge empty
63 + (Stdlib.List.map (fun item -> match item with
64 | Library (Some pkc) -> pkc
65 | _ -> empty) xs)
67 @@ -167,8 +167,8 @@ module Make(A : sig val name : string end) = struct
68 let by_cc ~c_flags ~link_flags ~headers ~functions:fnames () =
69 log "Checking library %s by using C compiler... " (String.concat ~sep:" " link_flags);
70 let headers = "stdio.h" :: headers in
71 - let includes = Caml.List.map (!% "#include <%s>") headers in
72 - let fcalls = Caml.List.map (!% " ( (void(*)()) (%s) )();") fnames in
73 + let includes = Stdlib.List.map (!% "#include <%s>") headers in
74 + let fcalls = Stdlib.List.map (!% " ( (void(*)()) (%s) )();") fnames in
75 let code =
76 String.concat ~sep:"\n"
77 & includes
78 diff --git a/core/images.ml b/core/images.ml
79 index 563ab7e..a53a6a4 100644
80 --- a/core/images.ml
81 +++ b/core/images.ml
82 @@ -102,7 +102,7 @@ let get_extension s =
83 | _ -> s, ""
85 let guess_extension s =
86 - let s = String.lowercase s in
87 + let s = String.lowercase_ascii s in
88 match s with
89 | "gif" -> Gif
90 | "bmp" -> Bmp
91 diff --git a/core/units.ml b/core/units.ml
92 index 634bc9c..ddd6eae 100644
93 --- a/core/units.ml
94 +++ b/core/units.ml
95 @@ -30,7 +30,7 @@ let parse_length s = (* return in pt *)
96 let digit,unit =
97 if l > 2 then String.sub s 0 2, String.sub s (l-2) 2 else "", "" in
98 try
99 - (List.assoc (String.lowercase unit) units) *. float_of_string digit
100 + (List.assoc (String.lowercase_ascii unit) units) *. float_of_string digit
101 with
102 | Not_found -> (* think it is in "pt" *)
103 float_of_string s in