[Pkg-ocaml-maint-commits] [SCM] frama-c packaging branch, master, updated. debian/20090901+beryllium+dfsg-1-5-g6e558e7

Mehdi Dogguy mehdi at debian.org
Wed Dec 2 00:02:44 UTC 2009


The following commit has been merged in the master branch:
commit 22dd40158f6940eb8f3d97572948efc85612e8e8
Author: Mehdi Dogguy <mehdi at debian.org>
Date:   Wed Dec 2 00:08:56 2009 +0100

    Add a patch: 0004-Use-GSourceView2.patch

diff --git a/debian/changelog b/debian/changelog
index 4d9c579..a63b98f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,10 +1,11 @@
 frama-c (20090901+beryllium+dfsg-2) unstable; urgency=low
 
   * Fix watch file
-  * Build-depend on lablgtk2 (>= 2.14)
+  * Build-depend on lablgtk2 (>= 2.14) (Closes: #541963).
+    - Add a patch: 0004-Use-GSourceView2.patch
   * Use new features of dh-ocaml
 
- -- Mehdi Dogguy <mehdi at debian.org>  Tue, 01 Dec 2009 23:34:01 +0100
+ -- Mehdi Dogguy <mehdi at debian.org>  Wed, 02 Dec 2009 00:08:35 +0100
 
 frama-c (20090901+beryllium+dfsg-1) unstable; urgency=low
 
diff --git a/debian/patches/0004-Use-GSourceView2.patch b/debian/patches/0004-Use-GSourceView2.patch
new file mode 100644
index 0000000..bac11db
--- /dev/null
+++ b/debian/patches/0004-Use-GSourceView2.patch
@@ -0,0 +1,367 @@
+From: Mehdi Dogguy <mehdi at debian.org>
+Date: Wed, 2 Dec 2009 00:08:03 +0100
+Subject: [PATCH] Use GSourceView2
+
+---
+ Makefile                    |    4 ++--
+ configure                   |   24 ++++++++++++------------
+ src/gui/design.ml           |    8 ++++----
+ src/gui/design.mli          |    6 +++---
+ src/gui/gtk_helper.mli      |    8 ++++----
+ src/gui/pretty_source.mli   |    2 +-
+ src/gui/source_manager.ml   |    4 ++--
+ src/gui/source_manager.mli  |   10 +++++-----
+ src/gui/source_viewer.ml    |   16 ++++++++--------
+ src/gui/source_viewer.mli   |    4 ++--
+ src/scope/dpds_gui.ml       |    2 +-
+ src/slicing/register_gui.ml |    2 +-
+ src/value/register_gui.ml   |    2 +-
+ 13 files changed, 46 insertions(+), 46 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 3a70533..fab3a2c 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1117,8 +1117,8 @@ ifeq ($(HAS_GTKSOURCEVIEW),yes)
+ ifeq ($(HAS_LEGACY_GTKSOURCEVIEW),yes)
+ GUI_INCLUDES  += -I +lablgtksourceview
+ endif
+-BYTE_GUI_LIBS += lablgtksourceview.cma
+-OPT_GUI_LIBS  += lablgtksourceview.cmxa
++BYTE_GUI_LIBS += lablgtksourceview2.cma
++OPT_GUI_LIBS  += lablgtksourceview2.cmxa
+ endif
+ 
+ src/gui/filetree.ml: Makefile
+diff --git a/configure b/configure
+index 0b6659a..963b705 100755
+--- a/configure
++++ b/configure
+@@ -8005,17 +8005,17 @@ $as_echo "$as_me: error: $p requested but $OCAMLLIB/lablgtk2/lablgtk.$LIB_SUFFIX
+   if test -n "$REQUIRE_GTKSOURCEVIEW" -o -n "$USE_GTKSOURCEVIEW" -o "no" == "yes"; then
+     HAS_GTKSOURCEVIEW=no
+     if test "$HAS_GTKSOURCEVIEW" != "yes"; then
+-          as_ac_File=`$as_echo "ac_cv_file_$OCAMLLIB/lablgtk2/lablgtksourceview.$LIB_SUFFIX" | $as_tr_sh`
+-{ $as_echo "$as_me:$LINENO: checking for $OCAMLLIB/lablgtk2/lablgtksourceview.$LIB_SUFFIX" >&5
+-$as_echo_n "checking for $OCAMLLIB/lablgtk2/lablgtksourceview.$LIB_SUFFIX... " >&6; }
++          as_ac_File=`$as_echo "ac_cv_file_$OCAMLLIB/lablgtk2/lablgtksourceview2.$LIB_SUFFIX" | $as_tr_sh`
++{ $as_echo "$as_me:$LINENO: checking for $OCAMLLIB/lablgtk2/lablgtksourceview2.$LIB_SUFFIX" >&5
++$as_echo_n "checking for $OCAMLLIB/lablgtk2/lablgtksourceview2.$LIB_SUFFIX... " >&6; }
+ if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
+   $as_echo_n "(cached) " >&6
+ else
+   test "$cross_compiling" = yes &&
+-  { { $as_echo "$as_me:$LINENO: error: cannot check for $OCAMLLIB/lablgtk2/lablgtksourceview.$LIB_SUFFIX existence when cross compiling" >&5
+-$as_echo "$as_me: error: cannot check for $OCAMLLIB/lablgtk2/lablgtksourceview.$LIB_SUFFIX existence when cross compiling" >&2;}
++  { { $as_echo "$as_me:$LINENO: error: cannot check for $OCAMLLIB/lablgtk2/lablgtksourceview2.$LIB_SUFFIX existence when cross compiling" >&5
++$as_echo "$as_me: error: cannot check for $OCAMLLIB/lablgtk2/lablgtksourceview2.$LIB_SUFFIX existence when cross compiling" >&2;}
+    { (exit 1); exit 1; }; }
+-if test -r "$OCAMLLIB/lablgtk2/lablgtksourceview.$LIB_SUFFIX"; then
++if test -r "$OCAMLLIB/lablgtk2/lablgtksourceview2.$LIB_SUFFIX"; then
+   eval "$as_ac_File=yes"
+ else
+   eval "$as_ac_File=no"
+@@ -8070,20 +8070,20 @@ fi
+        fi
+ 
+     if test "$HAS_GTKSOURCEVIEW" == "no"; then
+-      { $as_echo "$as_me:$LINENO: WARNING: lablgtksourceview.$LIB_SUFFIX not found" >&5
+-$as_echo "$as_me: WARNING: lablgtksourceview.$LIB_SUFFIX not found" >&2;}
++      { $as_echo "$as_me:$LINENO: WARNING: lablgtksourceview2.$LIB_SUFFIX not found" >&5
++$as_echo "$as_me: WARNING: lablgtksourceview2.$LIB_SUFFIX not found" >&2;}
+       if test "$REQUIRE_GTKSOURCEVIEW" != ""; then
+         echo "plug-ins disabled:
+  $REQUIRE_GTKSOURCEVIEW"
+         for p in $REQUIRE_GTKSOURCEVIEW; do
+ 	  fp=FORCE_`upper "$p"`
+ 	  if eval test "\$$fp" == "yes"; then
+-	    { { $as_echo "$as_me:$LINENO: error: $p requested but $OCAMLLIB/lablgtk2/lablgtksourceview.$LIB_SUFFIX" >&5
+-$as_echo "$as_me: error: $p requested but $OCAMLLIB/lablgtk2/lablgtksourceview.$LIB_SUFFIX" >&2;}
++	    { { $as_echo "$as_me:$LINENO: error: $p requested but $OCAMLLIB/lablgtk2/lablgtksourceview2.$LIB_SUFFIX" >&5
++$as_echo "$as_me: error: $p requested but $OCAMLLIB/lablgtk2/lablgtksourceview2.$LIB_SUFFIX" >&2;}
+    { (exit $OCAMLLIB/lablgtksourceview/lablgtksourceview.$LIB_SUFFIX missing.); exit $OCAMLLIB/lablgtksourceview/lablgtksourceview.$LIB_SUFFIX missing.; }; }
+ 	  fi
+           ep=ENABLE_`upper "$p"`
+-	  eval $ep="no\ \(see\ warning\ about\ $OCAMLLIB/lablgtk2/lablgtksourceview.$LIB_SUFFIX,$OCAMLLIB/lablgtksourceview/lablgtksourceview.$LIB_SUFFIX\)"
++	  eval $ep="no\ \(see\ warning\ about\ $OCAMLLIB/lablgtk2/lablgtksourceview2.$LIB_SUFFIX,$OCAMLLIB/lablgtksourceview/lablgtksourceview.$LIB_SUFFIX\)"
+         done
+       fi
+       if test "$USE_GTKSOURCEVIEW" != ""; then
+@@ -8093,7 +8093,7 @@ $as_echo "$as_me: error: $p requested but $OCAMLLIB/lablgtk2/lablgtksourceview.$
+           ep=ENABLE_`upper "$p"`
+ 	  eval eep="\$$ep"
+ 	  if test "`echo $eep | sed -e 's/ .*//' `" != "no"; then
+-	    eval $ep="partial\ \(see\ warning\ about\ $OCAMLLIB/lablgtk2/lablgtksourceview.$LIB_SUFFIX,$OCAMLLIB/lablgtksourceview/lablgtksourceview.$LIB_SUFFIX\)"
++	    eval $ep="partial\ \(see\ warning\ about\ $OCAMLLIB/lablgtk2/lablgtksourceview2.$LIB_SUFFIX,$OCAMLLIB/lablgtksourceview/lablgtksourceview.$LIB_SUFFIX\)"
+           fi
+         done
+       fi
+diff --git a/src/gui/design.ml b/src/gui/design.ml
+index d50a076..db1dc1d 100644
+--- a/src/gui/design.ml
++++ b/src/gui/design.ml
+@@ -49,7 +49,7 @@ let all_files () =
+ 
+ let use_external_viewer = false
+ 
+-let highlight_range ~scroll tag (v:GSourceView.source_view) pb pe =
++let highlight_range ~scroll tag (v:GSourceView2.source_view) pb pe =
+   let b = v#source_buffer in
+   let start = b#get_iter (`OFFSET pb) in
+   let stop = b#get_iter (`OFFSET pe) in
+@@ -107,7 +107,7 @@ class type main_window_extension_points = object
+   method toplevel : main_window_extension_points
+   method annot_window : GText.view
+   method launcher : unit -> unit
+-  method source_viewer : GSourceView.source_view
++  method source_viewer : GSourceView2.source_view
+   method display_globals : global list -> unit
+ 
+   method register_source_selector :
+@@ -116,7 +116,7 @@ class type main_window_extension_points = object
+     -> unit
+ 
+   method register_source_highlighter :
+-    (GSourceView.source_buffer -> localizable -> start:int -> stop:int -> unit)
++    (GSourceView2.source_buffer -> localizable -> start:int -> stop:int -> unit)
+     -> unit
+ 
+   method register_panel :
+@@ -629,7 +629,7 @@ let (selector: (GMenu.menu GMenu.factory ->
+ 
+ class type reactive_buffer = object
+   inherit error_manager
+-  method buffer : GSourceView.source_buffer
++  method buffer : GSourceView2.source_buffer
+   method locs : Pretty_source.Locs.state option
+   method rehighlight : unit
+ end
+diff --git a/src/gui/design.mli b/src/gui/design.mli
+index 7f88d66..d813ed6 100644
+--- a/src/gui/design.mli
++++ b/src/gui/design.mli
+@@ -32,7 +32,7 @@ open Cil_types
+     @since Beryllium-20090901 *)
+ class type reactive_buffer = object
+   inherit Gtk_helper.error_manager
+-  method buffer : GSourceView.source_buffer
++  method buffer : GSourceView2.source_buffer
+   method locs : Pretty_source.Locs.state option
+   method rehighlight : unit
+ end
+@@ -95,7 +95,7 @@ class type main_window_extension_points = object
+     (** The information pannel. 
+         The text is cleared whenever the selection is changed. *)
+ 
+-  method source_viewer : GSourceView.source_view
++  method source_viewer : GSourceView2.source_view
+     (** The [GText.view] showing the AST. 
+ 	@plugin development guide *)
+     
+@@ -116,7 +116,7 @@ class type main_window_extension_points = object
+ 	@plugin development guide *)
+ 
+   method register_source_highlighter :
+-    (GSourceView.source_buffer -> Pretty_source.localizable -> 
++    (GSourceView2.source_buffer -> Pretty_source.localizable ->
+        start:int -> stop:int -> unit)
+     -> unit
+     (** register an highlighting function to run on a given localizable 
+diff --git a/src/gui/gtk_helper.mli b/src/gui/gtk_helper.mli
+index c6aba7c..10a47b7 100644
+--- a/src/gui/gtk_helper.mli
++++ b/src/gui/gtk_helper.mli
+@@ -24,15 +24,15 @@
+ (** Generic Gtk helpers. 
+     @plugin development guide *)
+ 
+-val apply_tag : GSourceView.source_buffer -> GText.tag -> int -> int -> unit
++val apply_tag : GSourceView2.source_buffer -> GText.tag -> int -> int -> unit
+   (** @plugin development guide *)
+ 
+-val remove_tag : GSourceView.source_buffer -> GText.tag -> int -> int -> unit
++val remove_tag : GSourceView2.source_buffer -> GText.tag -> int -> int -> unit
+ 
+-val cleanup_tag : GSourceView.source_buffer -> GText.tag -> unit
++val cleanup_tag : GSourceView2.source_buffer -> GText.tag -> unit
+   (** @plugin development guide *)
+ 
+-val cleanup_all_tags : GSourceView.source_buffer -> unit
++val cleanup_all_tags : GSourceView2.source_buffer -> unit
+ 
+ val expand_to_path : GTree.view -> Gtk.tree_path -> unit
+ 
+diff --git a/src/gui/pretty_source.mli b/src/gui/pretty_source.mli
+index e13c91b..935192a 100644
+--- a/src/gui/pretty_source.mli
++++ b/src/gui/pretty_source.mli
+@@ -47,7 +47,7 @@ end
+ 
+ val display_source :  
+   global list ->
+-  GSourceView.source_buffer ->
++  GSourceView2.source_buffer ->
+   host:Gtk_helper.host -> 
+   highlighter:(localizable -> start:int -> stop:int -> unit) ->
+   selector:(button:int -> localizable -> unit) -> Locs.state
+diff --git a/src/gui/source_manager.ml b/src/gui/source_manager.ml
+index 5dfcafb..b842758 100644
+--- a/src/gui/source_manager.ml
++++ b/src/gui/source_manager.ml
+@@ -31,7 +31,7 @@ type source_tab = {
+ 
+ 
+ module Q = Qstack.Make(struct 
+-                         type t = GSourceView.source_view
++                         type t = GSourceView2.source_view
+                          let equal x y = x == y
+                        end)
+ 
+@@ -109,7 +109,7 @@ let delete_all_views (t:t) =
+   Q.iter (fun _ -> t.notebook#remove_page 0) t.views;
+   Q.clear t.views
+ 
+-let append_view (t:t) (v:GSourceView.source_view) =
++let append_view (t:t) (v:GSourceView2.source_view) =
+   let nb =  t.notebook in
+   let next =  Q.length t.views in
+   let text = Printf.sprintf "Page %d" next in
+diff --git a/src/gui/source_manager.mli b/src/gui/source_manager.mli
+index c2da4f1..3a8b508 100644
+--- a/src/gui/source_manager.mli
++++ b/src/gui/source_manager.mli
+@@ -33,9 +33,9 @@ val load_file : t -> filename:string -> line:int -> unit
+ 
+ val get_notebook: t -> GPack.notebook
+ 
+-val append_source_tab : t -> string -> GSourceView.source_view
++val append_source_tab : t -> string -> GSourceView2.source_view
+ 
+-val prepend_source_tab : t -> string -> GSourceView.source_view
++val prepend_source_tab : t -> string -> GSourceView2.source_view
+ 
+ val get_nth_page: t -> int -> GObj.widget
+ 
+@@ -45,7 +45,7 @@ val last_page: t -> int
+ 
+ val set_current_view: t -> int -> unit
+ 
+-val get_current_view: t -> GSourceView.source_view
++val get_current_view: t -> GSourceView2.source_view
+ 
+ val get_current_index: t -> int
+ 
+@@ -56,9 +56,9 @@ val delete_view: t -> int -> unit
+ val delete_all_views: t -> unit
+   (** Delete all pages in the object *)
+ 
+-val append_view: t -> GSourceView.source_view -> unit
++val append_view: t -> GSourceView2.source_view -> unit
+ 
+-val get_nth_view:  t -> int -> GSourceView.source_view
++val get_nth_view:  t -> int -> GSourceView2.source_view
+ 
+ val enable_popup : t -> bool -> unit
+ 
+diff --git a/src/gui/source_viewer.ml b/src/gui/source_viewer.ml
+index 7857435..46cd9fe 100644
+--- a/src/gui/source_viewer.ml
++++ b/src/gui/source_viewer.ml
+@@ -24,16 +24,16 @@
+ 
+ (* Build a read only text view for C source code. *)
+ 
+-let set_language_to_C (buffer:GSourceView.source_buffer)  = 
+-  let original_source_language_manager = GSourceView.source_languages_manager () in
++let set_language_to_C (buffer:GSourceView2.source_buffer)  =
++  let original_source_language_manager = GSourceView2.source_language_manager false in
+   let original_lang =
+-    original_source_language_manager#get_language_from_mime_type "text/x-csrc"
++    original_source_language_manager#guess_language ~content_type:"text/x-csrc" ()
+   in
+   begin match original_lang with
+-  | Some lang -> buffer#set_language lang
++  | Some _ -> buffer#set_language original_lang
+   | None -> Kernel.warning "Mime type 'text/x-csrc' not found"
+   end;
+-  buffer#set_highlight true
++  buffer#set_highlight_syntax true
+   
+ let make ~packing =
+ (*  let d = GWindow.font_selection_dialog ~title:"tutu" ~show:true () in
+@@ -42,9 +42,9 @@ let make ~packing =
+        Utf8_logic.forall Utf8_logic.exists Utf8_logic.eq Utf8_logic.neq) ;
+ *)
+   let original_source_window = 
+-    GSourceView.source_view
++    GSourceView2.source_view
+       ~show_line_numbers:true
+-      ~show_line_markers:true
++      ~show_line_marks:true
+       ~editable:false
+       ~packing
+       ()
+@@ -67,7 +67,7 @@ let make ~packing =
+   
+     
+ let buffer () =
+-  let original_source_buffer = GSourceView.source_buffer ()  in
++  let original_source_buffer = GSourceView2.source_buffer ()  in
+   set_language_to_C original_source_buffer;
+   original_source_buffer
+ 
+diff --git a/src/gui/source_viewer.mli b/src/gui/source_viewer.mli
+index ecde1f7..92641cc 100644
+--- a/src/gui/source_viewer.mli
++++ b/src/gui/source_viewer.mli
+@@ -19,8 +19,8 @@
+ (*                                                                        *)
+ (**************************************************************************)
+ 
+-val make : packing:(GObj.widget -> unit) -> GSourceView.source_view
++val make : packing:(GObj.widget -> unit) -> GSourceView2.source_view
+ 
+-val buffer : unit -> GSourceView.source_buffer
++val buffer : unit -> GSourceView2.source_buffer
+ 
+ 
+diff --git a/src/scope/dpds_gui.ml b/src/scope/dpds_gui.ml
+index a783258..5aeb130 100644
+--- a/src/scope/dpds_gui.ml
++++ b/src/scope/dpds_gui.ml
+@@ -387,7 +387,7 @@ let callbacks ?(defs=false) ?(zones=false) ?(scope=false) ?(pscope=false)
+     end
+   in main_ui#rehighlight ()
+ 
+-let highlighter (buffer:GSourceView.source_buffer) localizable ~start ~stop =
++let highlighter (buffer:GSourceView2.source_buffer) localizable ~start ~stop =
+   try
+     let _kf, start_s, _txt = DpdsState.get () in
+     let put_tag tag = match tag with ("",[]) -> ()
+diff --git a/src/slicing/register_gui.ml b/src/slicing/register_gui.ml
+index dfe30ec..864c96c 100644
+--- a/src/slicing/register_gui.ml
++++ b/src/slicing/register_gui.ml
+@@ -345,7 +345,7 @@ let slicing_selector (popup_factory:GMenu.menu GMenu.factory)
+     end
+         
+ let slicing_highlighter 
+-    (buffer:GSourceView.source_buffer) localizable ~start ~stop =
++    (buffer:GSourceView2.source_buffer) localizable ~start ~stop =
+   if Enable.get () then begin
+     (* Definition for highlight 'Slicing' *)
+     let highlight project =
+diff --git a/src/value/register_gui.ml b/src/value/register_gui.ml
+index 6c6cbe4..d7e601b 100644
+--- a/src/value/register_gui.ml
++++ b/src/value/register_gui.ml
+@@ -302,7 +302,7 @@ let main (main_ui:Design.main_window_extension_points) =
+   in
+   main_ui#register_source_selector value_selector;
+ 
+-  let highlighter (buffer:GSourceView.source_buffer) localizable ~start ~stop =
++  let highlighter (buffer:GSourceView2.source_buffer) localizable ~start ~stop =
+     (* highlight the degeneration point *)
+     Extlib.may
+       (fun loc ->
+-- 
diff --git a/debian/patches/series b/debian/patches/series
index 89bb7db..17d23de 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 0001-Fix-weak-pattern-matching-in-dynlink_lower_311_byte..patch
 0002-Make-Jessie-plugin-use-Jc-from-Why-2.19.patch
 0003-Add-dGraphView.cmo-when-linking.patch
+0004-Use-GSourceView2.patch

-- 
frama-c packaging



More information about the Pkg-ocaml-maint-commits mailing list