tags 790062 + patch thanks Attached is a patch that fixes the compilation of monotone-viz with OCaml 4.02.2. It works by moving the class type declarations of module App to a new module App_types, thereby eliminating the module self reference. It is also compatible with the version of OCaml in unstable.
Cheers, -- Stéphane
diff --git a/debian/changelog b/debian/changelog index a2191ec..79b0d38 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +monotone-viz (1.0.2-3.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix compilation with OCaml 4.02.2 (Closes: #790062) + + -- Stéphane Glondu <glo...@debian.org> Sat, 27 Jun 2015 10:52:55 +0200 + monotone-viz (1.0.2-3) unstable; urgency=low * Update control file to mark monotone-viz as part of vcs section. This fixes diff --git a/debian/patches/50-ocaml-4.02.2.diff b/debian/patches/50-ocaml-4.02.2.diff new file mode 100644 index 0000000..c4d3ed1 --- /dev/null +++ b/debian/patches/50-ocaml-4.02.2.diff @@ -0,0 +1,311 @@ +Description: Fix compilation with OCaml 4.02.2 +Author: Stephane Glondu <st...@glondu.net> +Date: Sat Jun 27 10:44:41 2015 +0200 +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=790062 + +diff --git a/app.ml b/app.ml +index 96a1348..37a195b 100644 +--- a/app.ml ++++ b/app.ml +@@ -1,56 +1,4 @@ +-class type status = +- object +- method push : string -> unit +- method pop : unit -> unit +- method progress_start : string -> int -> unit +- method progress : int -> unit +- method progress_end : unit -> unit +- method with_status : string -> (unit -> 'a) -> 'a +- end +- +-class type t = +- object +- method get_mtn : Monotone.t option +- method get_agraph : Agraph.t option +- method get_prefs : Viz_style.prefs +- method get_toplevel : GWindow.window +- +- method set_prefs : Viz_style.prefs -> unit +- +- method open_db : ?id:string -> ?branch:string -> string -> unit +- method close_db : unit -> unit +- method finalize : unit -> unit +- method display_certs : string -> unit +- method focus_find_entry : unit -> unit +- method get_current_cert_value : string option +- method reload : unit -> unit +- method zoom_in : unit -> unit +- method zoom_out : unit -> unit +- method re_layout : unit -> unit +- method redraw : unit -> unit +- method query : Viz_types.select_info -> unit +- method get_selected_node : string option +- method find : string -> unit +- method switch_branch : string * string -> unit +- method update_begin : unit +- method update_end : unit +- method center_on :string * Viz_types.c_node -> unit +- method center_on_by_id : string -> unit +- method view_popup : string * int -> unit +- method cert_popup : int -> unit +- +- method show_open : unit -> unit +- method show_view : unit -> unit +- method show_search : unit -> unit +- method show_prefs : unit -> unit +- method show_diff : string -> string -> unit +- +- method status : string -> status +- +- method error_notice : string -> unit +- end +- +- ++open App_types + open Viz_misc + + class ctrl w ~prefs ~manager ~status ~view : t = +diff --git a/app.mli b/app.mli +index b35740b..88c4d4d 100644 +--- a/app.mli ++++ b/app.mli +@@ -1,53 +1,2 @@ +-class type status = +- object +- method push : string -> unit +- method pop : unit -> unit +- method progress_start : string -> int -> unit +- method progress : int -> unit +- method progress_end : unit -> unit +- method with_status : string -> (unit -> 'a) -> 'a +- end +- +-class type t = +- object +- method get_mtn : Monotone.t option +- method get_agraph : Agraph.t option +- method get_prefs : Viz_style.prefs +- method get_toplevel : GWindow.window +- +- method set_prefs : Viz_style.prefs -> unit +- +- method open_db : ?id:string -> ?branch:string -> string -> unit +- method close_db : unit -> unit +- method finalize : unit -> unit +- method display_certs : string -> unit +- method focus_find_entry : unit -> unit +- method get_current_cert_value : string option +- method reload : unit -> unit +- method zoom_in : unit -> unit +- method zoom_out : unit -> unit +- method re_layout : unit -> unit +- method redraw : unit -> unit +- method query : Viz_types.select_info -> unit +- method get_selected_node : string option +- method find : string -> unit +- method switch_branch : string * string -> unit +- method update_begin : unit +- method update_end : unit +- method center_on :string * Viz_types.c_node -> unit +- method center_on_by_id : string -> unit +- method view_popup : string * int -> unit +- method cert_popup : int -> unit +- +- method show_open : unit -> unit +- method show_view : unit -> unit +- method show_search : unit -> unit +- method show_prefs : unit -> unit +- method show_diff : string -> string -> unit +- +- method status : string -> status +- +- method error_notice : string -> unit +- end +- ++open App_types + val make : GWindow.window -> aa:bool -> prefs:Viz_style.prefs -> t +diff --git a/app_types.mli b/app_types.mli +new file mode 100644 +index 0000000..0351193 +--- /dev/null ++++ b/app_types.mli +@@ -0,0 +1,51 @@ ++class type status = ++ object ++ method push : string -> unit ++ method pop : unit -> unit ++ method progress_start : string -> int -> unit ++ method progress : int -> unit ++ method progress_end : unit -> unit ++ method with_status : string -> (unit -> 'a) -> 'a ++ end ++ ++class type t = ++ object ++ method get_mtn : Monotone.t option ++ method get_agraph : Agraph.t option ++ method get_prefs : Viz_style.prefs ++ method get_toplevel : GWindow.window ++ ++ method set_prefs : Viz_style.prefs -> unit ++ ++ method open_db : ?id:string -> ?branch:string -> string -> unit ++ method close_db : unit -> unit ++ method finalize : unit -> unit ++ method display_certs : string -> unit ++ method focus_find_entry : unit -> unit ++ method get_current_cert_value : string option ++ method reload : unit -> unit ++ method zoom_in : unit -> unit ++ method zoom_out : unit -> unit ++ method re_layout : unit -> unit ++ method redraw : unit -> unit ++ method query : Viz_types.select_info -> unit ++ method get_selected_node : string option ++ method find : string -> unit ++ method switch_branch : string * string -> unit ++ method update_begin : unit ++ method update_end : unit ++ method center_on :string * Viz_types.c_node -> unit ++ method center_on_by_id : string -> unit ++ method view_popup : string * int -> unit ++ method cert_popup : int -> unit ++ ++ method show_open : unit -> unit ++ method show_view : unit -> unit ++ method show_search : unit -> unit ++ method show_prefs : unit -> unit ++ method show_diff : string -> string -> unit ++ ++ method status : string -> status ++ ++ method error_notice : string -> unit ++ end +diff --git a/query.mli b/query.mli +index 714c034..08c3171 100644 +--- a/query.mli ++++ b/query.mli +@@ -1,5 +1,5 @@ + type t +-val make : #App.t -> t ++val make : #App_types.t -> t + + val clear : t -> unit + val activate : t -> unit +diff --git a/ui.mli b/ui.mli +index f102fb8..4d06d14 100644 +--- a/ui.mli ++++ b/ui.mli +@@ -26,37 +26,37 @@ val category : + class status_bar : + packing:(GObj.widget -> unit) -> + string -> +- App.status ++ App_types.status + + module Prefs : sig + val update_prefs : +- #App.t -> ++ #App_types.t -> + Viz_style.prefs -> Viz_style.prefs -> unit +- val show : #App.t -> unit -> unit ++ val show : #App_types.t -> unit -> unit + end + + module Open : sig + type t +- val make : #App.t -> t ++ val make : #App_types.t -> t + val show : t -> string option + end + + (* + module LockedDB : sig +- val show : #App.t -> [`FAIL | `RETRY] ++ val show : #App_types.t -> [`FAIL | `RETRY] + end + *) + + type manager + val make : unit -> manager * GObj.widget * GObj.widget +-val setup : manager -> #App.t -> unit ++val setup : manager -> #App_types.t -> unit + + val popup : +- manager -> #App.t -> ++ manager -> #App_types.t -> + popup_id:string -> int -> unit + val popup_cert : manager -> int -> unit +-val open_db : manager -> #App.t -> unit +-val close_db : manager -> #App.t -> unit ++val open_db : manager -> #App_types.t -> unit ++val close_db : manager -> #App_types.t -> unit + val clear : manager -> unit + val update_begin : manager -> unit + +diff --git a/unidiff.mli b/unidiff.mli +index 8e3f999..3798d2a 100644 +--- a/unidiff.mli ++++ b/unidiff.mli +@@ -1 +1 @@ +-val show : #App.t -> string -> string -> unit ++val show : #App_types.t -> string -> string -> unit +diff --git a/view.mli b/view.mli +index 0765ca6..eab83cd 100644 +--- a/view.mli ++++ b/view.mli +@@ -1,7 +1,7 @@ + module Info_Display : + sig + type t +- val fetch_and_display_data : t -> #App.t -> string -> unit ++ val fetch_and_display_data : t -> #App_types.t -> string -> unit + val get_current_cert_value : t -> string option + end + +@@ -10,23 +10,23 @@ module Branch_selector : + type t + type state + val get_state : t -> state +- val set_state : t -> #App.t -> ?id:string -> state -> unit +- val set_branch : t -> #App.t -> ?id:string -> string -> unit ++ val set_state : t -> #App_types.t -> ?id:string -> state -> unit ++ val set_branch : t -> #App_types.t -> ?id:string -> string -> unit + val present_dialog : t -> unit + end + + module Canvas : + sig + type t +- val zoom : t -> #App.t -> [< `IN | `OUT ] -> unit -> unit +- val id_size : t -> #App.t -> int * int * int +- val center_on : t -> #App.t -> string * Viz_types.c_node -> unit ++ val zoom : t -> #App_types.t -> [< `IN | `OUT ] -> unit -> unit ++ val id_size : t -> #App_types.t -> int * int * int ++ val center_on : t -> #App_types.t -> string * Viz_types.c_node -> unit + end + + module Find : + sig + type t +- val locate : t -> #App.t -> string -> unit ++ val locate : t -> #App_types.t -> string -> unit + val focus_find_entry : t -> unit + end + +@@ -42,10 +42,10 @@ val make : + parent:#GWindow.window_skel -> + pack_find_entry:(GObj.widget -> unit) -> + pack_canvas:(GObj.widget -> unit) -> t +-val setup : t -> #App.t -> unit ++val setup : t -> #App_types.t -> unit + +-val clear : t -> #App.t -> unit +-val close_db : t -> #App.t -> unit +-val open_db : t -> #App.t -> unit +-val update : t -> #App.t -> string option -> unit ++val clear : t -> #App_types.t -> unit ++val close_db : t -> #App_types.t -> unit ++val open_db : t -> #App_types.t -> unit ++val update : t -> #App_types.t -> string option -> unit + val get_selected_node : t -> string option diff --git a/debian/patches/series b/debian/patches/series index a24eb6c..a51123d 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -3,3 +3,4 @@ 20-dot-rankdir.diff 30-dynamic-c-bindings.diff 40-hardening.diff +50-ocaml-4.02.2.diff