[plplot] 01/03: Fix build with OCaml 4.06

Ole Streicher olebole at moszumanska.debian.org
Mon Dec 4 12:11:11 UTC 2017


This is an automated email from the git hooks/post-receive script.

olebole pushed a commit to branch master
in repository plplot.

commit 55e5d342644b35ee14f334785fd23193532ca22e
Author: Ole Streicher <olebole at debian.org>
Date:   Tue Nov 21 15:11:10 2017 +0100

    Fix build with OCaml 4.06
---
 debian/patches/Fix-build-with-OCaml-4.06.patch | 31 ++++++++++++++++++++++++++
 debian/patches/series                          |  1 +
 2 files changed, 32 insertions(+)

diff --git a/debian/patches/Fix-build-with-OCaml-4.06.patch b/debian/patches/Fix-build-with-OCaml-4.06.patch
new file mode 100644
index 0000000..2989e07
--- /dev/null
+++ b/debian/patches/Fix-build-with-OCaml-4.06.patch
@@ -0,0 +1,31 @@
+From: Orion Poplawski <orion at nwra.com>
+Date: Mon, 20 Nov 2017 09:02:01 -0700
+Subject: Fix build with OCaml 4.06
+
+Fedora patch to fix build with OCaml 4.0.6.
+---
+ examples/ocaml/x20.ml | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/examples/ocaml/x20.ml b/examples/ocaml/x20.ml
+index ff7e447..047229a 100644
+--- a/examples/ocaml/x20.ml
++++ b/examples/ocaml/x20.ml
+@@ -59,7 +59,7 @@ let read_img fname =
+   let w, h = Scanf.sscanf w_h_line "%d %d" (fun w h -> w, h) in
+   let num_col = Scanf.sscanf num_col_line "%d" (fun n -> n) in
+ 
+-  let img = String.make (w * h) ' ' in
++  let img = Bytes.make (w * h) ' ' in
+   let imf = Array.make_matrix w h 0.0 in
+ 
+   (* Note that under 32bit OCaml, this will only work when reading strings up
+@@ -72,7 +72,7 @@ let read_img fname =
+     for j = 0 to h - 1 do
+       imf.(i).(j) <-
+         (* flip image up-down *)
+-        float_of_int (int_of_char (img.[(h - 1 - j ) * w + i]));
++        float_of_int (int_of_char (Bytes.get img ((h - 1 - j ) * w + i)));
+     done
+   done;
+   imf, w, h, num_col
diff --git a/debian/patches/series b/debian/patches/series
index 539daea..0f1e65e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@ Remove-nondfsg-dirs.patch
 Build-bindings-for-all-Python-versions.patch
 Disable-octave-UTF-8-tests.patch
 Disable-failing-ocaml-tests.patch
+Fix-build-with-OCaml-4.06.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/plplot.git



More information about the debian-science-commits mailing list