mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-11 20:25:32 +03:00
ocamlPackages.camlimages: 5.0.4 → 5.0.5 (#383877)
This commit is contained in:
commit
f535647ef6
4 changed files with 17 additions and 37 deletions
|
@ -50,13 +50,16 @@ stdenv.mkDerivation rec {
|
|||
]);
|
||||
|
||||
postPatch = ''
|
||||
for f in callbacks*/Makefile src/Makefile; do
|
||||
substituteInPlace "$f" --replace "+camlp4" \
|
||||
for f in callbacks*/Makefile; do
|
||||
substituteInPlace "$f" --replace-warn "+camlp4" \
|
||||
"${ocamlPackages.camlp4}/lib/ocaml/${ocamlPackages.ocaml.version}/site-lib/camlp4"
|
||||
done
|
||||
|
||||
# Fatal error: exception Sys_error("Mutex.unlock: Operation not permitted")
|
||||
sed -i "/gl_started/d" src/draw.ml* src/main.ml
|
||||
|
||||
# Compatibility with camlimages ≥ 5.0.5
|
||||
substituteInPlace src/Makefile --replace-warn camlimages.all_formats camlimages.core
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git a/config/xConfigurator.ml b/config/xConfigurator.ml
|
||||
index 268df4a..73e1850 100644
|
||||
index 766a35c..1d1aff5 100644
|
||||
--- a/config/xConfigurator.ml
|
||||
+++ b/config/xConfigurator.ml
|
||||
@@ -8,7 +8,7 @@ let (!%) fmt = Printf.sprintf fmt
|
||||
|
@ -75,29 +75,3 @@ index 268df4a..73e1850 100644
|
|||
let code =
|
||||
String.concat ~sep:"\n"
|
||||
& includes
|
||||
diff --git a/core/images.ml b/core/images.ml
|
||||
index 563ab7e..a53a6a4 100644
|
||||
--- a/core/images.ml
|
||||
+++ b/core/images.ml
|
||||
@@ -102,7 +102,7 @@ let get_extension s =
|
||||
| _ -> s, ""
|
||||
|
||||
let guess_extension s =
|
||||
- let s = String.lowercase s in
|
||||
+ let s = String.lowercase_ascii s in
|
||||
match s with
|
||||
| "gif" -> Gif
|
||||
| "bmp" -> Bmp
|
||||
diff --git a/core/units.ml b/core/units.ml
|
||||
index 634bc9c..ddd6eae 100644
|
||||
--- a/core/units.ml
|
||||
+++ b/core/units.ml
|
||||
@@ -30,7 +30,7 @@ let parse_length s = (* return in pt *)
|
||||
let digit,unit =
|
||||
if l > 2 then String.sub s 0 2, String.sub s (l-2) 2 else "", "" in
|
||||
try
|
||||
- (List.assoc (String.lowercase unit) units) *. float_of_string digit
|
||||
+ (List.assoc (String.lowercase_ascii unit) units) *. float_of_string digit
|
||||
with
|
||||
| Not_found -> (* think it is in "pt" *)
|
||||
float_of_string s in
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
buildDunePackage rec {
|
||||
pname = "camlimages";
|
||||
version = "5.0.4";
|
||||
version = "5.0.5";
|
||||
|
||||
minimalOCamlVersion = "4.07";
|
||||
|
||||
|
@ -20,10 +20,10 @@ buildDunePackage rec {
|
|||
owner = "camlspotter";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "1m2c76ghisg73dikz2ifdkrbkgiwa0hcmp21f2fm2rkbf02rq3f4";
|
||||
hash = "sha256-/Dkj8IBVPjGCJCXrLOuJtuaa+nD/a9e8/N+TN9ukw4k=";
|
||||
};
|
||||
|
||||
# stdio v0.17 compatibility; also replaces `String.lowercase` with `String.lowercase_ascii`
|
||||
# stdio v0.17 compatibility
|
||||
patches = [ ./camlimages.patch ];
|
||||
|
||||
nativeBuildInputs = [ cppo ];
|
||||
|
|
|
@ -48,6 +48,9 @@ stdenv.mkDerivation {
|
|||
postPatch = ''
|
||||
substituteInPlace src/lang/dune \
|
||||
--replace-warn "(run git rev-parse --short HEAD)" "(run echo -n nixpkgs)"
|
||||
# Compatibility with camlimages 5.0.5
|
||||
substituteInPlace src/core/dune \
|
||||
--replace-warn camlimages.all_formats camlimages.core
|
||||
'';
|
||||
|
||||
dontConfigure = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue