diff options
| -rw-r--r-- | x11/Makefile | 1 | ||||
| -rw-r--r-- | x11/wayland-logout/Makefile | 23 | ||||
| -rw-r--r-- | x11/wayland-logout/distinfo | 3 | ||||
| -rw-r--r-- | x11/wayland-logout/files/patch-wayland-logout.sh | 21 | ||||
| -rw-r--r-- | x11/wayland-logout/pkg-descr | 6 |
5 files changed, 54 insertions, 0 deletions
diff --git a/x11/Makefile b/x11/Makefile index 607479dc1a82..b6b6816f74bb 100644 --- a/x11/Makefile +++ b/x11/Makefile @@ -339,6 +339,7 @@ SUBDIR += virtualgl SUBDIR += wallutils SUBDIR += waybar + SUBDIR += wayland-logout SUBDIR += wbar SUBDIR += wcm SUBDIR += wdisplays diff --git a/x11/wayland-logout/Makefile b/x11/wayland-logout/Makefile new file mode 100644 index 000000000000..e5e67b1c669d --- /dev/null +++ b/x11/wayland-logout/Makefile @@ -0,0 +1,23 @@ +# $FreeBSD$ + +PORTNAME= wayland-logout +DISTVERSIONPREFIX= v +DISTVERSION= 1.0 +CATEGORIES= x11 + +MAINTAINER= jbeich@FreeBSD.org +COMMENT= Simple logout on Wayland + +LICENSE= MIT + +USE_GITHUB= yes +GH_ACCOUNT= soreau +NO_ARCH= yes +NO_BUILD= yes +PLIST_FILES= bin/${PORTNAME} + +do-install: + ${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME}.sh \ + ${STAGEDIR}${PREFIX}/bin/${PORTNAME} + +.include <bsd.port.mk> diff --git a/x11/wayland-logout/distinfo b/x11/wayland-logout/distinfo new file mode 100644 index 000000000000..2b972d0bba7f --- /dev/null +++ b/x11/wayland-logout/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1599853712 +SHA256 (soreau-wayland-logout-v1.0_GH0.tar.gz) = 445eb9a978481871dbc51ea0e9cde57ca9f778eda55ecd8a5aac205a71e7f0e6 +SIZE (soreau-wayland-logout-v1.0_GH0.tar.gz) = 16663 diff --git a/x11/wayland-logout/files/patch-wayland-logout.sh b/x11/wayland-logout/files/patch-wayland-logout.sh new file mode 100644 index 000000000000..2b4ad6303c90 --- /dev/null +++ b/x11/wayland-logout/files/patch-wayland-logout.sh @@ -0,0 +1,21 @@ +lsof is slow and not supported on DragonFly + +--- wayland-logout.sh.orig 2020-09-11 19:48:32 UTC ++++ wayland-logout.sh +@@ -1,7 +1,5 @@ + #!/bin/sh + +-# REQUIREMENTS - lsof (not always present) +- + if [ -z "${WAYLAND_DISPLAY}" ]; then + printf '%s\n' 'Error: WAYLAND_DISPLAY not set' + exit 1 +@@ -21,7 +19,7 @@ case "${WAYLAND_DISPLAY}" in + ;; + esac + +-WAYLAND_PIDS="$(lsof -t -f -- ${SOCKET_PATH})" ++WAYLAND_PIDS="$(sockstat -lu | awk "\$6 == \"${SOCKET_PATH}\" { print \$3 }" | uniq)" + set -- $WAYLAND_PIDS + if [ $# -gt 1 ]; then + printf '%s\n' 'Error: More than one process has been bound to the socket' diff --git a/x11/wayland-logout/pkg-descr b/x11/wayland-logout/pkg-descr new file mode 100644 index 000000000000..bc8032a2931c --- /dev/null +++ b/x11/wayland-logout/pkg-descr @@ -0,0 +1,6 @@ +wayland-logout is a simple program that sends SIGINT to a wayland +compositor by looking up the pid for the wayland socket file. The path +to the socket file is derived from WAYLAND_DISPLAY and XDG_RUNTIME_DIR +environment variables. + +WWW: https://github.com/soreau/wayland-logout |
