Github messages for voidlinux
 help / color / mirror / Atom feed
From: Bnyro <Bnyro@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] wl-clipboard: fix wayfire compatibility
Date: Mon, 21 Aug 2023 10:18:33 +0200	[thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-45699@inbox.vuxu.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 488 bytes --]

There is a new pull request by Bnyro against master on the void-packages repository

https://github.com/Bnyro/void-packages wl-clipboard
https://github.com/void-linux/void-packages/pull/45699

wl-clipboard: fix wayfire compatibility

#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, x86_64-glibc



A patch file from https://github.com/void-linux/void-packages/pull/45699.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-wl-clipboard-45699.patch --]
[-- Type: text/x-diff, Size: 4009 bytes --]

From 89dc284c09e0b136128a082c65f50198a9f304a3 Mon Sep 17 00:00:00 2001
From: Bnyro <bnyro@tutanota.com>
Date: Mon, 21 Aug 2023 10:19:18 +0200
Subject: [PATCH] wl-clipboard: fix wayfire compatibility

---
 .../patches/0-fix-wayfire-compatibility.patch | 36 +++++++++++++++++++
 ...1-fix-wayfire-compatibility-followup.patch | 34 ++++++++++++++++++
 srcpkgs/wl-clipboard/template                 |  2 +-
 3 files changed, 71 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/wl-clipboard/patches/0-fix-wayfire-compatibility.patch
 create mode 100644 srcpkgs/wl-clipboard/patches/1-fix-wayfire-compatibility-followup.patch

diff --git a/srcpkgs/wl-clipboard/patches/0-fix-wayfire-compatibility.patch b/srcpkgs/wl-clipboard/patches/0-fix-wayfire-compatibility.patch
new file mode 100644
index 0000000000000..b7f935269d2a1
--- /dev/null
+++ b/srcpkgs/wl-clipboard/patches/0-fix-wayfire-compatibility.patch
@@ -0,0 +1,36 @@
+From fcde402ed711dc24883e207f5665fbb22eba6e4d Mon Sep 17 00:00:00 2001
+From: anteater <65555601+nt8r@users.noreply.github.com>
+Date: Mon, 14 Aug 2023 18:05:06 +0000
+Subject: [PATCH] Do not abort when interfaces are older than expected
+
+Instead, let consumers abort if the missing interface is a fatal problem.
+---
+ src/types/registry.c | 14 ++++++++------
+ 1 file changed, 8 insertions(+), 6 deletions(-)
+
+diff --git a/src/types/registry.c b/src/types/registry.c
+index b33c4d1..e1ea2c0 100644
+--- a/src/types/registry.c
++++ b/src/types/registry.c
+@@ -29,12 +29,14 @@
+ 
+ #define BIND(interface_name, known_version) \
+ if (strcmp(interface, #interface_name) == 0) { \
+-    self->interface_name = wl_registry_bind( \
+-        wl_registry, \
+-        name, \
+-        &interface_name ## _interface, \
+-        known_version \
+-    ); \
++    if (version >= known_version) { \
++        self->interface_name = wl_registry_bind( \
++            wl_registry, \
++            name, \
++            &interface_name ## _interface, \
++            known_version \
++        ); \
++    } \
+ }
+ 
+ static void wl_registry_global_handler(
+
diff --git a/srcpkgs/wl-clipboard/patches/1-fix-wayfire-compatibility-followup.patch b/srcpkgs/wl-clipboard/patches/1-fix-wayfire-compatibility-followup.patch
new file mode 100644
index 0000000000000..897730ad35cd5
--- /dev/null
+++ b/srcpkgs/wl-clipboard/patches/1-fix-wayfire-compatibility-followup.patch
@@ -0,0 +1,34 @@
+From 8dbdefb77a7ec9343aa5fd0700dd9a430164ad0a Mon Sep 17 00:00:00 2001
+From: Sergey Bugaev <bugaevc@gmail.com>
+Date: Sun, 20 Aug 2023 13:13:13 +0300
+Subject: [PATCH] Tweak binding interfaces further
+
+- Also check for wl_seat version
+- Fix parenthesizing in a macro
+---
+ src/types/registry.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/types/registry.c b/src/types/registry.c
+index e1ea2c0..1c7ad99 100644
+--- a/src/types/registry.c
++++ b/src/types/registry.c
+@@ -29,7 +29,7 @@
+ 
+ #define BIND(interface_name, known_version) \
+ if (strcmp(interface, #interface_name) == 0) { \
+-    if (version >= known_version) { \
++    if (version >= (known_version)) { \
+         self->interface_name = wl_registry_bind( \
+             wl_registry, \
+             name, \
+@@ -83,7 +83,7 @@ static void wl_registry_global_handler(
+     BIND(zwlr_data_control_manager_v1, version > 2 ? 2 : version)
+ #endif
+ 
+-    if (strcmp(interface, "wl_seat") == 0) {
++    if (strcmp(interface, "wl_seat") == 0 && version >= 2) {
+         struct seat *seat = calloc(1, sizeof(struct seat));
+         seat->proxy = wl_registry_bind(
+             wl_registry,
+
diff --git a/srcpkgs/wl-clipboard/template b/srcpkgs/wl-clipboard/template
index a13310482e8ea..70ed6e6110b07 100644
--- a/srcpkgs/wl-clipboard/template
+++ b/srcpkgs/wl-clipboard/template
@@ -1,7 +1,7 @@
 # Template file for 'wl-clipboard'
 pkgname=wl-clipboard
 version=2.2.0
-revision=1
+revision=2
 build_style=meson
 hostmakedepends="wayland-devel pkg-config"
 makedepends="wayland-protocols wayland-devel"

             reply	other threads:[~2023-08-21  8:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-21  8:18 Bnyro [this message]
2023-08-27 10:18 ` Bnyro
2023-08-28 19:45 ` mhmdanas
2023-08-28 19:50 ` [PR PATCH] [Closed]: " Bnyro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-45699@inbox.vuxu.org \
    --to=bnyro@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).