* [bug#29480] [PATCH] gnu: Add xautolock.
@ 2017-11-28 2:50 Mike Gerwitz
2017-11-30 14:56 ` bug#29480: " Ludovic Courtès
0 siblings, 1 reply; 4+ messages in thread
From: Mike Gerwitz @ 2017-11-28 2:50 UTC (permalink / raw)
To: 29480
[-- Attachment #1.1: Type: text/plain, Size: 90 bytes --]
Building this one was a history lesson. I modeled it after xfig, which
also uses imake.
[-- Attachment #1.2: 0001-gnu-Add-xautolock.patch --]
[-- Type: text/x-diff, Size: 3179 bytes --]
From 9de0820982f89949f943c1566c7dffe6b3bc87de Mon Sep 17 00:00:00 2001
From: Mike Gerwitz <mtg@gnu.org>
Date: Mon, 27 Nov 2017 21:45:11 -0500
Subject: [PATCH] gnu: Add xautolock.
* gnu/packages/xdisorg.scm (xautolock): New variable.
---
gnu/packages/xdisorg.scm | 50 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 50 insertions(+)
diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index f4c03c144..cc84884b6 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -20,6 +20,7 @@
;;; Copyright © 2017 ng0 <contact.ng0@cryptolab.net>
;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2017 Marek Benc <dusxmt@gmx.com>
+;;; Copyright © 2017 Mike Gerwitz <mtg@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1329,3 +1330,52 @@ a specified program, emulating the PC speaker beep using the sound card (default
or playing a PCM encoded WAVE file.")
(home-page "https://github.com/dusxmt/nxbelld")
(license license:gpl3+)))
+
+(define-public xautolock
+ (package
+ (name "xautolock")
+ (version "2.2")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "http://www.ibiblio.org/pub/linux/X11/screensavers/"
+ name "-" version ".tgz"))
+ (sha256
+ (base32
+ "18jd3k3pvlm5x1adyqw63z2b3f4ixh9mfvz9asvnskk3fm8jgw0i"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("imake" ,imake)))
+ (inputs
+ `(("libx11" ,libx11)
+ ("libxext" ,libxext)
+ ("libxscrnsaver" ,libxscrnsaver)))
+ (arguments
+ `(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'configure
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((imake (assoc-ref inputs "imake"))
+ (out (assoc-ref outputs "out")))
+ ;; Generate Makefile
+ (zero? (system* "xmkmf"))
+ (substitute* "Makefile"
+ ;; These imake variables somehow remain undefined
+ (("DefaultGcc2[[:graph:]]*Opt") "-O2")
+ ;; Reset a few variable defaults that are set in imake templates
+ ((imake) out)
+ (("(MANPATH = )[[:graph:]]*" _ front)
+ (string-append front out "/share/man")))
+ ;; Old BSD-style 'union wait' is unneeded (defining
+ ;; _USE_BSD did not seem to fix it)
+ (substitute* "src/engine.c"
+ (("union wait status") "int status = 0")))))
+ (add-after 'install 'install/man
+ (lambda _
+ (zero? (system* "make" "install.man")))))))
+ (home-page "http://ibiblio.org/pub/Linux/X11/screensavers/")
+ (synopsis "Program launcher for idle X sessions")
+ (description "Xautolock monitors input devices under the X Window
+System, and launches a program of your choice if there is no activity after
+a user-configurable period of time.")
+ (license license:gpl2)))
--
2.15.0
[-- Attachment #1.3: Type: text/plain, Size: 163 bytes --]
--
Mike Gerwitz
Free Software Hacker+Activist | GNU Maintainer & Volunteer
GPG: D6E9 B930 028A 6C38 F43B 2388 FEF6 3574 5E6F 6D05
https://mikegerwitz.com
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]
^ permalink raw reply related [flat|nested] 4+ messages in thread
* bug#29480: [PATCH] gnu: Add xautolock.
2017-11-28 2:50 [bug#29480] [PATCH] gnu: Add xautolock Mike Gerwitz
@ 2017-11-30 14:56 ` Ludovic Courtès
2017-12-02 0:44 ` [bug#29480] " Mike Gerwitz
0 siblings, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2017-11-30 14:56 UTC (permalink / raw)
To: Mike Gerwitz; +Cc: 29480-done
[-- Attachment #1: Type: text/plain, Size: 624 bytes --]
Hello Mike,
Mike Gerwitz <mtg@gnu.org> skribis:
> Building this one was a history lesson. I modeled it after xfig, which
> also uses imake.
Heheh.
> From 9de0820982f89949f943c1566c7dffe6b3bc87de Mon Sep 17 00:00:00 2001
> From: Mike Gerwitz <mtg@gnu.org>
> Date: Mon, 27 Nov 2017 21:45:11 -0500
> Subject: [PATCH] gnu: Add xautolock.
>
> * gnu/packages/xdisorg.scm (xautolock): New variable.
I took the liberty to make the changes below: the first one to make sure
‘xmkmf’ failures stop the process, and the second one to make sure the
phase returns a Boolean value.
Thank you!
Ludo’.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1102 bytes --]
diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index cc84884b6..2e1ed2ee9 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -1358,7 +1358,7 @@ or playing a PCM encoded WAVE file.")
(let ((imake (assoc-ref inputs "imake"))
(out (assoc-ref outputs "out")))
;; Generate Makefile
- (zero? (system* "xmkmf"))
+ (invoke "xmkmf")
(substitute* "Makefile"
;; These imake variables somehow remain undefined
(("DefaultGcc2[[:graph:]]*Opt") "-O2")
@@ -1369,7 +1369,8 @@ or playing a PCM encoded WAVE file.")
;; Old BSD-style 'union wait' is unneeded (defining
;; _USE_BSD did not seem to fix it)
(substitute* "src/engine.c"
- (("union wait status") "int status = 0")))))
+ (("union wait status") "int status = 0"))
+ #t)))
(add-after 'install 'install/man
(lambda _
(zero? (system* "make" "install.man")))))))
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [bug#29480] [PATCH] gnu: Add xautolock.
2017-11-30 14:56 ` bug#29480: " Ludovic Courtès
@ 2017-12-02 0:44 ` Mike Gerwitz
2017-12-02 10:02 ` Ludovic Courtès
0 siblings, 1 reply; 4+ messages in thread
From: Mike Gerwitz @ 2017-12-02 0:44 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 29480-done
[-- Attachment #1: Type: text/plain, Size: 723 bytes --]
On Thu, Nov 30, 2017 at 15:56:11 +0100, Ludovic Courtès wrote:
> I took the liberty to make the changes below:
Ah, thanks!
> diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
> - (zero? (system* "xmkmf"))
> + (invoke "xmkmf")
Okay, that makes much more sense. I was wondering if `zero?' had some
special meaning in that context. gnu/packages/xfig.scm:93 uses it in a
non-tail position as well. I looked at the history for the file but it
was always like that; perhaps that should be `invoke' too?
--
Mike Gerwitz
Free Software Hacker+Activist | GNU Maintainer & Volunteer
GPG: D6E9 B930 028A 6C38 F43B 2388 FEF6 3574 5E6F 6D05
https://mikegerwitz.com
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* [bug#29480] [PATCH] gnu: Add xautolock.
2017-12-02 0:44 ` [bug#29480] " Mike Gerwitz
@ 2017-12-02 10:02 ` Ludovic Courtès
0 siblings, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2017-12-02 10:02 UTC (permalink / raw)
To: Mike Gerwitz; +Cc: 29480-done
Hi,
Mike Gerwitz <mtg@gnu.org> skribis:
> On Thu, Nov 30, 2017 at 15:56:11 +0100, Ludovic Courtès wrote:
>> I took the liberty to make the changes below:
>
> Ah, thanks!
>
>> diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
>> - (zero? (system* "xmkmf"))
>> + (invoke "xmkmf")
>
> Okay, that makes much more sense. I was wondering if `zero?' had some
> special meaning in that context.
‘zero?’ returns a Boolean and in this case it was ignored.
> gnu/packages/xfig.scm:93 uses it in a non-tail position as well. I
> looked at the history for the file but it was always like that;
> perhaps that should be `invoke' too?
I guess we should! I’ve made the change and will push soonish.
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-12-02 10:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-28 2:50 [bug#29480] [PATCH] gnu: Add xautolock Mike Gerwitz
2017-11-30 14:56 ` bug#29480: " Ludovic Courtès
2017-12-02 0:44 ` [bug#29480] " Mike Gerwitz
2017-12-02 10:02 ` Ludovic Courtès
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).