Merge branch 'trixie' into 'main'

Build against a bit newer dependencies

See merge request World/Phosh/squeekboard!620
This commit is contained in:
Marge Bot
2024-03-10 16:08:52 +00:00
14 changed files with 778 additions and 1506 deletions

View File

@ -1,4 +1,4 @@
image: debian:bookworm
image: debian:trixie
variables:
DEBIAN_FRONTEND: noninteractive
@ -27,7 +27,6 @@ before_script:
- apt-get -y install ca-certificates
build_docs:
image: debian:trixie
stage: build
artifacts:
paths:
@ -54,7 +53,6 @@ build_meson:
- $PKG_ONLY == "1"
build_deb:
image: debian:bookworm
tags:
- aarch64
stage: build
@ -84,7 +82,7 @@ build_reference:
script:
- apt-get -y install cargo
- cd _build
- ../cargo.sh doc --no-deps --document-private-items
- ../cargo.sh doc --no-deps --document-private-items --features 'glib_v0_14,zbus_v1_5,clap_v4'
except:
variables:
- $PKG_ONLY == "1"

View File

@ -1,36 +1,39 @@
# Dependencies which change based on build flags
bitflags = "1.2.*"
clap = { version = "2.33.*", default-features = false }
zbus = "1.0.*"
zvariant = "2.0.*"
# Dependencies and tools which change based on build flags
# For the newer-than-Byzantium config
bitflags = "1.3.*"
clap = { version = "4.4.*", features=["std"], default-features = false }
zbus = "1.9.*"
zvariant = "2.10.*"
# Newer versions seem to confuse the version of Cargo on Debian Bullseye
zvariant_derive = "2.0.*"
zvariant_derive = "2.10.*"
xkbcommon = { version = "0.5.*", features = ["wayland"] }
[dependencies.cairo-rs]
version = "0.7.*"
version = "0.18.*"
[dependencies.cairo-sys-rs]
version = "0.9"
version = "0.18.*"
[dependencies.gdk]
version = "0.11.*"
version = "0.18.*"
[dependencies.gio]
version = "0.7.*"
features = ["v2_44"]
version = "0.18.*"
features = ["v2_58"]
[dependencies.glib]
version = "0.8.*"
features = ["v2_44"]
version = "0.18.*"
features = ["v2_58"]
[dependencies.glib-sys]
version = "*"
features = ["v2_44"]
version = "0.18.*"
features = ["v2_58"]
[dependencies.gtk]
version = "0.7.*"
features = ["v3_22"]
version = "0.18.*"
features = ["v3_24"]
[dependencies.gtk-sys]
version = "0.9"
features = ["v3_22"]
version = "0.18.*"
features = ["v3_24"]

View File

@ -1,38 +0,0 @@
# Dependencies and tools which change based on build flags
# For the newer-than-Byzantium config
bitflags = "1.3.*"
clap = { version = "4.*", features=["std"], default-features = false }
zbus = "1.9.*"
zvariant = "2.10.*"
# Newer versions seem to confuse the version of Cargo on Debian Bullseye
zvariant_derive = "2.10.*"
[dependencies.cairo-rs]
version = "0.14.*"
[dependencies.cairo-sys-rs]
version = "0.14.*"
[dependencies.gdk]
version = "0.14.*"
[dependencies.gio]
version = "0.14.*"
features = ["v2_58"]
[dependencies.glib]
version = "0.14.*"
features = ["v2_58"]
[dependencies.glib-sys]
version = "0.14.*"
features = ["v2_58"]
[dependencies.gtk]
version = "0.14.*"
features = ["v3_22"]
[dependencies.gtk-sys]
version = "0.14.*"
features = ["v3_22"]

875
Cargo.lock generated

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -31,5 +31,4 @@ clap_v4 = []
maplit = "1.0.*"
serde = { version = "1.0.*", features = ["derive"] }
serde_yaml = "0.8.*"
xkbcommon = { version = "0.4.*", features = ["wayland"] }
# Here is inserted the Cargo.deps file

24
debian/control vendored
View File

@ -9,22 +9,26 @@ Build-Depends:
ninja-build,
pkg-config,
libbsd-dev,
libfeedback-dev,
libglib2.0-dev,
libgnome-desktop-3-dev,
libgtk-3-dev,
libfeedback-dev,
librust-bitflags-dev (>= 1.0),
librust-clap-dev (>= 2.32),
librust-gio+v2-58-dev,
librust-glib+v2-58-dev,
librust-glib-sys-dev,
librust-gtk+v3-22-dev (>= 0.5),
librust-gtk-sys-dev,
librust-aho-corasick-dev,
librust-bitflags-1-dev (>= 1.0),
librust-clap-4+std-dev (>= 4.0),
librust-gio+v2-58-dev (>= 0.18),
librust-glib+v2-58-dev (>= 0.18),
librust-glib-sys-dev (>= 0.18),
librust-gtk+v3-24-dev (>= 0.18),
librust-gtk-sys-dev (>= 0.18),
librust-maplit-1-dev (>= 1.0),
librust-serde-derive-1-dev (>= 1.0),
librust-serde-yaml-0.8-dev (>= 0.8),
librust-xkbcommon-0.4+wayland-dev (>= 0.4),
librust-zbus-dev (>= 1.9),
librust-thread-local-dev,
librust-xkbcommon-dev (>= 0.5),
librust-zbus-1-dev (>= 1.9),
librust-zvariant-2-dev (>= 2.10),
librust-zvariant-derive-2-dev (>= 2.10),
libwayland-dev (>= 1.16),
lsb-release,
python3,

10
debian/rules vendored
View File

@ -24,20 +24,12 @@ endif
export RUSTFLAGS = --remap-path-prefix=$(CURDIR)=/remap-pwd $(xgot)
distrel := $(shell lsb_release --codename --short)
ifneq (,$(filter $(distrel),bookworm))
newer = true
else
newer = false
endif
%:
dh $@ --builddirectory=_build --buildsystem=meson
# The Debian version of linked-hash-map doesn't provide any hash,
# causing Cargo to refuse to build with a crates.io copy
override_dh_auto_configure:
[ ! -f Cargo.lock ] || rm Cargo.lock
dh_auto_configure -- -Dnewer=$(newer) -Donline=false
dh_auto_configure -- -Donline=false
override_dh_autoreconf:

View File

@ -98,19 +98,12 @@ cargo_toml_base = configure_file(
cargo_patch = []
if get_option('newer') == true
cargo_build_flags += ['--features', 'glib_v0_14,zbus_v1_5,clap_v4']
cargo_deps = files('Cargo.deps.newer')
cargo_lock = files('Cargo.lock.newer')
else
cargo_deps = files('Cargo.deps')
cargo_lock = []
if get_option('online') == true
cargo_build_flags += ['--features', 'glib_v0_14,zbus_v1_5,clap_v4']
cargo_deps = files('Cargo.deps')
cargo_lock = files('Cargo.lock')
if get_option('online') == true
cargo_patch = [files('Cargo.deps.online')]
if get_option('reset_lock') == true
cargo_lock = files('Cargo.lock')
endif
endif
endif
cat = find_program('cat')

View File

@ -11,13 +11,9 @@ option('find_orphans',
type: 'boolean', value: false,
description: 'Check if all present layout files are included in resources.')
option('newer',
type: 'boolean', value: false,
description: 'Build with dependencies newer than those of Byzantium')
option('online',
type: 'boolean', value: true,
description: 'Pull packages from the internet while building, as opposed to a local regstry.')
description: 'Pull packages from the internet while building, as opposed to a local registry.')
option('reset_lock',
type: 'boolean', value: false,

View File

@ -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, 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));
@ -163,7 +163,7 @@ mod c {
hint_manager,
dbus_handler,
);
Continue(true)
ControlFlow::Continue
},
);
#[cfg(not(feature = "glib_v0_14"))]

View File

@ -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
});
}
}

View File

@ -305,12 +305,12 @@ pub fn show(
#[cfg(not(feature = "glib_v0_14"))]
let menu = gtk::Popover::new_from_model(Some(&window), &model);
menu.set_pointing_to(&gtk::Rectangle {
x: position.x.ceil() as i32,
y: position.y.ceil() as i32,
width: position.width.floor() as i32,
height: position.width.floor() as i32,
});
menu.set_pointing_to(&gtk::Rectangle::new (
position.x.ceil() as i32,
position.y.ceil() as i32,
position.width.floor() as i32,
position.width.floor() as i32,
));
menu.set_constrain_to(gtk::PopoverConstraint::None);
let action_group = gio::SimpleActionGroup::new();
@ -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
});
}

View File

@ -99,7 +99,12 @@ fn get_theme_name(settings: &gtk::Settings) -> GtkTheme {
}).ok();
#[cfg(feature = "glib_v0_14")]
let prop = |s: &gtk::Settings, name| s.property(name);
let prop = |s: &gtk::Settings, name| {
if s.has_property(name, None) {
return Ok(s.property_value(name));
}
return Err("Key not found in settings");
};
#[cfg(not(feature = "glib_v0_14"))]
let prop = |s: &gtk::Settings, name| s.get_property(name);