[Pkg-ocaml-maint-commits] r2272 - in trunk/packages/unison/unison2.9.1/trunk/debian: . patches

Sylvain Le Gall gildor at costa.debian.org
Thu Dec 8 23:38:53 UTC 2005


Author: gildor
Date: 2005-12-08 23:38:53 +0000 (Thu, 08 Dec 2005)
New Revision: 2272

Added:
   trunk/packages/unison/unison2.9.1/trunk/debian/patches/02_lablgtk2.dpatch
Modified:
   trunk/packages/unison/unison2.9.1/trunk/debian/changelog
   trunk/packages/unison/unison2.9.1/trunk/debian/control
   trunk/packages/unison/unison2.9.1/trunk/debian/patches/00list
Log:
Build unison2.9.1 with lablgtk2 -- SLG


Modified: trunk/packages/unison/unison2.9.1/trunk/debian/changelog
===================================================================
--- trunk/packages/unison/unison2.9.1/trunk/debian/changelog	2005-12-08 13:24:04 UTC (rev 2271)
+++ trunk/packages/unison/unison2.9.1/trunk/debian/changelog	2005-12-08 23:38:53 UTC (rev 2272)
@@ -1,8 +1,12 @@
 unison2.9.1 (2.9.1-5) unstable; urgency=low
 
   * Remove hardcoded OCaml ABI
+  * Apply 02_lablgtk2 to enable compilation with lablgtk2 (and get rid
+    of lablgtk1). This patch is a major change and don't give exactly the same
+    aspect of lablgtk1 interfaces. This is a problem, but since lablgtk1 will
+    disappear, it is the only way to keep for a time unison2.9.1.
 
- -- Sylvain Le Gall <sylvain.le-gall at polytechnique.org>  Fri,  2 Dec 2005 23:38:26 +0100
+ -- Sylvain Le Gall <sylvain.le-gall at polytechnique.org>  Fri,  9 Dec 2005 00:08:56 +0100
 
 unison2.9.1 (2.9.1-4) unstable; urgency=low
 

Modified: trunk/packages/unison/unison2.9.1/trunk/debian/control
===================================================================
--- trunk/packages/unison/unison2.9.1/trunk/debian/control	2005-12-08 13:24:04 UTC (rev 2271)
+++ trunk/packages/unison/unison2.9.1/trunk/debian/control	2005-12-08 23:38:53 UTC (rev 2272)
@@ -2,7 +2,7 @@
 Section: net
 Priority: optional
 Maintainer: Sylvain Le Gall <sylvain.le-gall at polytechnique.org>
-Build-Depends: debhelper (>= 4.0.0), ocaml-nox (>= 3.09.0), liblablgtk-ocaml-dev, dpatch, chrpath
+Build-Depends: debhelper (>= 4.0.0), ocaml-nox (>= 3.09.0), liblablgtk2-ocaml-dev, dpatch, chrpath
 Standards-Version: 3.6.2.0
 
 Package: unison2.9.1

Modified: trunk/packages/unison/unison2.9.1/trunk/debian/patches/00list
===================================================================
--- trunk/packages/unison/unison2.9.1/trunk/debian/patches/00list	2005-12-08 13:24:04 UTC (rev 2271)
+++ trunk/packages/unison/unison2.9.1/trunk/debian/patches/00list	2005-12-08 23:38:53 UTC (rev 2272)
@@ -1,2 +1,3 @@
 01_ocaml_3_08
+02_lablgtk2
 

Added: trunk/packages/unison/unison2.9.1/trunk/debian/patches/02_lablgtk2.dpatch
===================================================================
--- trunk/packages/unison/unison2.9.1/trunk/debian/patches/02_lablgtk2.dpatch	2005-12-08 13:24:04 UTC (rev 2271)
+++ trunk/packages/unison/unison2.9.1/trunk/debian/patches/02_lablgtk2.dpatch	2005-12-08 23:38:53 UTC (rev 2272)
@@ -0,0 +1,162 @@
+#! /bin/sh -e
+## 01_ocaml_3_08.dpatch by Sylvain Le Gall <sylvain.le-gall at polytechnique.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+if [ $# -lt 1 ]; then
+    echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
+    exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"
+
+case "$1" in
+    -patch) patch -p1 ${patch_opts} < $0;;
+    -unpatch) patch -R -p1 ${patch_opts} < $0;;
+    *)
+        echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
+        exit 1;;
+esac
+
+exit 0
+
+ at DPATCH@
+diff -Nurd unison2.9.1-2.9.1/Makefile.OCaml unison2.9.1-2.9.1-ocaml3.09.0/Makefile.OCaml
+--- unison2.9.1-2.9.1/Makefile.OCaml	2002-04-11 07:13:23.000000000 +0200
++++ unison2.9.1-2.9.1-ocaml3.09.0/Makefile.OCaml	2005-12-08 23:59:29.000000000 +0100
+@@ -182,7 +182,7 @@
+ 
+ # Gtk GUI
+ ifeq ($(UISTYLE), gtk)
+-  CAMLFLAGS+=-I $(OCAMLLIBDIR)/lablgtk
++  CAMLFLAGS+=-I $(OCAMLLIBDIR)/lablgtk2
+   OCAMLOBJS+=pixmaps.cmo uigtk.cmo linkgtk.cmo
+   OCAMLLIBS+=lablgtk.cma
+   OCAMLLIBS+=str.cma	
+diff -Nurd unison2.9.1-2.9.1/uigtk.ml unison2.9.1-2.9.1-ocaml3.09.0/uigtk.ml
+--- unison2.9.1-2.9.1/uigtk.ml	2002-04-11 07:13:23.000000000 +0200
++++ unison2.9.1-2.9.1-ocaml3.09.0/uigtk.ml	2005-12-08 23:55:50.000000000 +0100
+@@ -91,7 +91,7 @@
+ 
+ let grabFocus t =
+   match !currentWindow with
+-    Some w -> t#set_transient_for w;
++    Some w -> t#set_transient_for w#as_window;
+               w#misc#set_sensitive false
+   | None   -> ()
+ 
+@@ -124,21 +124,25 @@
+                        USEFUL LOW-LEVEL WIDGETS
+  **********************************************************************)
+ 
+-class scrolled_text ?editable ?word_wrap ?width ?height ?packing ?show
++class scrolled_text ?editable ?width ?height ?packing ?show
+     () =
+   let sw =
+     GBin.scrolled_window ?width ?height ?packing ~show:false
+       ~hpolicy:`NEVER ~vpolicy:`AUTOMATIC ()
+   in
+-  let text = GEdit.text ?editable ?word_wrap ~packing:sw#add () in
++  let buffer = GText.buffer () in
++  let text = GText.view ~buffer:buffer ?editable ~packing:sw#add () in
+   object
+     inherit GObj.widget_full sw#as_widget
+     method text = text
+     method insert ?(font=fontMonospaceMedium) s =
+-      text#freeze ();
+-      text#delete_text ~start:0 ~stop:text#length;
+-      text#insert ~font:(Lazy.force font) s;
+-      text#thaw ()
++      let buffer = text#buffer 
++      in
++      let style = text#misc#style#copy 
++      in
++      style#set_font (Lazy.force fontMonospaceMedium);
++      text#misc#style#set_font (Lazy.force font);
++      buffer#set_text s
+     method show () = sw#misc#show ()
+     initializer
+       if show <> Some false then sw#misc#show ()
+@@ -502,7 +506,7 @@
+   ignore (sel#cancel_button#connect#clicked ~callback:sel#destroy);
+   ignore (sel#ok_button#connect#clicked ~callback:
+             (fun () ->
+-               let name = sel#get_filename in
++               let name = sel#filename in
+                sel#destroy ();
+                callback name));
+   sel#show ();
+@@ -905,7 +909,7 @@
+   fillLst "default";
+   select_row !selRow;
+   lst#misc#grab_focus ();
+-  currentWindow := Some (t :> GWindow.window);
++  currentWindow := Some (t  :> GWindow.window_skel);
+   ignore (t#connect#destroy ~callback:GMain.Main.quit);
+   t#show ();
+   GMain.Main.main ();
+@@ -1122,8 +1126,8 @@
+     let sw =
+       GBin.scrolled_window ~packing:(toplevelVBox#pack ~expand:false)
+         ~hpolicy:`AUTOMATIC ~vpolicy:`AUTOMATIC () in
+-    GEdit.text ~editable:false ~height:(3 * charH) ~width: (128 * charW)
+-      ~line_wrap:false ~packing:sw#add () in
++    GText.view ~editable:false ~height:(3 * charH) ~width: (128 * charW)
++      ~wrap_mode:`NONE ~packing:sw#add () in
+   detailsWindow#misc#set_can_focus false;
+   let style = detailsWindow#misc#style#copy in
+   style#set_font (Lazy.force fontMonospaceMedium);
+@@ -1168,8 +1172,8 @@
+   in
+ 
+   let updateDetails () =
+-    detailsWindow#freeze ();
+-    detailsWindow#delete_text ~start:0 ~stop:detailsWindow#length;
++    let buffer = GText.buffer ()
++    in
+     begin match !current with
+       None ->
+         ()
+@@ -1180,13 +1184,18 @@
+             None -> Uicommon.details2string !theState.(row).ri "  "
+           | Some(Util.Succeeded) -> Uicommon.details2string !theState.(row).ri "  "
+           | Some(Util.Failed(s)) -> s in
+-        detailsWindow#insert
++        buffer#insert
++           ~iter:buffer#end_iter
+           (transcode (Path.toString !theState.(row).ri.path));
+-        detailsWindow#insert "\n";
+-        detailsWindow#insert details
++        buffer#insert 
++           ~iter:buffer#end_iter
++            "\n";
++        buffer#insert 
++           ~iter:buffer#end_iter
++           details
+     end;
+     (* Display text *)
+-    detailsWindow#thaw ();
++    detailsWindow#set_buffer buffer;
+     updateButtons () in
+ 
+   (*********************************************************************
+@@ -1652,7 +1661,7 @@
+    *********************************************************************)
+   let actionBar =
+     GButton.toolbar
+-      ~orientation:`HORIZONTAL ~tooltips:true ~space_size:10
++      ~orientation:`HORIZONTAL ~tooltips:true (*~space_size:10*)
+       ~packing:(toplevelVBox#pack ~expand:false) () in
+ 
+   (*********************************************************************
+@@ -2022,7 +2031,7 @@
+   ignore (toplevelWindow#event#connect#delete ~callback:
+             (fun _ -> safeExit (); true));
+   toplevelWindow#show ();
+-  currentWindow := Some toplevelWindow;
++  currentWindow := Some (toplevelWindow :> GWindow.window_skel);
+   detectCmd ()
+ 
+ 




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