aboutsummaryrefslogtreecommitdiff
path: root/x11-wm/niri/files
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2024-02-17 03:47:06 +0000
committerJan Beich <jbeich@FreeBSD.org>2024-02-17 07:34:50 +0000
commite181328160a92a664884aea7df8b3f9e98753987 (patch)
tree3ac375c91a746aa4d9c8efc609cae2b6f3699c6a /x11-wm/niri/files
parent725fe2c611c420906f5ab9fe9dda5892ca18c667 (diff)
downloadports-e181328160a92a664884aea7df8b3f9e98753987.tar.gz
ports-e181328160a92a664884aea7df8b3f9e98753987.zip
Diffstat (limited to 'x11-wm/niri/files')
-rw-r--r--x11-wm/niri/files/patch-no-systemd33
-rw-r--r--x11-wm/niri/files/patch-pipewire-i38653
-rw-r--r--x11-wm/niri/files/patch-pipewire_init12
-rw-r--r--x11-wm/niri/files/patch-smithay-i38624
4 files changed, 25 insertions, 97 deletions
diff --git a/x11-wm/niri/files/patch-no-systemd b/x11-wm/niri/files/patch-no-systemd
index 2b4890279d06..da3419e0826d 100644
--- a/x11-wm/niri/files/patch-no-systemd
+++ b/x11-wm/niri/files/patch-no-systemd
@@ -10,9 +10,9 @@ Avoid various systemd dependencies
+Exec=niri
Type=Application
DesktopNames=niri
---- src/main.rs.orig 2023-11-26 12:51:13 UTC
+--- src/main.rs.orig 2024-02-17 03:47:06 UTC
+++ src/main.rs
-@@ -65,7 +65,7 @@ fn main() {
+@@ -37,7 +37,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
REMOVE_ENV_RUST_LIB_BACKTRACE.store(true, Ordering::Relaxed);
}
@@ -21,7 +21,7 @@ Avoid various systemd dependencies
let directives = env::var("RUST_LOG").unwrap_or_else(|_| "niri=debug".to_owned());
let env_filter = EnvFilter::builder().parse_lossy(directives);
-@@ -74,20 +74,6 @@ fn main() {
+@@ -46,20 +46,6 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
.with_env_filter(env_filter)
.init();
@@ -42,9 +42,9 @@ Avoid various systemd dependencies
let cli = Cli::parse();
let _client = tracy_client::Client::start();
-@@ -128,6 +114,11 @@ fn main() {
- socket_name.to_string_lossy()
- );
+@@ -175,6 +161,11 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
+ info!("IPC listening on: {}", ipc.socket_path.to_string_lossy());
+ }
+ // Advise xdg-desktop-portal which *-portals.conf to load
+ env::set_var("XDG_CURRENT_DESKTOP", "niri");
@@ -54,18 +54,23 @@ Avoid various systemd dependencies
if is_systemd_service {
// We're starting as a systemd service. Export our variables.
import_env_to_systemd();
-@@ -180,9 +169,8 @@ fn import_env_to_systemd() {
+@@ -235,14 +226,13 @@ fn import_env_to_systemd() {
+ }
+
+ fn import_env_to_systemd() {
+- let variables = ["WAYLAND_DISPLAY", niri_ipc::SOCKET_PATH_ENV].join(" ");
++ let variables = ["WAYLAND_DISPLAY", "XDG_CURRENT_DESKTOP", niri_ipc::SOCKET_PATH_ENV].join(" ");
+
let rv = Command::new("/bin/sh")
.args([
"-c",
-- "systemctl --user import-environment WAYLAND_DISPLAY && \
-- hash dbus-update-activation-environment 2>/dev/null && \
-- dbus-update-activation-environment WAYLAND_DISPLAY",
-+ "hash dbus-update-activation-environment 2>/dev/null && \
-+ dbus-update-activation-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP",
+ &format!(
+- "systemctl --user import-environment {variables} && \
+- hash dbus-update-activation-environment 2>/dev/null && \
++ "hash dbus-update-activation-environment 2>/dev/null && \
+ dbus-update-activation-environment {variables}"
+ ),
])
- .spawn();
- // Wait for the import process to complete, otherwise services will start too fast without
--- src/niri.rs.orig 2023-11-26 12:51:13 UTC
+++ src/niri.rs
@@ -743,9 +743,9 @@ impl Niri {
diff --git a/x11-wm/niri/files/patch-pipewire-i386 b/x11-wm/niri/files/patch-pipewire-i386
deleted file mode 100644
index 45037451bfc2..000000000000
--- a/x11-wm/niri/files/patch-pipewire-i386
+++ /dev/null
@@ -1,53 +0,0 @@
-https://gitlab.freedesktop.org/pipewire/pipewire-rs/-/commit/ff923ee9dfe0
-
-error[E0308]: mismatched types
- --> cargo-crates/libspa-0.7.2/src/pod/parser.rs:180:75
- |
-180 | let res = spa_sys::spa_pod_parser_get_long(self.as_raw_ptr(), long.as_mut_ptr());
- | -------------------------------- ^^^^^^^^^^^^^^^^^ expected `*mut i64`, found `*mut i32`
- | |
- | arguments to this function are incorrect
- |
- = note: expected raw pointer `*mut i64`
- found raw pointer `*mut i32`
-note: function defined here
- --> cargo-crates/libspa-sys-0.7.2/src/pod/parser.rs:61:12
- |
-61 | pub fn spa_pod_parser_get_long(parser: *mut spa_pod_parser, value: *mut i64) -> c_int;
- | ^^^^^^^^^^^^^^^^^^^^^^^
-
---- cargo-crates/libspa-0.7.2/src/pod/parser.rs.orig 2006-07-24 01:21:28 UTC
-+++ cargo-crates/libspa-0.7.2/src/pod/parser.rs
-@@ -2,7 +2,7 @@ use std::{
- // SPDX-License-Identifier: MIT
-
- use std::{
-- ffi::{c_char, c_double, c_float, c_int, c_long, c_void, CStr},
-+ ffi::{c_char, c_double, c_float, c_void, CStr},
- marker::PhantomData,
- mem::MaybeUninit,
- };
-@@ -162,9 +162,9 @@ impl<'d> Parser<'d> {
- }
- }
-
-- pub fn get_int(&mut self) -> Result<c_int, Errno> {
-+ pub fn get_int(&mut self) -> Result<i32, Errno> {
- unsafe {
-- let mut int: MaybeUninit<c_int> = MaybeUninit::uninit();
-+ let mut int: MaybeUninit<i32> = MaybeUninit::uninit();
- let res = spa_sys::spa_pod_parser_get_int(self.as_raw_ptr(), int.as_mut_ptr());
- if res >= 0 {
- Ok(int.assume_init())
-@@ -174,9 +174,9 @@ impl<'d> Parser<'d> {
- }
- }
-
-- pub fn get_long(&mut self) -> Result<c_long, Errno> {
-+ pub fn get_long(&mut self) -> Result<i64, Errno> {
- unsafe {
-- let mut long: MaybeUninit<c_long> = MaybeUninit::uninit();
-+ let mut long: MaybeUninit<i64> = MaybeUninit::uninit();
- let res = spa_sys::spa_pod_parser_get_long(self.as_raw_ptr(), long.as_mut_ptr());
- if res >= 0 {
- Ok(long.assume_init())
diff --git a/x11-wm/niri/files/patch-pipewire_init b/x11-wm/niri/files/patch-pipewire_init
index cfb035de43d9..1d47584c59d3 100644
--- a/x11-wm/niri/files/patch-pipewire_init
+++ b/x11-wm/niri/files/patch-pipewire_init
@@ -14,8 +14,8 @@ error[E0425]: cannot find function `pw_deinit` in crate `pw_sys`
165 | pw_sys::pw_deinit()
| ^^^^^^^^^ not found in `pw_sys`
---- cargo-crates/pipewire-0.7.2/src/lib.rs.orig 2006-07-24 01:21:28 UTC
-+++ cargo-crates/pipewire-0.7.2/src/lib.rs
+--- cargo-crates/pipewire-0.8.0/src/lib.rs.orig 2006-07-24 01:21:28 UTC
++++ cargo-crates/pipewire-0.8.0/src/lib.rs
@@ -152,7 +152,7 @@ pub fn init() {
pub fn init() {
use once_cell::sync::OnceCell;
@@ -34,8 +34,8 @@ error[E0425]: cannot find function `pw_deinit` in crate `pw_sys`
}
#[cfg(test)]
---- cargo-crates/pipewire-sys-0.7.2/build.rs.orig 2006-07-24 01:21:28 UTC
-+++ cargo-crates/pipewire-sys-0.7.2/build.rs
+--- cargo-crates/pipewire-sys-0.8.0/build.rs.orig 2006-07-24 01:21:28 UTC
++++ cargo-crates/pipewire-sys-0.8.0/build.rs
@@ -19,6 +19,7 @@ fn main() {
// included header files changed.
.parse_callbacks(Box::new(bindgen::CargoCallbacks))
@@ -44,8 +44,8 @@ error[E0425]: cannot find function `pw_deinit` in crate `pw_sys`
.allowlist_function("pw_.*")
.allowlist_type("pw_.*")
.allowlist_var("pw_.*")
---- cargo-crates/pipewire-sys-0.7.2/src/lib.rs.orig 2006-07-24 01:21:28 UTC
-+++ cargo-crates/pipewire-sys-0.7.2/src/lib.rs
+--- cargo-crates/pipewire-sys-0.8.0/src/lib.rs.orig 2006-07-24 01:21:28 UTC
++++ cargo-crates/pipewire-sys-0.8.0/src/lib.rs
@@ -20,8 +20,8 @@ mod tests {
#[test]
fn init() {
diff --git a/x11-wm/niri/files/patch-smithay-i386 b/x11-wm/niri/files/patch-smithay-i386
deleted file mode 100644
index 5bfa5ef82cb5..000000000000
--- a/x11-wm/niri/files/patch-smithay-i386
+++ /dev/null
@@ -1,24 +0,0 @@
-https://github.com/Smithay/smithay/pull/1316
-
---- ../smithay-0eac415ba2d9409cbc201955dc0fd306c116ae05/src/utils/clock.rs.orig 2024-02-02 09:18:10 UTC
-+++ ../smithay-0eac415ba2d9409cbc201955dc0fd306c116ae05/src/utils/clock.rs
-@@ -119,8 +119,8 @@ impl<Kind> Ord for Time<Kind> {
- impl<Kind: NonNegativeClockSource> From<Duration> for Time<Kind> {
- fn from(tp: Duration) -> Self {
- let tp = Timespec {
-- tv_sec: tp.as_secs() as std::os::raw::c_longlong,
-- tv_nsec: tp.subsec_nanos() as std::os::raw::c_longlong,
-+ tv_sec: tp.as_secs() as rustix::time::Secs,
-+ tv_nsec: tp.subsec_nanos() as rustix::time::Nsecs,
- };
- Time {
- tp,
-@@ -138,7 +138,7 @@ impl<Kind> From<Timespec> for Time<Kind> {
- }
- }
-
--const NANOS_PER_SEC: std::os::raw::c_longlong = 1_000_000_000;
-+const NANOS_PER_SEC: rustix::time::Nsecs = 1_000_000_000;
-
- fn saturating_sub_timespec(lhs: Timespec, rhs: Timespec) -> Option<Duration> {
- if let Some(mut secs) = lhs.tv_sec.checked_sub(rhs.tv_sec) {