]> git.pld-linux.org Git - packages/ocaml-data-notation.git/commitdiff
- added string patch (fix deprecation causing build failure); release 4
authorJakub Bogusz <qboosh@pld-linux.org>
Sat, 18 Sep 2021 18:42:42 +0000 (20:42 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Sat, 18 Sep 2021 18:42:42 +0000 (20:42 +0200)
ocaml-data-notation-string.patch [new file with mode: 0644]
ocaml-data-notation.spec

diff --git a/ocaml-data-notation-string.patch b/ocaml-data-notation-string.patch
new file mode 100644 (file)
index 0000000..22fbd70
--- /dev/null
@@ -0,0 +1,17 @@
+--- ocaml-data-notation-0.0.11/setup.ml.orig   2013-11-22 01:34:28.000000000 +0100
++++ ocaml-data-notation-0.0.11/setup.ml        2021-09-18 20:33:00.818590112 +0200
+@@ -227,11 +227,9 @@ module OASISString = struct
+       raise Not_found
+   let replace_chars f s =
+-    let buf = String.make (String.length s) 'X' in
+-      for i = 0 to String.length s - 1 do
+-        buf.[i] <- f s.[i]
+-      done;
+-      buf
++    let buf = Buffer.create (String.length s) in
++    String.iter (fun c -> Buffer.add_char buf (f c)) s;
++    Buffer.contents buf
+ end
index 9688cd88cf38d106a9a79f37f437c03efbe486e4..8b5b6f2c68344e316c98d9dd0bda0f6bf6196c9e 100644 (file)
@@ -1,8 +1,8 @@
 #
 # Conditional build:
-%bcond_without ocaml_opt       # skip building native optimized binaries (bytecode is always built)
+%bcond_without ocaml_opt       # native optimized binaries (bytecode is always built)
 
-%ifnarch %{ix86} %{x8664} arm aarch64 ppc sparc sparcv9
+%ifnarch %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9
 %undefine      with_ocaml_opt
 %endif
 
@@ -10,13 +10,14 @@ Summary:    OCaml module to store data using OCaml notation
 Summary(pl.UTF-8):     ModuĊ‚ OCamla do przechowywania danych w notacji OCamla
 Name:          ocaml-data-notation
 Version:       0.0.11
-Release:       3
+Release:       4
 License:       LGPL v2.1+ with OCaml static compilation exception
 Group:         Libraries
 Source0:       https://forge.ocamlcore.org/frs/download.php/1310/%{name}-%{version}.tar.gz
 # Source0-md5: 0ab9cd196b4a7f22a037ab96a477896f
+Patch0:                %{name}-string.patch
 URL:           https://forge.ocamlcore.org/projects/odn/
-BuildRequires: ocaml >= 3.10.2
+BuildRequires: ocaml >= 1:3.10.2
 BuildRequires: ocaml-camlp4
 BuildRequires: ocaml-type_conv-devel >= 108.07.01
 %requires_eq   ocaml-runtime
@@ -53,6 +54,7 @@ biblioteki odn.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 ocaml setup.ml -configure \
This page took 0.061685 seconds and 4 git commands to generate.