x11/xss-lock: use external locker as X11 screen saver (new port)

Based on:	Arch and Gentoo packages of the same name
This commit is contained in:
Alexey Dokuchaev
2024-01-04 12:10:04 +00:00
parent 2863f708e6
commit b8febb6077
6 changed files with 61 additions and 0 deletions
+1
View File
@@ -627,6 +627,7 @@
SUBDIR += xskyroot
SUBDIR += xsm
SUBDIR += xsnow
SUBDIR += xss-lock
SUBDIR += xssstate
SUBDIR += xstarroll
SUBDIR += xstdcmap
+27
View File
@@ -0,0 +1,27 @@
PORTNAME= xss-lock
DISTVERSION= 0.3.0-g20140302
CATEGORIES= x11
MASTER_SITES= https://bitbucket.org/raymonad/xss-lock/get/
DISTNAME= ${BB_TAGNAME} # commit hash: no embedded ${PORTNAME}
DIST_SUBDIR= ${PORTNAME} # and that's why we need ${DIST_SUBDIR}
MAINTAINER= danfe@FreeBSD.org
COMMENT= Use external locker as X11 screen saver
WWW= https://bitbucket.org/raymonad/xss-lock
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
BUILD_DEPENDS= rst2man:textproc/py-docutils
LIB_DEPENDS= libxcb-util.so:x11/xcb-util
USES= cmake gnome pkgconfig tar:bzip2 xorg
USE_GNOME= glib20
USE_XORG= xcb
BB_TAGNAME= 1e158fb20108
WRKSRC= ${WRKDIR}/raymonad-${PORTNAME}-${BB_TAGNAME}
OPTIONS_DEFINE= DOCS
.include <bsd.port.mk>
+3
View File
@@ -0,0 +1,3 @@
TIMESTAMP = 1393757192
SHA256 (xss-lock/1e158fb20108.tar.bz2) = b9116a91367d10cd582343ad3ac6fda56c7413a7a27b6b6ae4b45ac2aa9fe8f4
SIZE (xss-lock/1e158fb20108.tar.bz2) = 12135
+19
View File
@@ -0,0 +1,19 @@
The g_critical() function will core dump if critical errors are marked
fatal (which they are in xss-lock). Instead, log as informational and
exit. Thanks to Tomáš Janoušek for the bug report and original patch.
--- src/xss-lock.c.orig 2014-03-02 10:46:32 UTC
+++ src/xss-lock.c
@@ -158,8 +158,10 @@ screensaver_event_cb(xcb_connection_t *connection, xcb
{
uint8_t event_type;
- if (!event)
- g_critical("X connection lost; exiting.");
+ if (!event) {
+ g_info("X connection lost; exiting.");
+ exit(EXIT_FAILURE);
+ }
event_type = XCB_EVENT_RESPONSE_TYPE(event);
if (event_type == 0) {
+2
View File
@@ -0,0 +1,2 @@
xss-lock hooks up your favorite locker to the MIT screen saver extension
for X11 and also to systemd's login manager (so long as it is available).
+9
View File
@@ -0,0 +1,9 @@
bin/xss-lock
share/bash-completion/completions/xss-lock
%%PORTDOCS%%%%DOCSDIR%%/NEWS
%%PORTDOCS%%%%DOCSDIR%%/dim-screen.sh
%%PORTDOCS%%%%DOCSDIR%%/transfer-sleep-lock-generic-delay.sh
%%PORTDOCS%%%%DOCSDIR%%/transfer-sleep-lock-i3lock.sh
%%PORTDOCS%%%%DOCSDIR%%/xdg-screensaver.patch
share/man/man1/xss-lock.1.gz
share/zsh/site-functions/_xss-lock