git: cf92c5f18543 - main - x11-wm/xfce4-session: Replace bash only syntax

From: Guido Falsi <madpilot_at_FreeBSD.org>
Date: Wed, 26 Mar 2025 14:47:39 UTC
The branch main has been updated by madpilot:

URL: https://cgit.FreeBSD.org/ports/commit/?id=cf92c5f18543a3758cf67940036289471aa3bb08

commit cf92c5f18543a3758cf67940036289471aa3bb08
Author:     Guido Falsi <madpilot@FreeBSD.org>
AuthorDate: 2025-03-26 14:44:12 +0000
Commit:     Guido Falsi <madpilot@FreeBSD.org>
CommitDate: 2025-03-26 14:44:12 +0000

    x11-wm/xfce4-session: Replace bash only syntax
    
    Patch, suggested by tijl, sent upstream:
    
    https://gitlab.xfce.org/xfce/xfce4-session/-/merge_requests/79
    
    PR:             285670
    Reported by:    tijl (via email),
                    Thomas Mueller <thmu7@freenet.de>
---
 x11-wm/xfce4-session/Makefile                    |  1 +
 x11-wm/xfce4-session/files/patch-scripts_xflock4 | 17 +++++++++++++++++
 2 files changed, 18 insertions(+)

diff --git a/x11-wm/xfce4-session/Makefile b/x11-wm/xfce4-session/Makefile
index 371f6cfdddfe..fc0a959e7ac3 100644
--- a/x11-wm/xfce4-session/Makefile
+++ b/x11-wm/xfce4-session/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	xfce4-session
 PORTVERSION=	4.20.2
+PORTREVISION=	1
 CATEGORIES=	x11-wm xfce
 MASTER_SITES=	XFCE
 DIST_SUBDIR=	xfce4
diff --git a/x11-wm/xfce4-session/files/patch-scripts_xflock4 b/x11-wm/xfce4-session/files/patch-scripts_xflock4
new file mode 100644
index 000000000000..44b8684a3d8a
--- /dev/null
+++ b/x11-wm/xfce4-session/files/patch-scripts_xflock4
@@ -0,0 +1,17 @@
+--- scripts/xflock4.orig	2025-03-21 09:25:42 UTC
++++ scripts/xflock4
+@@ -47,12 +47,12 @@ esac
+ [ -t 0 ] && sleep 1
+ 
+ # echo is used to strip blanks
+-# $((2**31 - 1)) is MAXINT, which disables timeout: see
++# $(((1<<31)-1)) is MAXINT, which disables timeout: see
+ # https://dbus.freedesktop.org/doc/api/html/group__DBusPendingCall.html
+ ret=$(echo $(dbus-send --session \
+                        --dest=org.xfce.SessionManager \
+                        --print-reply=literal \
+-                       --reply-timeout=$((2**31 - 1)) \
++                       --reply-timeout=$(((1<<31)-1)) \
+                        --type=method_call \
+                        /org/xfce/SessionManager \
+                        org.xfce.Session.Manager.Lock))