git: b8febb60779d - main - x11/xss-lock: use external locker as X11 screen saver (new port)
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 04 Jan 2024 12:13:02 UTC
The branch main has been updated by danfe:
URL: https://cgit.FreeBSD.org/ports/commit/?id=b8febb60779d594cf7a37796ff01b178a62b15b3
commit b8febb60779d594cf7a37796ff01b178a62b15b3
Author: Alexey Dokuchaev <danfe@FreeBSD.org>
AuthorDate: 2024-01-04 12:10:04 +0000
Commit: Alexey Dokuchaev <danfe@FreeBSD.org>
CommitDate: 2024-01-04 12:10:04 +0000
x11/xss-lock: use external locker as X11 screen saver (new port)
Based on: Arch and Gentoo packages of the same name
---
x11/Makefile | 1 +
x11/xss-lock/Makefile | 27 +++++++++++++++++++++++++++
x11/xss-lock/distinfo | 3 +++
x11/xss-lock/files/patch-src_xss-lock.c | 19 +++++++++++++++++++
x11/xss-lock/pkg-descr | 2 ++
x11/xss-lock/pkg-plist | 9 +++++++++
6 files changed, 61 insertions(+)
diff --git a/x11/Makefile b/x11/Makefile
index d451f4245245..91b77c65c73b 100644
--- a/x11/Makefile
+++ b/x11/Makefile
@@ -627,6 +627,7 @@
SUBDIR += xskyroot
SUBDIR += xsm
SUBDIR += xsnow
+ SUBDIR += xss-lock
SUBDIR += xssstate
SUBDIR += xstarroll
SUBDIR += xstdcmap
diff --git a/x11/xss-lock/Makefile b/x11/xss-lock/Makefile
new file mode 100644
index 000000000000..14b48421c06f
--- /dev/null
+++ b/x11/xss-lock/Makefile
@@ -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>
diff --git a/x11/xss-lock/distinfo b/x11/xss-lock/distinfo
new file mode 100644
index 000000000000..6bada39a5acb
--- /dev/null
+++ b/x11/xss-lock/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1393757192
+SHA256 (xss-lock/1e158fb20108.tar.bz2) = b9116a91367d10cd582343ad3ac6fda56c7413a7a27b6b6ae4b45ac2aa9fe8f4
+SIZE (xss-lock/1e158fb20108.tar.bz2) = 12135
diff --git a/x11/xss-lock/files/patch-src_xss-lock.c b/x11/xss-lock/files/patch-src_xss-lock.c
new file mode 100644
index 000000000000..4111838a4fa3
--- /dev/null
+++ b/x11/xss-lock/files/patch-src_xss-lock.c
@@ -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) {
diff --git a/x11/xss-lock/pkg-descr b/x11/xss-lock/pkg-descr
new file mode 100644
index 000000000000..f68044b93aa4
--- /dev/null
+++ b/x11/xss-lock/pkg-descr
@@ -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).
diff --git a/x11/xss-lock/pkg-plist b/x11/xss-lock/pkg-plist
new file mode 100644
index 000000000000..5b031bb67682
--- /dev/null
+++ b/x11/xss-lock/pkg-plist
@@ -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