pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/x11
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.
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@localhost
+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 <bsd.xconf.mk>
+-
+ 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 <bsd.prog.mk>
+-.include <bsd.xorg.mk>
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 <stdlib.h>
+ #include <string.h>
+ #include <unistd.h>
++#ifdef __linux__
++#include <bsd/stdlib.h>
++#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;
Home |
Main Index |
Thread Index |
Old Index