aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichał Polański <michal@polanski.me>2021-02-18 04:26:17 +0100
committerLeo <thinkabit.ukim@gmail.com>2021-02-18 13:13:07 +0000
commite0f624e64108dbfbde2b304fc704913eb82e7921 (patch)
tree3634aa8d7474f103d45584958cd5c555c94a8cda
parent6ca0081b26ccd612dca172a127a019d40e157ed7 (diff)
downloadaports-e0f624e64108dbfbde2b304fc704913eb82e7921.tar.gz
aports-e0f624e64108dbfbde2b304fc704913eb82e7921.tar.bz2
aports-e0f624e64108dbfbde2b304fc704913eb82e7921.tar.xz
community/wdisplays: fix segfault
-rw-r--r--community/wdisplays/APKBUILD13
-rw-r--r--community/wdisplays/use-correct-versions-when-binding-globals.patch48
2 files changed, 56 insertions, 5 deletions
diff --git a/community/wdisplays/APKBUILD b/community/wdisplays/APKBUILD
index 790fffa657..4ffabf1bb2 100644
--- a/community/wdisplays/APKBUILD
+++ b/community/wdisplays/APKBUILD
@@ -2,14 +2,16 @@
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=wdisplays
pkgver=1.0
-pkgrel=1
+pkgrel=2
pkgdesc="GUI display configurator for wlroots compositors"
url="https://cyclopsian.github.io/wdisplays/"
-options="!check" # no test suite
-arch="all"
license="GPL-3.0-or-later"
+arch="all"
+options="!check" # no test suite
makedepends="meson wayland-dev libepoxy gtk+3.0-dev"
-source="$pkgname-$pkgver.tar.gz::https://github.com/cyclopsian/wdisplays/archive/$pkgver.tar.gz"
+source="https://github.com/cyclopsian/wdisplays/archive/$pkgver/wdisplays-$pkgver.tar.gz
+ use-correct-versions-when-binding-globals.patch
+ "
build() {
abuild-meson . build
@@ -20,4 +22,5 @@ package() {
DESTDIR="$pkgdir" meson install --no-rebuild -C build
}
-sha512sums="876e883747331cf67d351b7afec963d6d52b6fa3870a57ed147acf898a662fb41407b3e835acc167d32de969d4001dbe8429340849ad09a7f7b8bfdabee61e3e wdisplays-1.0.tar.gz"
+sha512sums="876e883747331cf67d351b7afec963d6d52b6fa3870a57ed147acf898a662fb41407b3e835acc167d32de969d4001dbe8429340849ad09a7f7b8bfdabee61e3e wdisplays-1.0.tar.gz
+078b73425dc8a90ec9d00eb64226a8fa7f7753470179e094c668171ae3dd5d7e99b2f2b11c7828de3141705ef2445a69c0b544f4648a39ddd66e02dd0d2077f3 use-correct-versions-when-binding-globals.patch"
diff --git a/community/wdisplays/use-correct-versions-when-binding-globals.patch b/community/wdisplays/use-correct-versions-when-binding-globals.patch
new file mode 100644
index 0000000000..200acd899d
--- /dev/null
+++ b/community/wdisplays/use-correct-versions-when-binding-globals.patch
@@ -0,0 +1,48 @@
+From 5198a9c94b40ff157c284df413be5402f1b75118 Mon Sep 17 00:00:00 2001
+From: Simon Ser <contact@emersion.fr>
+Date: Wed, 8 Jul 2020 11:57:35 +0200
+Subject: [PATCH] Use correct versions when binding globals
+
+Changes to protocols aren't forward-compatible. It's not possible to use
+version n+1 when a client has been designed to work with version n. For
+instance in wlr-screencopy v5 a new event has been added. Binding to
+version 5 without upgrading the client leads to libwayland errors
+because libwayland doesn't know how to handle the event.
+
+The client needs to maintain its own version requirements.
+
+Closes: https://github.com/cyclopsian/wdisplays/issues/18
+---
+ src/outputs.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/src/outputs.c b/src/outputs.c
+index 9ebf7e5..a5007e8 100644
+--- a/src/outputs.c
++++ b/src/outputs.c
+@@ -534,20 +534,20 @@ static void registry_handle_global(void *data, struct wl_registry *registry,
+
+ if (strcmp(interface, zwlr_output_manager_v1_interface.name) == 0) {
+ state->output_manager = wl_registry_bind(registry, name,
+- &zwlr_output_manager_v1_interface, version);
++ &zwlr_output_manager_v1_interface, 1);
+ zwlr_output_manager_v1_add_listener(state->output_manager,
+ &output_manager_listener, state);
+ } else if (strcmp(interface, zxdg_output_manager_v1_interface.name) == 0) {
+ state->xdg_output_manager = wl_registry_bind(registry, name,
+- &zxdg_output_manager_v1_interface, version);
++ &zxdg_output_manager_v1_interface, 2);
+ } else if(strcmp(interface, zwlr_screencopy_manager_v1_interface.name) == 0) {
+ state->copy_manager = wl_registry_bind(registry, name,
+- &zwlr_screencopy_manager_v1_interface, version);
++ &zwlr_screencopy_manager_v1_interface, 1);
+ } else if(strcmp(interface, zwlr_layer_shell_v1_interface.name) == 0) {
+ state->layer_shell = wl_registry_bind(registry, name,
+- &zwlr_layer_shell_v1_interface, version);
++ &zwlr_layer_shell_v1_interface, 1);
+ } else if(strcmp(interface, wl_shm_interface.name) == 0) {
+- state->shm = wl_registry_bind(registry, name, &wl_shm_interface, version);
++ state->shm = wl_registry_bind(registry, name, &wl_shm_interface, 1);
+ }
+ }
+