summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2025-09-15 13:23:52 +0200
committerJan Beich <jbeich@FreeBSD.org>2025-09-15 13:48:31 +0200
commitfcab17cb653d35013194f69e9c97e906eb53a1ef (patch)
tree6627d001677753fe0a923e2c4f85f69e3a3b8971
parentx11-wm/sway: revert 2 recent commits to redo with swayfx (diff)
x11-wm/sway: unbreak config reload after bb43067a6928
Obtained from: upstream
-rw-r--r--x11-wm/sway/Makefile1
-rw-r--r--x11-wm/sway/files/extra-patch-wordexp8
-rw-r--r--x11-wm/swayfx/Makefile1
-rw-r--r--x11-wm/swayfx/files/extra-patch-wordexp8
4 files changed, 14 insertions, 4 deletions
diff --git a/x11-wm/sway/Makefile b/x11-wm/sway/Makefile
index caf623eafae1..120ae0e8cd0a 100644
--- a/x11-wm/sway/Makefile
+++ b/x11-wm/sway/Makefile
@@ -1,5 +1,6 @@
PORTNAME= sway
DISTVERSION= 1.11
+PORTREVISION= 1
CATEGORIES= x11-wm wayland
MAINTAINER= jbeich@FreeBSD.org
diff --git a/x11-wm/sway/files/extra-patch-wordexp b/x11-wm/sway/files/extra-patch-wordexp
index 5a9f187e11df..1209fefbe87e 100644
--- a/x11-wm/sway/files/extra-patch-wordexp
+++ b/x11-wm/sway/files/extra-patch-wordexp
@@ -1,4 +1,5 @@
https://github.com/swaywm/sway/issues/8673#issuecomment-2818260191
+https://github.com/swaywm/sway/issues/8828#issuecomment-3290045852
--- common/stringop.c.orig 2025-04-20 11:31:10 UTC
+++ common/stringop.c
@@ -11,7 +12,7 @@ https://github.com/swaywm/sway/issues/8673#issuecomment-2818260191
#include "list.h"
#include "log.h"
#include "stringop.h"
-@@ -318,11 +320,34 @@ bool expand_path(char **path) {
+@@ -318,11 +320,37 @@ bool expand_path(char **path) {
char *ptr = strstr(*path, " ") + 1;
memmove(ptr + 1, ptr, strlen(ptr) + 1);
*ptr = '\\';
@@ -42,7 +43,10 @@ https://github.com/swaywm/sway/issues/8673#issuecomment-2818260191
+ }
+
+ int status;
-+ while (waitpid(-1, &status, WNOHANG) != -1 || errno == EINTR);
++ int wres;
++ do {
++ wres = waitpid(-1, &status, WNOHANG);
++ } while (wres > 0 || (wres == -1 && errno == EINTR));
+
+ if (res != 0 || p.we_wordv[0] == NULL) {
+ wordfree(&p);
diff --git a/x11-wm/swayfx/Makefile b/x11-wm/swayfx/Makefile
index f53808ea6c88..8e4890d5cdef 100644
--- a/x11-wm/swayfx/Makefile
+++ b/x11-wm/swayfx/Makefile
@@ -1,5 +1,6 @@
PORTNAME= sway
DISTVERSION= 0.5.3
+PORTREVISION= 1
CATEGORIES= x11-wm wayland
PKGNAMESUFFIX= ${GH_PROJECT:S/${PORTNAME}//}
diff --git a/x11-wm/swayfx/files/extra-patch-wordexp b/x11-wm/swayfx/files/extra-patch-wordexp
index 5a9f187e11df..1209fefbe87e 100644
--- a/x11-wm/swayfx/files/extra-patch-wordexp
+++ b/x11-wm/swayfx/files/extra-patch-wordexp
@@ -1,4 +1,5 @@
https://github.com/swaywm/sway/issues/8673#issuecomment-2818260191
+https://github.com/swaywm/sway/issues/8828#issuecomment-3290045852
--- common/stringop.c.orig 2025-04-20 11:31:10 UTC
+++ common/stringop.c
@@ -11,7 +12,7 @@ https://github.com/swaywm/sway/issues/8673#issuecomment-2818260191
#include "list.h"
#include "log.h"
#include "stringop.h"
-@@ -318,11 +320,34 @@ bool expand_path(char **path) {
+@@ -318,11 +320,37 @@ bool expand_path(char **path) {
char *ptr = strstr(*path, " ") + 1;
memmove(ptr + 1, ptr, strlen(ptr) + 1);
*ptr = '\\';
@@ -42,7 +43,10 @@ https://github.com/swaywm/sway/issues/8673#issuecomment-2818260191
+ }
+
+ int status;
-+ while (waitpid(-1, &status, WNOHANG) != -1 || errno == EINTR);
++ int wres;
++ do {
++ wres = waitpid(-1, &status, WNOHANG);
++ } while (wres > 0 || (wres == -1 && errno == EINTR));
+
+ if (res != 0 || p.we_wordv[0] == NULL) {
+ wordfree(&p);