diff options
author | Jan Beich <jbeich@FreeBSD.org> | 2025-06-24 07:33:30 +0200 |
---|---|---|
committer | Jan Beich <jbeich@FreeBSD.org> | 2025-06-24 09:54:08 +0200 |
commit | a71b22f2c43b53f98ce957f4fedc5fc23baa87dc (patch) | |
tree | 532bef98b630951b7d46f78a0eaf95b4a78b66b3 | |
parent | x11-toolkits/scenefx04: add new port (diff) |
x11-wm/swayfx: update to 0.5.2
Changes: https://github.com/WillPower3309/swayfx/releases/tag/0.5.2
Reported by: GitHub (watch releases)
-rw-r--r-- | x11-wm/swayfx/Makefile | 11 | ||||
-rw-r--r-- | x11-wm/swayfx/distinfo | 6 | ||||
-rw-r--r-- | x11-wm/swayfx/files/patch-common_stringop.c | 53 |
3 files changed, 64 insertions, 6 deletions
diff --git a/x11-wm/swayfx/Makefile b/x11-wm/swayfx/Makefile index 4b1152132f20..3905e9713045 100644 --- a/x11-wm/swayfx/Makefile +++ b/x11-wm/swayfx/Makefile @@ -1,5 +1,5 @@ PORTNAME= sway -DISTVERSION= 0.5.1 +DISTVERSION= 0.5.2 CATEGORIES= x11-wm wayland PKGNAMESUFFIX= ${GH_PROJECT:S/${PORTNAME}//} @@ -18,8 +18,8 @@ LIB_DEPENDS= libjson-c.so:devel/json-c \ libpcre2-8.so:devel/pcre2 \ libdrm.so:graphics/libdrm \ libwayland-egl.so:graphics/wayland \ - libscenefx-0.3.so:x11-toolkits/scenefx03 \ - libwlroots-0.18.so:x11-toolkits/wlroots018 \ + libscenefx-0.4.so:x11-toolkits/scenefx04 \ + libwlroots-0.19.so:x11-toolkits/wlroots019 \ libinput.so:x11/libinput \ libxkbcommon.so:x11/libxkbcommon @@ -61,5 +61,10 @@ post-patch: @${REINPLACE_CMD} -i .nogit -e 's/git.found()/false/' \ -e '/project_version/s/@0@/${DISTVERSIONFULL}/' \ ${WRKSRC}/meson.build +.if exists(${.CURDIR}/files/patch-common_stringop.c) +# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275328 + @${REINPLACE_CMD} -e 's/_POSIX_C_SOURCE=200809L/_XOPEN_SOURCE=700/' \ + ${WRKSRC}/meson.build +.endif .include <bsd.port.mk> diff --git a/x11-wm/swayfx/distinfo b/x11-wm/swayfx/distinfo index 77c1f7511e03..f6ff68ffc12d 100644 --- a/x11-wm/swayfx/distinfo +++ b/x11-wm/swayfx/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1749449281 -SHA256 (WillPower3309-swayfx-0.5.1_GH0.tar.gz) = 99b6f4243c2a89d3ad0d78fa56d262ee92bdbd9965117d08bca2fed909586943 -SIZE (WillPower3309-swayfx-0.5.1_GH0.tar.gz) = 17595318 +TIMESTAMP = 1750743210 +SHA256 (WillPower3309-swayfx-0.5.2_GH0.tar.gz) = 075e1a9577f96a71154c61997355dce569816fff05a2c535ec15b252a9acbbe1 +SIZE (WillPower3309-swayfx-0.5.2_GH0.tar.gz) = 17597449 diff --git a/x11-wm/swayfx/files/patch-common_stringop.c b/x11-wm/swayfx/files/patch-common_stringop.c new file mode 100644 index 000000000000..5a9f187e11df --- /dev/null +++ b/x11-wm/swayfx/files/patch-common_stringop.c @@ -0,0 +1,53 @@ +https://github.com/swaywm/sway/issues/8673#issuecomment-2818260191 + +--- common/stringop.c.orig 2025-04-20 11:31:10 UTC ++++ common/stringop.c +@@ -6,6 +6,8 @@ + #include <string.h> + #include <strings.h> + #include <wordexp.h> ++#include <signal.h> ++#include <sys/wait.h> + #include "list.h" + #include "log.h" + #include "stringop.h" +@@ -318,11 +320,34 @@ bool expand_path(char **path) { + char *ptr = strstr(*path, " ") + 1; + memmove(ptr + 1, ptr, strlen(ptr) + 1); + *ptr = '\\'; +- } +- if (wordexp(*path, &p, 0) != 0 || p.we_wordv[0] == NULL) { +- wordfree(&p); +- return false; +- } ++ } ++ ++ // FreeBSD wordexp bug workaround: ++ // 1. Reset SIGCHLD handler ++ // 2. Run wordexp ++ // 3. Restore SIGCHLD handler and reap any processes that exited ++ struct sigaction prev_action; ++ struct sigaction new_action = { ++ .sa_flags = SA_RESETHAND, ++ }; ++ if (sigaction(SIGCHLD, &new_action, &prev_action) != 0) { ++ sway_log(SWAY_ERROR, "Restoring sigchild before wordexp failed"); ++ return false; ++ } ++ ++ int res = wordexp(*path, &p, 0); ++ ++ if (sigaction(SIGCHLD, &prev_action, NULL) != 0) { ++ sway_log(SWAY_ERROR, "Restoring sigchild after wordexp failed"); ++ } ++ ++ int status; ++ while (waitpid(-1, &status, WNOHANG) != -1 || errno == EINTR); ++ ++ if (res != 0 || p.we_wordv[0] == NULL) { ++ wordfree(&p); ++ return false; ++ } + free(*path); + *path = join_args(p.we_wordv, p.we_wordc); + wordfree(&p); |