pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

xidle: portability fixes. Fixed path to default locker. Minor improvements.



Module Name:	pkgsrc-wip
Committed By:	Paolo Vincenzo Olivo <vms%retrobsd.ddns.net@localhost>
Pushed By:	vms
Date:		Sun Jul 17 22:38:34 2022 +0200
Changeset:	77b339b40792765cabb16badf33ef7f223929df7

Modified Files:
	xidle/Makefile
	xidle/distinfo
Added Files:
	xidle/MESSAGE
	xidle/patches/patch-xidle.1
	xidle/patches/patch-xidle.c

Log Message:
xidle: portability fixes.
Fixed path to default locker.
Minor improvements.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=77b339b40792765cabb16badf33ef7f223929df7

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 xidle/MESSAGE               |  9 +++++++++
 xidle/Makefile              |  8 ++++++++
 xidle/distinfo              |  2 ++
 xidle/patches/patch-xidle.1 | 15 +++++++++++++++
 xidle/patches/patch-xidle.c | 21 +++++++++++++++++++++
 5 files changed, 55 insertions(+)

diffs:
diff --git a/xidle/MESSAGE b/xidle/MESSAGE
new file mode 100644
index 0000000000..80022924db
--- /dev/null
+++ b/xidle/MESSAGE
@@ -0,0 +1,9 @@
+===========================================================================
+$NetBSD$
+
+Unless told otherwise, xidle will attempt to start xlock(1) as default
+screen locker.
+
+Install x11/xlockmore if you wish this behaviour to take effect.
+
+===========================================================================
diff --git a/xidle/Makefile b/xidle/Makefile
index 072536828d..169a692a52 100644
--- a/xidle/Makefile
+++ b/xidle/Makefile
@@ -13,6 +13,14 @@ 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
 
diff --git a/xidle/distinfo b/xidle/distinfo
index 0e53153d13..2f1e73c846 100644
--- a/xidle/distinfo
+++ b/xidle/distinfo
@@ -4,3 +4,5 @@ BLAKE2s (xidle-26052015/xidle-26052015.tar.bz2) = 18d1b041f2a2cab14570af881a199e
 SHA512 (xidle-26052015/xidle-26052015.tar.bz2) = bb132a431a5dd585be6a93519aa06a73eade63dde81bbe582a5dd966646c5eeaca65fa2573e6795b73bbfd08388390b4e92954929577051f13098ef8e38c2200
 Size (xidle-26052015/xidle-26052015.tar.bz2) = 5897 bytes
 SHA1 (patch-Makefile) = f93b2ffc31da13d143dd157d670e299f0568713a
+SHA1 (patch-xidle.1) = dcb4906dd1ca4780925ffd96193afd3cdb3b6401
+SHA1 (patch-xidle.c) = 7c1082bd3cc12fd26fec1ef58aebd0e6941420b5
diff --git a/xidle/patches/patch-xidle.1 b/xidle/patches/patch-xidle.1
new file mode 100644
index 0000000000..153aa01672
--- /dev/null
+++ b/xidle/patches/patch-xidle.1
@@ -0,0 +1,15 @@
+$NetBSD$
+
+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
diff --git a/xidle/patches/patch-xidle.c b/xidle/patches/patch-xidle.c
new file mode 100644
index 0000000000..6b01c14808
--- /dev/null
+++ b/xidle/patches/patch-xidle.c
@@ -0,0 +1,21 @@
+$NetBSD$
+
+Define non-standard compiler attribute extension.
+Do not hard-code xlock path.
+
+--- xidle.c.orig	2015-05-26 05:22:15.000000000 +0000
++++ xidle.c
+@@ -43,9 +43,12 @@
+ #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,


Home | Main Index | Thread Index | Old Index