Bug#967294: coinst: depends on deprecated GTK 2
Control: tags -1 patch
Am 23.08.23 um 20:14 schrieb Bastian Germann:
Please consider dropping the coinst-viewer package and the libcairo-ocaml-dev build dependency.
Please find a patch attached.
diff -Nru coinst-1.9.3/debian/changelog coinst-1.9.3/debian/changelog
--- coinst-1.9.3/debian/changelog 2023-08-08 09:31:46.000000000 +0200
+++ coinst-1.9.3/debian/changelog 2023-08-26 12:14:41.000000000 +0200
@@ -1,3 +1,10 @@
+coinst (1.9.3-4.1) unstable; urgency=medium
+
+ * Non-maintainer upload
+ * Drop coinst-viewer (Closes: #967294)
+
+ -- Bastian Germann <bage@debian.org> Sat, 26 Aug 2023 12:14:41 +0200
+
coinst (1.9.3-4) unstable; urgency=medium
[ Stéphane Glondu ]
diff -Nru coinst-1.9.3/debian/coinst-viewer.dirs coinst-1.9.3/debian/coinst-viewer.dirs
--- coinst-1.9.3/debian/coinst-viewer.dirs 2023-08-08 09:31:46.000000000 +0200
+++ coinst-1.9.3/debian/coinst-viewer.dirs 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-usr/share/coinst-viewer
diff -Nru coinst-1.9.3/debian/coinst-viewer.install coinst-1.9.3/debian/coinst-viewer.install
--- coinst-1.9.3/debian/coinst-viewer.install 2023-08-08 09:31:46.000000000 +0200
+++ coinst-1.9.3/debian/coinst-viewer.install 1970-01-01 01:00:00.000000000 +0100
@@ -1,3 +0,0 @@
-viewer/coinst_viewer usr/bin
-viewer/coinst_converter usr/bin
-viewer/jsviewer.js usr/share/coinst-viewer
diff -Nru coinst-1.9.3/debian/coinst-viewer.manpages coinst-1.9.3/debian/coinst-viewer.manpages
--- coinst-1.9.3/debian/coinst-viewer.manpages 2023-08-08 09:31:46.000000000 +0200
+++ coinst-1.9.3/debian/coinst-viewer.manpages 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-debian/manpages/coinst_viewer.1
diff -Nru coinst-1.9.3/debian/control coinst-1.9.3/debian/control
--- coinst-1.9.3/debian/control 2023-08-08 09:31:46.000000000 +0200
+++ coinst-1.9.3/debian/control 2023-08-26 12:14:26.000000000 +0200
@@ -9,9 +9,6 @@
ocaml-findlib,
ocaml,
libcudf-ocaml-dev,
-# needed for the viewer:
- js-of-ocaml,
- libcairo-ocaml-dev
Standards-Version: 4.6.2
Rules-Requires-Root: no
Homepage: http://coinst.irill.org
@@ -21,7 +18,7 @@
Package: coinst
Architecture: any
Depends: ${misc:Depends}, ${ocaml:Depends}, ${shlibs:Depends}
-Recommends: coinst-viewer, dot
+Recommends: dot
Description: computes the co-installability kernel of a deb or RPM repository
This package is useful when you are interested in analyzing
co-installability of packages in a large package repository. A set
@@ -36,13 +33,3 @@
- identifying all packages that behave the same.
The kernel is typically orders of magnitude smaller than the original
repository.
-
-Package: coinst-viewer
-Architecture: any
-Depends: ${misc:Depends}, ${ocaml:Depends}, ${shlibs:Depends}
-Recommends: coinst
-Description: viewer for co-installability kernels generated by coinst
- This package is useful when you are interested in analyzing
- co-installability of packages in a large package repository.
- It contains a custom viewer for co-installability kernels
- generated by the coinst tool.
diff -Nru coinst-1.9.3/debian/manpages/coinst_viewer.1 coinst-1.9.3/debian/manpages/coinst_viewer.1
--- coinst-1.9.3/debian/manpages/coinst_viewer.1 2023-08-08 09:31:46.000000000 +0200
+++ coinst-1.9.3/debian/manpages/coinst_viewer.1 1970-01-01 01:00:00.000000000 +0100
@@ -1,23 +0,0 @@
-.TH COINST_VIEWER 1
-
-.SH NAME
-Coinst_viewer \- view co-installability kernel generated by coinst for X
-
-.SH SYNOPSIS
-.B coinst_viewer \fIfile\fR.dot
-
-.SH DESCRIPTION
-.B coinst_viewer
-reads the graph of a co-installability produced with coinst and
-then layouted with dot, and displays it.
-
-.SH AUTHOR
-Coinst_viewer has been written by Jérome Vouillôn. This manpage has been
-compiled by Ralf Treinen from the original coinst documentation.
-
-.SH SEE ALSO
-.BR dot (1), coinst(1)
-.br
-.I http://coinst.irill.org
-
-
diff -Nru coinst-1.9.3/debian/patches/0002-Port-to-modern-js_of_ocaml.patch coinst-1.9.3/debian/patches/0002-Port-to-modern-js_of_ocaml.patch
--- coinst-1.9.3/debian/patches/0002-Port-to-modern-js_of_ocaml.patch 2023-08-08 09:31:46.000000000 +0200
+++ coinst-1.9.3/debian/patches/0002-Port-to-modern-js_of_ocaml.patch 1970-01-01 01:00:00.000000000 +0100
@@ -1,360 +0,0 @@
-From: Stephane Glondu <steph@glondu.net>
-Date: Tue, 18 Aug 2020 13:22:13 +0200
-Subject: Port to modern js_of_ocaml
-
-Forwarded: https://github.com/vouillon/coinst/pull/8
----
- viewer/Makefile | 6 +-
- viewer/viewer_js.ml | 155 ++++++++++++++++++++++++++--------------------------
- 2 files changed, 82 insertions(+), 79 deletions(-)
-
-diff --git a/viewer/Makefile b/viewer/Makefile
-index 5153664..437799a 100644
---- a/viewer/Makefile
-+++ b/viewer/Makefile
-@@ -5,7 +5,7 @@ OCAMLDEP=ocamlfind ocamldep
- OCAMLYACC=ocamlyacc
- OCAMLLEX=ocamllex
-
--COMPFLAGS=-package str,cairo.lablgtk2,js_of_ocaml,js_of_ocaml.syntax -syntax camlp4o
-+COMPFLAGS=-package str,cairo.lablgtk2,js_of_ocaml,js_of_ocaml-ppx,js_of_ocaml-lwt
- DEPFLAGS=$(COMPFLAGS)
-
- GENERATED=dot_parser.ml dot_lexer.ml
-@@ -18,7 +18,7 @@ CONVERTER=scene.cmx scene_extents.cmx scene_json.cmx \
- OPTLINKFLAGS=-package str,cairo.lablgtk2 -linkpkg
-
- JSOBJS=scene.cmo viewer_common.cmo viewer_js.cmo
--LINKFLAGS=-package js_of_ocaml -linkpkg
-+LINKFLAGS=-package js_of_ocaml,js_of_ocaml-lwt -linkpkg
-
- all: coinst_viewer jsviewer.js coinst_converter
- opt: all
-@@ -37,7 +37,7 @@ coinst_converter.byte: $(CONVERTER:.cmx=.cmo)
- $(OCAMLC) -o $@ $(OPTLINKFLAGS) $^
-
- jsviewer.js: jsviewer.byte
-- js_of_ocaml $^ -pretty
-+ js_of_ocaml $^ --pretty
-
- jsviewer.byte: $(JSOBJS)
- $(OCAMLC) -o $@ $(LINKFLAGS) $^
-diff --git a/viewer/viewer_js.ml b/viewer/viewer_js.ml
-index a8cdd99..72541b3 100644
---- a/viewer/viewer_js.ml
-+++ b/viewer/viewer_js.ml
-@@ -17,13 +17,16 @@
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *)
-
-+open Js_of_ocaml
-+open Js_of_ocaml_lwt
-+
- type rect = {x : int; y : int; width : int; height: int}
-
- module Html = Dom_html
-
- let create_canvas w h =
- let c = Html.createCanvas Html.document in
-- c##width <- w; c##height <- h; c
-+ c##.width := w; c##.height := h; c
-
- module Common = Viewer_common.F (struct
- type font = Js.js_string Js.t
-@@ -33,38 +36,38 @@ module Common = Viewer_common.F (struct
-
- type ctx = Html.canvasRenderingContext2D Js.t
-
-- let save ctx = ctx##save ()
-- let restore ctx = ctx##restore ()
-+ let save ctx = ctx##save
-+ let restore ctx = ctx##restore
-
-- let scale ctx ~sx ~sy = ctx##scale (sx, sy)
-- let translate ctx ~tx ~ty = ctx##translate (tx, ty)
-+ let scale ctx ~sx ~sy = ctx##scale sx sy
-+ let translate ctx ~tx ~ty = ctx##translate tx ty
-
-- let set_line_width ctx w = ctx##lineWidth <- w
-+ let set_line_width ctx w = ctx##.lineWidth := w
-
-- let begin_path ctx = ctx##beginPath ()
-- let close_path ctx = ctx##closePath ()
-- let move_to ctx ~x ~y = ctx##moveTo (x, y)
-- let line_to ctx ~x ~y = ctx##lineTo (x, y)
-+ let begin_path ctx = ctx##beginPath
-+ let close_path ctx = ctx##closePath
-+ let move_to ctx ~x ~y = ctx##moveTo x y
-+ let line_to ctx ~x ~y = ctx##lineTo x y
- let curve_to ctx ~x1 ~y1 ~x2 ~y2 ~x3 ~y3 =
-- ctx##bezierCurveTo (x1, y1, x2, y2, x3, y3)
-+ ctx##bezierCurveTo x1 y1 x2 y2 x3 y3
- let arc ctx ~xc ~yc ~radius ~angle1 ~angle2 =
-- ctx##arc (xc, yc, radius, angle1, angle2, Js._true)
-- let rectangle ctx ~x ~y ~width ~height = ctx##rect (x, y, width, height)
-+ ctx##arc xc yc radius angle1 angle2 Js._true
-+ let rectangle ctx ~x ~y ~width ~height = ctx##rect x y width height
-
-- let fill ctx c = ctx##fillStyle <- c; ctx##fill ()
-- let stroke ctx c = ctx##strokeStyle <- c; ctx##stroke ()
-- let clip ctx = ctx##clip ()
-+ let fill ctx c = ctx##.fillStyle := c; ctx##fill
-+ let stroke ctx c = ctx##.strokeStyle := c; ctx##stroke
-+ let clip ctx = ctx##clip
-
- let draw_text (ctx:ctx) x y txt font fill_color stroke_color =
-- ctx##font <- font;
-- ctx##textAlign <- Js.string "center";
-- ctx##textBaseline <- Js.string "middle";
-+ ctx##.font := font;
-+ ctx##.textAlign := Js.string "center";
-+ ctx##.textBaseline := Js.string "middle";
- begin match fill_color with
-- Some c -> ctx##fillStyle <- c; ctx##fillText (txt, x, y)
-+ Some c -> ctx##.fillStyle := c; ctx##fillText txt x y
- | None -> ()
- end;
- begin match stroke_color with
-- Some c -> ctx##strokeStyle <- c; ctx##strokeText (txt, x, y)
-+ Some c -> ctx##.strokeStyle := c; ctx##strokeText txt x y
- | None -> ()
- end
-
-@@ -73,16 +76,16 @@ module Common = Viewer_common.F (struct
- type pixmap = drawable
- let get_drawable w =
- let ctx = w##getContext(Html._2d_) in
-- ctx##lineWidth <- 2.;
-+ ctx##.lineWidth := 2.;
- (w, ctx)
- let make_pixmap _ width height =
- let c = Html.createCanvas Html.document in
-- c##width <- width; c##height <- height;
-+ c##.width := width; c##.height := height;
- get_drawable c
- let drawable_of_pixmap p = p
- let get_context (p, c) = c
- let put_pixmap ~dst:((p, c) :drawable) ~x ~y ~xsrc ~ysrc ~width ~height ((p, _) : pixmap)=
-- c##drawImage_fullFromCanvas (p, float xsrc, float ysrc, float width, float height, float x, float y, float width, float height)
-+ c##drawImage_fullFromCanvas p (float xsrc) (float ysrc) (float width) (float height) (float x) (float y) (float width) (float height)
-
- (****)
-
-@@ -92,8 +95,8 @@ end)
- open Common
-
- let redraw st s h v (canvas : Html.canvasElement Js.t) =
-- let width = canvas##width in
-- let height = canvas##height in
-+ let width = canvas##.width in
-+ let height = canvas##.height in
- (*Firebug.console##time (Js.string "draw");*)
- if width > 0 && height > 0 then
- redraw st s h v canvas
-@@ -141,15 +144,15 @@ class adjustment
- let handle_drag element f =
- let mx = ref 0 in
- let my = ref 0 in
-- element##onmousedown <- Html.handler
-+ element##.onmousedown := Html.handler
- (fun ev ->
-- mx := ev##clientX; my := ev##clientY;
-- element##style##cursor <- Js.string "move";
-+ mx := ev##.clientX; my := ev##.clientY;
-+ element##.style##.cursor := Js.string "move";
- let c1 =
- Html.addEventListener Html.document Html.Event.mousemove
- (Html.handler
- (fun ev ->
-- let x = ev##clientX and y = ev##clientY in
-+ let x = ev##.clientX and y = ev##.clientY in
- let x' = !mx and y' = !my in
- mx := x; my := y;
- f (x - x') (y - y');
-@@ -165,7 +168,7 @@ let handle_drag element f =
- Js.Opt.iter !c2 Html.removeEventListener;
- (* "auto" would be better, but does not seem to work
- with Opera *)
-- element##style##cursor <- Js.string "";
-+ element##.style##.cursor := Js.string "";
- Js._true))
- Js._true);
- (* We do not want to disable the default action on mouse down
-@@ -181,19 +184,19 @@ let load () =
-
- let start () =
- let doc = Html.document in
-- let page = doc##documentElement in
-- page##style##overflow <- Js.string "hidden";
-- doc##body##style##overflow <- Js.string "hidden";
-- doc##body##style##margin <- Js.string "0px";
-+ let page = doc##.documentElement in
-+ page##.style##.overflow := Js.string "hidden";
-+ doc##.body##.style##.overflow := Js.string "hidden";
-+ doc##.body##.style##.margin := Js.string "0px";
-
- let started = ref false in
- let p = Html.createP doc in
-- p##innerHTML <- Js.string "Loading graph...";
-- p##style##display <- Js.string "none";
-- Dom.appendChild doc##body p;
-+ p##.innerHTML := Js.string "Loading graph...";
-+ p##.style##.display := Js.string "none";
-+ Dom.appendChild doc##.body p;
- ignore
- (Lwt_js.sleep 0.5 >>= fun () ->
-- if not !started then p##style##display <- Js.string "inline";
-+ if not !started then p##.style##.display := Js.string "inline";
- Lwt.return ());
-
- (*
-@@ -206,7 +209,7 @@ let start () =
- *)
-
- started := true;
-- Dom.removeChild doc##body p;
-+ Dom.removeChild doc##.body p;
-
- let st =
- { bboxes = bboxes;
-@@ -216,10 +219,10 @@ let start () =
- st_pixmap = Common.make_pixmap () }
- in
-
-- let canvas = create_canvas (page##clientWidth) (page##clientHeight) in
-- Dom.appendChild doc##body canvas;
-+ let canvas = create_canvas (page##.clientWidth) (page##.clientHeight) in
-+ Dom.appendChild doc##.body canvas;
- let allocation () =
-- {x = 0; y = 0; width = canvas##width; height = canvas##height} in
-+ {x = 0; y = 0; width = canvas##.width; height = canvas##.height} in
-
- let hadj = new adjustment () in
- let vadj = new adjustment () in
-@@ -299,28 +302,28 @@ Firebug.console##log(Js.string "sleep");
- let size_px = points size in
- let pos = ref height in
- let thumb = Html.createDiv doc in
-- let style = thumb##style in
-- style##position <- Js.string "absolute";
-- style##width <- size_px;
-- style##height <- size_px;
-- style##top <- points !pos;
-- style##left <- Js.string "0px";
-- style##margin <- Js.string "1px";
-- style##backgroundColor <- Js.string "black";
-+ let style = thumb##.style in
-+ style##.position := Js.string "absolute";
-+ style##.width := size_px;
-+ style##.height := size_px;
-+ style##.top := points !pos;
-+ style##.left := Js.string "0px";
-+ style##.margin := Js.string "1px";
-+ style##.backgroundColor := Js.string "black";
- let slider = Html.createDiv doc in
-- let style = slider##style in
-- style##position <- Js.string "absolute";
-- style##width <- size_px;
-- style##height <- points (height + size);
-- style##border <- Js.string "2px solid black";
-- style##padding <- Js.string "1px";
-- style##top <- Js.string "10px";
-- style##left <- Js.string "10px";
-+ let style = slider##.style in
-+ style##.position := Js.string "absolute";
-+ style##.width := size_px;
-+ style##.height := points (height + size);
-+ style##.border := Js.string "2px solid black";
-+ style##.padding := Js.string "1px";
-+ style##.top := Js.string "10px";
-+ style##.left := Js.string "10px";
- Dom.appendChild slider thumb;
-- Dom.appendChild doc##body slider;
-+ Dom.appendChild doc##.body slider;
- let set_slider_position pos' =
- if pos' <> !pos then begin
-- thumb##style##top <- points pos';
-+ thumb##.style##.top := points pos';
- pos := pos';
- sadj#set_value (float (height - pos') *. sadj#upper /. float height);
- rescale 0.5 0.5
-@@ -329,24 +332,24 @@ Firebug.console##log(Js.string "sleep");
- handle_drag thumb
- (fun dx dy ->
- set_slider_position (min height (max 0 (!pos + dy))));
-- slider##onmousedown <- Html.handler
-+ slider##.onmousedown := Html.handler
- (fun ev ->
-- let ey = ev##clientY in
-+ let ey = ev##.clientY in
- let (_, sy) = Dom_html.elementClientPosition slider in
- set_slider_position (max 0 (min height (ey - sy - size / 2)));
- Js._false);
- let adjust_slider () =
- let pos' =
- height - truncate (sadj#value *. float height /. sadj#upper +. 0.5) in
-- thumb##style##top <- points pos';
-+ thumb##.style##.top := points pos';
- pos := pos'
- in
-
-- Html.window##onresize <- Html.handler
-+ Html.window##.onresize := Html.handler
- (fun _ ->
-- let page = doc##documentElement in
-- canvas##width <- page##clientWidth;
-- canvas##height <- page##clientHeight;
-+ let page = doc##.documentElement in
-+ canvas##.width := page##.clientWidth;
-+ canvas##.height := page##.clientHeight;
- update_view true;
- Js._true);
-
-@@ -383,8 +386,8 @@ Firebug.console##log(Js.string "sleep");
- ignore (Html.addMousewheelEventListener canvas
- (fun ev ~dx ~dy ->
- let (ex, ey) = Dom_html.elementClientPosition canvas in
-- let x = float (ev##clientX - ex) in
-- let y = float (ev##clientY - ey) in
-+ let x = float (ev##.clientX - ex) in
-+ let y = float (ev##.clientY - ey) in
- if dy < 0 then
- bump_scale x y 1.
- else if dy > 0 then
-@@ -420,7 +423,7 @@ Firebug.console##log(Js.string "sleep");
- Js._true;
- *)
- let handle_key_event ev =
-- match ev##keyCode with
-+ match ev##.keyCode with
- 37 -> (* left *)
- hadj#set_value (hadj#value -. hadj#step_increment);
- update_view false;
-@@ -444,17 +447,17 @@ Firebug.console##log(Js.string "sleep");
- Js._true
- in
- let ignored_keycode = ref (-1) in
-- Html.document##onkeydown <-
-+ Html.document##.onkeydown :=
- (Html.handler
- (fun e ->
-- ignored_keycode := e##keyCode;
-+ ignored_keycode := e##.keyCode;
- handle_key_event e));
-- Html.document##onkeypress <-
-+ Html.document##.onkeypress :=
- (Html.handler
- (fun e ->
- let k = !ignored_keycode in
- ignored_keycode := -1;
-- if e##keyCode = k then Js._true else handle_key_event e));
-+ if e##.keyCode = k then Js._true else handle_key_event e));
-
-
- (*
-@@ -469,4 +472,4 @@ Firebug.console##timeEnd(Js.string "init");
- Lwt.return ()
-
- let _ =
--Html.window##onload <- Html.handler (fun _ -> ignore (start ()); Js._false)
-+Html.window##.onload := Html.handler (fun _ -> ignore (start ()); Js._false)
diff -Nru coinst-1.9.3/debian/patches/series coinst-1.9.3/debian/patches/series
--- coinst-1.9.3/debian/patches/series 2023-08-08 09:31:46.000000000 +0200
+++ coinst-1.9.3/debian/patches/series 2023-08-26 12:14:41.000000000 +0200
@@ -1,3 +1,2 @@
0001-Fix-FTBFS-with-OCaml-4.08.1.patch
-0002-Port-to-modern-js_of_ocaml.patch
0003-Update-britney-data-locations.patch
diff -Nru coinst-1.9.3/debian/rules coinst-1.9.3/debian/rules
--- coinst-1.9.3/debian/rules 2023-08-08 09:31:46.000000000 +0200
+++ coinst-1.9.3/debian/rules 2023-08-26 12:14:41.000000000 +0200
@@ -7,12 +7,6 @@
override_dh_auto_build:
$(MAKE) $(OCAML_BEST)
- $(MAKE) -C viewer $(OCAML_BEST)
-ifeq ($(OCAML_HAVE_OCAMLOPT),no)
- ln viewer/coinst_viewer.byte viewer/coinst_viewer
- ln viewer/coinst_converter.byte viewer/coinst_converter
-endif
override_dh_auto_clean:
make clean
- cd viewer && make clean
Reply to: