[Pkg-ocaml-maint-commits] [SCM] ocamlgraph packaging branch, master, updated. debian/1.8.2-2-8-g841af73
Mehdi Dogguy
mehdi at debian.org
Tue Jun 25 21:15:34 UTC 2013
The following commit has been merged in the master branch:
commit 286597230c5bb0a98c4ed97b1c28b4201cdd732e
Author: Mehdi Dogguy <mehdi at debian.org>
Date: Tue Jun 25 23:07:00 2013 +0200
Add new patches
diff --git a/debian/changelog b/debian/changelog
index 96d0b0d..a4f67e4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,9 @@ ocamlgraph (1.8.3-1) UNRELEASED; urgency=low
[ Mehdi Dogguy ]
* New upstream release
* Update debian/copyright
+ * Add new patches from upstream's repository:
+ - 0003-fixed-compilation-issue-with-OCaml-3.12.1.patch
+ - 0004-Merge-bug-fixed-compilation-issue-with-OCaml-3.12.1.patch
-- Mehdi Dogguy <mehdi at debian.org> Tue, 25 Jun 2013 22:19:36 +0200
diff --git a/debian/patches/0003-fixed-compilation-issue-with-OCaml-3.12.1.patch b/debian/patches/0003-fixed-compilation-issue-with-OCaml-3.12.1.patch
new file mode 100644
index 0000000..d40acf8
--- /dev/null
+++ b/debian/patches/0003-fixed-compilation-issue-with-OCaml-3.12.1.patch
@@ -0,0 +1,35 @@
+From: Julien Signoles <julien.signoles at cea.fr>
+Date: Wed, 22 May 2013 08:35:36 +0000
+Subject: fixed compilation issue with OCaml 3.12.1
+
+---
+ CHANGES | 1 +
+ src/merge.mli | 5 +----
+ 2 files changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/CHANGES b/CHANGES
+index 5a8db64..84afb9c 100644
+--- a/CHANGES
++++ b/CHANGES
+@@ -1,3 +1,4 @@
++o fixed compilation issue with OCaml 3.12.1
+
+ version 1.8.3, April 17, 2013
+ ---------------------------
+diff --git a/src/merge.mli b/src/merge.mli
+index 3b13413..8e574ae 100644
+--- a/src/merge.mli
++++ b/src/merge.mli
+@@ -133,10 +133,7 @@ module I(G: Sig.I): sig
+ ?loop_killer:bool -> ?specified_vertex:(vertex list -> vertex) -> graph ->
+ unit
+
+-end with type graph = G.t
+- and type vertex := G.vertex
+- and type edge := G.edge
+- and type edge_label = G.E.label
++end
+
+ (*
+ Local Variables:
+--
diff --git a/debian/patches/0004-Merge-bug-fixed-compilation-issue-with-OCaml-3.12.1.patch b/debian/patches/0004-Merge-bug-fixed-compilation-issue-with-OCaml-3.12.1.patch
new file mode 100644
index 0000000..0819686
--- /dev/null
+++ b/debian/patches/0004-Merge-bug-fixed-compilation-issue-with-OCaml-3.12.1.patch
@@ -0,0 +1,87 @@
+From: Julien Signoles <julien.signoles at cea.fr>
+Date: Thu, 23 May 2013 11:13:58 +0000
+Subject: [Merge] bug fixed + compilation issue with OCaml 3.12.1
+
+---
+ CHANGES | 1 +
+ src/merge.ml | 41 +++++++++++++++++++++++++++++++++++++----
+ 2 files changed, 38 insertions(+), 4 deletions(-)
+
+diff --git a/CHANGES b/CHANGES
+index 84afb9c..ae5f8af 100644
+--- a/CHANGES
++++ b/CHANGES
+@@ -1,3 +1,4 @@
++o Merge: fixed bug with vertices with no incoming nor outcoming edge.
+ o fixed compilation issue with OCaml 3.12.1
+
+ version 1.8.3, April 17, 2013
+diff --git a/src/merge.ml b/src/merge.ml
+index c8581e3..563ab77 100644
+--- a/src/merge.ml
++++ b/src/merge.ml
+@@ -57,12 +57,26 @@ module B(B: Builder.S) = struct
+ in
+ B.G.fold_edges_e f g []
+
++ (* – former buggy version – the case where v is neither the source nor the
++ destination of some arrow was not taken into account, so that vertices were
++ just removed
++
++ let merge_vertex g vl = match vl with
++ | [] -> g
++ | _ :: vl' ->
++ let to_be_added = identify_extremities g vl in
++ let g = List.fold_left B.remove_vertex g vl' in
++ List.fold_left B.add_edge_e g to_be_added
++ *)
++
+ let merge_vertex g vl = match vl with
+ | [] -> g
+- | _ :: vl' ->
++ | v :: vl' ->
+ let to_be_added = identify_extremities g vl in
+ let g = List.fold_left B.remove_vertex g vl' in
+- List.fold_left B.add_edge_e g to_be_added
++ if to_be_added = []
++ then B.add_vertex g v
++ else List.fold_left B.add_edge_e g to_be_added
+
+ let merge_edges_e ?src ?dst g el = match el with
+ | e :: el' ->
+@@ -108,13 +122,32 @@ module B(B: Builder.S) = struct
+ in
+ let edges_to_be_merged = B.G.fold_edges_e collect_edge g [] in
+ merge_edges_e ?src ?dst g edges_to_be_merged
++
++ (* To deduce a comparison function on labels from a comparison function on
++ edges *)
++
++ let compare_label g =
++ try
++ let default_vertex =
++ let a_vertex_of_g = ref None in
++ (try B.G.iter_vertex (fun v -> a_vertex_of_g := Some v ; raise Exit) g
++ with Exit -> ());
++ match !a_vertex_of_g with
++ | Some v -> v
++ | None -> raise Exit (*hence g is empty*) in
++ fun l1 l2 ->
++ let e1 = B.G.E.create default_vertex l1 default_vertex in
++ let e2 = B.G.E.create default_vertex l2 default_vertex in
++ B.G.E.compare e1 e2
++ with Exit -> (fun l1 l2 -> 0)
+
+ let merge_isolabelled_edges g =
+ let module S = Set.Make(B.G.V) in
+ let do_meet s1 s2 = S.exists (fun x -> S.mem x s2) s1 in
+ let module M =
+- (* TODO: using [compare] here is really suspicious *)
+- Map.Make(struct type t = B.G.E.label let compare = compare end)
++ (* TODO: using [compare] here is really suspicious ...
++ DONE – yet not so clean *)
++ Map.Make(struct type t = B.G.E.label let compare = compare_label g end)
+ in
+ let accumulating e accu =
+ let l = B.G.E.label e in
+--
diff --git a/debian/patches/series b/debian/patches/series
index 827a58e..e06e577 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,4 @@
0001-prefix-binary-names-with-ocaml-and-do-not-install-us.patch
0002-avoid-referencing-non-existent-icon-ed_icon.xpm.patch
+0003-fixed-compilation-issue-with-OCaml-3.12.1.patch
+0004-Merge-bug-fixed-compilation-issue-with-OCaml-3.12.1.patch
--
ocamlgraph packaging
More information about the Pkg-ocaml-maint-commits
mailing list