Received: by mail.netbsd.org (Postfix, from userid 605) id 1F8AA84D80; Sat, 8 Oct 2022 10:06:54 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 4E5B184D5B for ; Sat, 8 Oct 2022 10:06:53 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id p3-V8TLoGYDO for ; Sat, 8 Oct 2022 10:06:52 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id 5250D84CFF for ; Sat, 8 Oct 2022 10:06:52 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 41355FA90; Sat, 8 Oct 2022 10:06:52 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_166522361232310" MIME-Version: 1.0 Date: Sat, 8 Oct 2022 10:06:52 +0000 From: "Benny Siegert" Subject: CVS commit: pkgsrc/x11 To: pkgsrc-changes@NetBSD.org Reply-To: bsiegert@netbsd.org X-Mailer: log_accum Message-Id: <20221008100652.41355FA90@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_166522361232310 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: bsiegert Date: Sat Oct 8 10:06:52 UTC 2022 Modified Files: pkgsrc/x11: Makefile Added Files: pkgsrc/x11/xidle: DESCR MESSAGE Makefile PLIST distinfo pkgsrc/x11/xidle/patches: patch-Makefile patch-xidle.1 patch-xidle.c Log Message: New package for xidle. From pkgsrc-wip. xidle uses the XScreenSaver(3) extension to receive inactivity events when a timeout is specified, running a specific program after the elapsed time. xidle also monitors the very corner of the given position for pointer activity and runs a program if the pointer sits there for more than the specified number of seconds. To generate a diff of this commit: cvs rdiff -u -r1.964 -r1.965 pkgsrc/x11/Makefile cvs rdiff -u -r0 -r1.1 pkgsrc/x11/xidle/DESCR pkgsrc/x11/xidle/MESSAGE \ pkgsrc/x11/xidle/Makefile pkgsrc/x11/xidle/PLIST \ pkgsrc/x11/xidle/distinfo cvs rdiff -u -r0 -r1.1 pkgsrc/x11/xidle/patches/patch-Makefile \ pkgsrc/x11/xidle/patches/patch-xidle.1 \ pkgsrc/x11/xidle/patches/patch-xidle.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_166522361232310 Content-Disposition: inline Content-Length: 6821 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Modified files: Index: pkgsrc/x11/Makefile diff -u pkgsrc/x11/Makefile:1.964 pkgsrc/x11/Makefile:1.965 --- pkgsrc/x11/Makefile:1.964 Sat Sep 24 07:01:26 2022 +++ pkgsrc/x11/Makefile Sat Oct 8 10:06:51 2022 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.964 2022/09/24 07:01:26 wiz Exp $ +# $NetBSD: Makefile,v 1.965 2022/10/08 10:06:51 bsiegert Exp $ # COMMENT= Packages to support the X Window System @@ -611,6 +611,7 @@ SUBDIR+= xgrk SUBDIR+= xhangglider SUBDIR+= xhost SUBDIR+= xicc +SUBDIR+= xidle SUBDIR+= xinit SUBDIR+= xinput SUBDIR+= xisxwayland Added files: Index: pkgsrc/x11/xidle/DESCR diff -u /dev/null pkgsrc/x11/xidle/DESCR:1.1 --- /dev/null Sat Oct 8 10:06:52 2022 +++ pkgsrc/x11/xidle/DESCR Sat Oct 8 10:06:51 2022 @@ -0,0 +1,7 @@ +xidle uses the XScreenSaver(3) extension to receive inactivity events +when a timeout is specified, running a specific program after the +elapsed time. + +xidle also monitors the very corner of the given position for pointer +activity and runs a program if the pointer sits there for more than the +specified number of seconds. Index: pkgsrc/x11/xidle/MESSAGE diff -u /dev/null pkgsrc/x11/xidle/MESSAGE:1.1 --- /dev/null Sat Oct 8 10:06:52 2022 +++ pkgsrc/x11/xidle/MESSAGE Sat Oct 8 10:06:51 2022 @@ -0,0 +1,9 @@ +=========================================================================== +$NetBSD: MESSAGE,v 1.1 2022/10/08 10:06:51 bsiegert Exp $ + +Unless told otherwise, xidle will attempt to start xlock(1) as default +screen locker. + +Install x11/xlockmore if you wish for this behaviour to take effect. + +=========================================================================== Index: pkgsrc/x11/xidle/Makefile diff -u /dev/null pkgsrc/x11/xidle/Makefile:1.1 --- /dev/null Sat Oct 8 10:06:52 2022 +++ pkgsrc/x11/xidle/Makefile Sat Oct 8 10:06:51 2022 @@ -0,0 +1,43 @@ +# $NetBSD: Makefile,v 1.1 2022/10/08 10:06:51 bsiegert Exp $ + +DISTNAME= xidle-20220718 +CATEGORIES= x11 +MASTER_SITES= https://sehnsucht.multics.org/pub/pkgsrc/distfiles/ +DIST_SUBDIR= ${PKGNAME_NOREV} +EXTRACT_SUFX= .tar.xz + +MAINTAINER= vms@retrobsd.ddns.net +HOMEPAGE= https://man.openbsd.org/xidle.1 +COMMENT= Run a program on X inactivity +LICENSE= isc + +MAKEFLAGS+= X11BASE=${X11BASE} +MAKEFLAGS+= MANDIR=${PKGMANDIR} +MAKEFLAGS+= CFLAGS=${CFLAGS:Q} + +SUBST_CLASSES+= paths +SUBST_STAGE.paths= pre-configure +SUBST_FILES.paths+= xidle.c +SUBST_FILES.paths+= xidle.1 +SUBST_VARS.paths= PREFIX +SUBST_MESSAGE.paths= Setting default locker's path. + +INSTALLATION_DIRS= bin ${PKGMANDIR}/man1 + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/xidle ${DESTDIR}${PREFIX}/bin + ${INSTALL_MAN} ${WRKSRC}/xidle.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1 + +.include "../../mk/bsd.prefs.mk" + +.if ${OPSYS} == "Linux" # strtonum() +LDFLAGS+= -lbsd +.include "../../devel/libbsd/buildlink3.mk" +.endif + +.include "../../x11/libXdmcp/buildlink3.mk" +.include "../../x11/libXScrnSaver/buildlink3.mk" +.include "../../x11/libXau/buildlink3.mk" +.include "../../x11/libXext/buildlink3.mk" +.include "../../x11/libX11/buildlink3.mk" +.include "../../mk/bsd.pkg.mk" Index: pkgsrc/x11/xidle/PLIST diff -u /dev/null pkgsrc/x11/xidle/PLIST:1.1 --- /dev/null Sat Oct 8 10:06:52 2022 +++ pkgsrc/x11/xidle/PLIST Sat Oct 8 10:06:51 2022 @@ -0,0 +1,3 @@ +@comment $NetBSD: PLIST,v 1.1 2022/10/08 10:06:51 bsiegert Exp $ +bin/xidle +man/man1/xidle.1 Index: pkgsrc/x11/xidle/distinfo diff -u /dev/null pkgsrc/x11/xidle/distinfo:1.1 --- /dev/null Sat Oct 8 10:06:52 2022 +++ pkgsrc/x11/xidle/distinfo Sat Oct 8 10:06:51 2022 @@ -0,0 +1,8 @@ +$NetBSD: distinfo,v 1.1 2022/10/08 10:06:51 bsiegert Exp $ + +BLAKE2s (xidle-20220718/xidle-20220718.tar.xz) = fb40e18d9bfe7b8379b57390e79e35a7df2f06223632f8c71da4c20244eaff92 +SHA512 (xidle-20220718/xidle-20220718.tar.xz) = f72fdc91a2c9173ca26291d46ed3857624a1be7c44918bf7e985f0dae184eb8c0201c4e0fb0cda5f33e6f488835f7a68e888aebc180c1eca3c4396a67e659c86 +Size (xidle-20220718/xidle-20220718.tar.xz) = 5640 bytes +SHA1 (patch-Makefile) = f93b2ffc31da13d143dd157d670e299f0568713a +SHA1 (patch-xidle.1) = dcb4906dd1ca4780925ffd96193afd3cdb3b6401 +SHA1 (patch-xidle.c) = 02058baddefbad2ba42784eba6fce980a1020314 Index: pkgsrc/x11/xidle/patches/patch-Makefile diff -u /dev/null pkgsrc/x11/xidle/patches/patch-Makefile:1.1 --- /dev/null Sat Oct 8 10:06:52 2022 +++ pkgsrc/x11/xidle/patches/patch-Makefile Sat Oct 8 10:06:52 2022 @@ -0,0 +1,21 @@ +$NetBSD: patch-Makefile,v 1.1 2022/10/08 10:06:52 bsiegert Exp $ + +Portability fixes for pkgsrc. + +--- Makefile.orig 2015-05-26 05:22:15.000000000 +0000 ++++ Makefile +@@ -1,6 +1,3 @@ +-# $OpenBSD: Makefile,v 1.7 2011/06/23 22:48:59 naddy Exp $ +-.include +- + PROG= xidle + + CPPFLAGS+= -I${X11BASE}/include +@@ -9,7 +6,4 @@ LDADD+= -L${X11BASE}/lib -lXss -lXext -l + + MANDIR= ${X11BASE}/man/man + +-obj: _xenocara_obj +- + .include +-.include Index: pkgsrc/x11/xidle/patches/patch-xidle.1 diff -u /dev/null pkgsrc/x11/xidle/patches/patch-xidle.1:1.1 --- /dev/null Sat Oct 8 10:06:52 2022 +++ pkgsrc/x11/xidle/patches/patch-xidle.1 Sat Oct 8 10:06:52 2022 @@ -0,0 +1,15 @@ +$NetBSD: patch-xidle.1,v 1.1 2022/10/08 10:06:52 bsiegert Exp $ + +Do not hard-code xlock path. + +--- xidle.1.orig 2015-05-26 05:22:15.000000000 +0000 ++++ xidle.1 +@@ -127,7 +127,7 @@ Run + using the flying bats mode if no activity is detected in 300 seconds or the + pointer sits in the southwest corner for more than 5 seconds: + .Bd -literal -offset indent +-$ xidle -delay 5 -sw -program "/usr/X11R6/bin/xlock -mode bat" \e ++$ xidle -delay 5 -sw -program "@PREFIX@/bin/xlock -mode bat" \e + -timeout 300 + .Ed + .Sh SEE ALSO Index: pkgsrc/x11/xidle/patches/patch-xidle.c diff -u /dev/null pkgsrc/x11/xidle/patches/patch-xidle.c:1.1 --- /dev/null Sat Oct 8 10:06:52 2022 +++ pkgsrc/x11/xidle/patches/patch-xidle.c Sat Oct 8 10:06:52 2022 @@ -0,0 +1,44 @@ +$NetBSD: patch-xidle.c,v 1.1 2022/10/08 10:06:52 bsiegert Exp $ + +Portability fixes: + +- Define non-standard compiler attribute extension. +- Do not hard-code xlock path. +- Disable pledge. +- Use libbsd on Linux. + +--- xidle.c.orig 2022-07-18 06:17:31.000000000 +0000 ++++ xidle.c +@@ -39,15 +39,21 @@ + #include + #include + #include ++#ifdef __linux__ ++#include ++#endif + + #ifndef CLASS_NAME + #define CLASS_NAME "XIdle" + #endif + + #ifndef PATH_PROG +-#define PATH_PROG "/usr/X11R6/bin/xlock" ++#define PATH_PROG "@PREFIX@/bin/xlock" + #endif + ++#ifndef __dead ++#define __dead __attribute__((__noreturn__)) ++#endif + + enum { + north = 0x01, +@@ -354,9 +360,6 @@ main(int argc, char **argv) + if (fd > 2) + close(fd); + +- if (pledge("stdio proc exec", NULL) == -1) +- err(1, "pledge"); +- + for (;;) { + XEvent ev; + u_long mask; --_----------=_166522361232310--