Package: squeekboard
Version: 1.22.0-4
Severity: serious
Tags: patch

The rust gtk stack was recently updated, and squeekboard needs a few
tweaks to build with the new version.

I have whipped up a patch and tested that squeekboard builds with it,
I have not tested it beyond that.
diff -Nru squeekboard-1.22.0/debian/changelog 
squeekboard-1.22.0/debian/changelog
--- squeekboard-1.22.0/debian/changelog 2023-08-23 08:47:31.000000000 +0000
+++ squeekboard-1.22.0/debian/changelog 2023-10-05 19:31:30.000000000 +0000
@@ -1,3 +1,10 @@
+squeekboard (1.22.0-4.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * update patches for gtk-rs 0.18
+
+ -- Peter Michael Green <plugw...@debian.org>  Thu, 05 Oct 2023 19:31:30 +0000
+
 squeekboard (1.22.0-4) unstable; urgency=medium
 
   [ Peter Michael Green ]
diff -Nru 
squeekboard-1.22.0/debian/patches/0001-Cargo.deps.newer-update-for-gtk-rs-0.17.patch
 
squeekboard-1.22.0/debian/patches/0001-Cargo.deps.newer-update-for-gtk-rs-0.17.patch
--- 
squeekboard-1.22.0/debian/patches/0001-Cargo.deps.newer-update-for-gtk-rs-0.17.patch
        2023-08-23 08:47:31.000000000 +0000
+++ 
squeekboard-1.22.0/debian/patches/0001-Cargo.deps.newer-update-for-gtk-rs-0.17.patch
        1970-01-01 00:00:00.000000000 +0000
@@ -1,53 +0,0 @@
-From: Arnaud Ferraris <arnaud.ferra...@collabora.com>
-Date: Tue, 27 Jun 2023 12:31:30 +0200
-Subject: Cargo.deps.newer: update for gtk-rs 0.17
-
----
- Cargo.deps.newer | 20 ++++++++++----------
- 1 file changed, 10 insertions(+), 10 deletions(-)
-
-diff --git a/Cargo.deps.newer b/Cargo.deps.newer
-index 197dfa3..c236cc5 100644
---- a/Cargo.deps.newer
-+++ b/Cargo.deps.newer
-@@ -9,30 +9,30 @@ zvariant = "2.10.*"
- zvariant_derive = "2.10.*"
- 
- [dependencies.cairo-rs]
--version = "0.14.*"
-+version = "0.17.*"
- 
- [dependencies.cairo-sys-rs]
--version = "0.14.*"
-+version = "0.17.*"
- 
- [dependencies.gdk]
--version = "0.14.*"
-+version = "0.17.*"
- 
- [dependencies.gio]
--version = "0.14.*"
-+version = "0.17.*"
- features = ["v2_58"]
- 
- [dependencies.glib]
--version = "0.14.*"
-+version = "0.17.*"
- features = ["v2_58"]
- 
- [dependencies.glib-sys]
--version = "0.14.*"
-+version = "0.17.*"
- features = ["v2_58"]
- 
- [dependencies.gtk]
--version = "0.14.*"
--features = ["v3_22"]
-+version = "0.17.*"
-+features = ["v3_24"]
- 
- [dependencies.gtk-sys]
--version = "0.14.*"
--features = ["v3_22"]
-+version = "0.17.*"
-+features = ["v3_24"]
diff -Nru 
squeekboard-1.22.0/debian/patches/0001-Cargo.deps.newer-update-for-gtk-rs-0.18.patch
 
squeekboard-1.22.0/debian/patches/0001-Cargo.deps.newer-update-for-gtk-rs-0.18.patch
--- 
squeekboard-1.22.0/debian/patches/0001-Cargo.deps.newer-update-for-gtk-rs-0.18.patch
        1970-01-01 00:00:00.000000000 +0000
+++ 
squeekboard-1.22.0/debian/patches/0001-Cargo.deps.newer-update-for-gtk-rs-0.18.patch
        2023-10-05 19:31:30.000000000 +0000
@@ -0,0 +1,55 @@
+Modified by Peter Michael Green for version 0.18 of rust gtk stack.
+
+From: Arnaud Ferraris <arnaud.ferra...@collabora.com>
+Date: Tue, 27 Jun 2023 12:31:30 +0200
+Subject: Cargo.deps.newer: update for gtk-rs 0.17
+
+---
+ Cargo.deps.newer | 20 ++++++++++----------
+ 1 file changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/Cargo.deps.newer b/Cargo.deps.newer
+index 197dfa3..c236cc5 100644
+--- a/Cargo.deps.newer
++++ b/Cargo.deps.newer
+@@ -9,30 +9,30 @@ zvariant = "2.10.*"
+ zvariant_derive = "2.10.*"
+ 
+ [dependencies.cairo-rs]
+-version = "0.14.*"
++version = "0.18.*"
+ 
+ [dependencies.cairo-sys-rs]
+-version = "0.14.*"
++version = "0.18.*"
+ 
+ [dependencies.gdk]
+-version = "0.14.*"
++version = "0.18.*"
+ 
+ [dependencies.gio]
+-version = "0.14.*"
++version = "0.18.*"
+ features = ["v2_58"]
+ 
+ [dependencies.glib]
+-version = "0.14.*"
++version = "0.18.*"
+ features = ["v2_58"]
+ 
+ [dependencies.glib-sys]
+-version = "0.14.*"
++version = "0.18.*"
+ features = ["v2_58"]
+ 
+ [dependencies.gtk]
+-version = "0.14.*"
+-features = ["v3_22"]
++version = "0.18.*"
++features = ["v3_24"]
+ 
+ [dependencies.gtk-sys]
+-version = "0.14.*"
+-features = ["v3_22"]
++version = "0.18.*"
++features = ["v3_24"]
diff -Nru 
squeekboard-1.22.0/debian/patches/0004-Cargo.-use-xkbcommon-v0.5.patch 
squeekboard-1.22.0/debian/patches/0004-Cargo.-use-xkbcommon-v0.5.patch
--- squeekboard-1.22.0/debian/patches/0004-Cargo.-use-xkbcommon-v0.5.patch      
2023-08-23 08:47:31.000000000 +0000
+++ squeekboard-1.22.0/debian/patches/0004-Cargo.-use-xkbcommon-v0.5.patch      
2023-10-05 19:31:30.000000000 +0000
@@ -26,14 +26,10 @@
 index c236cc5..b36e616 100644
 --- a/Cargo.deps.newer
 +++ b/Cargo.deps.newer
-@@ -7,6 +7,7 @@ zbus = "1.9.*"
- zvariant = "2.10.*"
- # Newer versions seem to confuse the version of Cargo on Debian Bullseye
+@@ -9,2 +9,3 @@ zbus = "1.9.*"
  zvariant_derive = "2.10.*"
 +xkbcommon = { version = "0.5.*", features = ["wayland"] }
  
- [dependencies.cairo-rs]
- version = "0.17.*"
 diff --git a/Cargo.toml.in b/Cargo.toml.in
 index c9b2064..557e6c6 100644
 --- a/Cargo.toml.in
diff -Nru squeekboard-1.22.0/debian/patches/0005-src-popover-gtk-rs-0.18.patch 
squeekboard-1.22.0/debian/patches/0005-src-popover-gtk-rs-0.18.patch
--- squeekboard-1.22.0/debian/patches/0005-src-popover-gtk-rs-0.18.patch        
1970-01-01 00:00:00.000000000 +0000
+++ squeekboard-1.22.0/debian/patches/0005-src-popover-gtk-rs-0.18.patch        
2023-10-05 19:31:30.000000000 +0000
@@ -0,0 +1,13 @@
+Index: squeekboard-1.22.0/src/popover.rs
+===================================================================
+--- squeekboard-1.22.0.orig/src/popover.rs
++++ squeekboard-1.22.0/src/popover.rs
+@@ -326,7 +326,7 @@ pub fn show(
+         let layout_action = gio::SimpleAction::new_stateful(
+             "layout",
+             Some(current_layout_name.to_variant().type_()),
+-            current_layout_name.to_variant()
++            &current_layout_name.to_variant()
+         );
+ 
+         let menu_inner = menu.clone();
diff -Nru 
squeekboard-1.22.0/debian/patches/0006-replace-continue-with-controlflow.patch 
squeekboard-1.22.0/debian/patches/0006-replace-continue-with-controlflow.patch
--- 
squeekboard-1.22.0/debian/patches/0006-replace-continue-with-controlflow.patch  
    1970-01-01 00:00:00.000000000 +0000
+++ 
squeekboard-1.22.0/debian/patches/0006-replace-continue-with-controlflow.patch  
    2023-10-05 19:31:30.000000000 +0000
@@ -0,0 +1,47 @@
+Index: squeekboard-1.22.0/src/popover.rs
+===================================================================
+--- squeekboard-1.22.0.orig/src/popover.rs
++++ squeekboard-1.22.0/src/popover.rs
+@@ -376,6 +376,6 @@ pub fn show(
+     menu.bind_model(Some(&model), Some("popup"));
+     glib::idle_add_local(move || {
+         menu.popup();
+-        Continue(false)
++        glib::ControlFlow::Break
+     });
+ }
+Index: squeekboard-1.22.0/src/main.rs
+===================================================================
+--- squeekboard-1.22.0.orig/src/main.rs
++++ squeekboard-1.22.0/src/main.rs
+@@ -10,7 +10,7 @@ use crate::data::loading;
+ use crate::event_loop;
+ use crate::panel;
+ use crate::state;
+-use glib::{Continue, MainContext, PRIORITY_DEFAULT, Receiver};
++use glib::{ControlFlow, MainContext, PRIORITY_DEFAULT, Receiver};
+ 
+ 
+ mod c {
+@@ -163,7 +163,7 @@ mod c {
+                     hint_manager,
+                     dbus_handler,
+                 );
+-                Continue(true)
++                ControlFlow::Continue
+             },
+         );
+         #[cfg(not(feature = "glib_v0_14"))]
+Index: squeekboard-1.22.0/src/panel.rs
+===================================================================
+--- squeekboard-1.22.0.orig/src/panel.rs
++++ squeekboard-1.22.0/src/panel.rs
+@@ -66,7 +66,7 @@ pub mod c {
+         glib::idle_add_local(move || {
+             let panel = panel.clone_ref();
+             panel.borrow_mut().set_configured(Size{width, height});
+-            glib::Continue(false)
++            glib::ControlFlow::Break
+         });
+     }
+ }
diff -Nru 
squeekboard-1.22.0/debian/patches/0007-priority-constants-glib-rs-0.18.patch 
squeekboard-1.22.0/debian/patches/0007-priority-constants-glib-rs-0.18.patch
--- 
squeekboard-1.22.0/debian/patches/0007-priority-constants-glib-rs-0.18.patch    
    1970-01-01 00:00:00.000000000 +0000
+++ 
squeekboard-1.22.0/debian/patches/0007-priority-constants-glib-rs-0.18.patch    
    2023-10-05 19:31:30.000000000 +0000
@@ -0,0 +1,22 @@
+Index: squeekboard-1.22.0/src/main.rs
+===================================================================
+--- squeekboard-1.22.0.orig/src/main.rs
++++ squeekboard-1.22.0/src/main.rs
+@@ -10,7 +10,7 @@ use crate::data::loading;
+ use crate::event_loop;
+ use crate::panel;
+ use crate::state;
+-use glib::{ControlFlow, MainContext, PRIORITY_DEFAULT, Receiver};
++use glib::{ControlFlow, MainContext, Priority, Receiver};
+ 
+ 
+ mod c {
+@@ -103,7 +103,7 @@ mod c {
+     pub extern "C"
+     fn squeek_init() -> RsObjects {
+         // Set up channels
+-        let (sender, receiver) = MainContext::channel(PRIORITY_DEFAULT);
++        let (sender, receiver) = MainContext::channel(Priority::default());
+         let now = Instant::now();
+         let state_manager = driver::Threaded::new(sender, 
state::Application::new(now));
+ 
diff -Nru squeekboard-1.22.0/debian/patches/series 
squeekboard-1.22.0/debian/patches/series
--- squeekboard-1.22.0/debian/patches/series    2023-08-23 08:47:31.000000000 
+0000
+++ squeekboard-1.22.0/debian/patches/series    2023-10-05 19:31:30.000000000 
+0000
@@ -1,4 +1,7 @@
-0001-Cargo.deps.newer-update-for-gtk-rs-0.17.patch
+0001-Cargo.deps.newer-update-for-gtk-rs-0.18.patch
 0002-src-popover-fix-build-with-newer-gtk-rs.patch
 0003-src-style-fix-build-with-newer-gtk-rs.patch
 0004-Cargo.-use-xkbcommon-v0.5.patch
+0005-src-popover-gtk-rs-0.18.patch
+0006-replace-continue-with-controlflow.patch
+0007-priority-constants-glib-rs-0.18.patch

Reply via email to