all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / Atom feed
* [bug#48892] [PATCH] gnu: Add xkbset.
@ 2021-06-07  0:37 Paul A. Patience
  2021-06-07 10:04 ` Maxime Devos
  0 siblings, 1 reply; 6+ messages in thread
From: Paul A. Patience @ 2021-06-07  0:37 UTC (permalink / raw)
  To: 48892

[-- Attachment #1: Type: text/plain, Size: 13 bytes --]

Empty Message

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-xkbset.patch --]
[-- Type: text/x-patch; name=0001-gnu-Add-xkbset.patch, Size: 3636 bytes --]

From fa94f75cd3b620cdd8c6826dbe6fc268863b1344 Mon Sep 17 00:00:00 2001
From: "Paul A. Patience" <paul@apatience.com>
Date: Sun, 6 Jun 2021 20:34:52 -0400
Subject: [PATCH] gnu: Add xkbset.

* gnu/packages/xorg.scm (xkbset): New variable.
---
 gnu/packages/xorg.scm | 56 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)

diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm
index 9156fb3163..a8032c9526 100644
--- a/gnu/packages/xorg.scm
+++ b/gnu/packages/xorg.scm
@@ -28,6 +28,7 @@
 ;;; Copyright © 2020 Jean-Baptiste Note <jean-baptiste.note@m4x.org>
 ;;; Copyright © 2021 Nicolò Balzarotti <nicolo@nixo.xyz>
 ;;; Copyright © 2021 Matthew James Kraai <kraai@ftbfs.org>
+;;; Copyright © 2021 Paul A. Patience <paul@apatience.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -88,6 +89,7 @@
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages qt)
   #:use-module (gnu packages spice)
+  #:use-module (gnu packages tcl)
   #:use-module (gnu packages video)
   #:use-module (gnu packages xiph)
   #:use-module (gnu packages xml)
@@ -3980,6 +3982,60 @@ make keyboards more accessible to people with physical impairments.")
 requested commands if they occur.")
     (license license:x11)))
 
+(define-public xkbset
+  (package
+    (name "xkbset")
+    (version "0.6")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://faculty.missouri.edu/~stephen/software/"
+                           name "/" name "-" version ".tar.gz"))
+       (sha256
+        (base32 "199mlm127zk1lr8nrq22n68l2l8cjwc4cgwd67rg1i6497n2y0xc"))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("libX11" ,libx11)
+       ("perl" ,perl)
+       ("perl-tk" ,perl-tk)))
+    (arguments
+     `(#:tests? #f                      ; There are none.
+       #:make-flags
+       (let ((out (assoc-ref %outputs "out")))
+         `("CC=gcc"
+           ,(string-append "X11PREFIX=" out)
+           ,(string-append "X11BASE=" (assoc-ref %build-inputs "libX11"))
+           ,(string-append "INSTALL_MAN1=" out "/share/man/man1")))
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (add-before 'install 'create-install-directories
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (mkdir-p out)
+               (with-directory-excursion out
+                 (for-each mkdir-p '("bin" "share/man/man1"))))
+             #t))
+         (add-after 'install 'wrap-perl-script
+           (lambda* (#:key outputs #:allow-other-keys)
+             (wrap-program (string-append (assoc-ref outputs "out")
+                                          "/bin/xkbset-gui")
+               `("PERL5LIB" ":" prefix (,(getenv "PERL5LIB"))))
+             #t))
+         (replace 'install-license-files
+           (lambda* (#:key outputs #:allow-other-keys)
+             (install-file "COPYRIGHT"
+                           (string-append (assoc-ref outputs "out")
+                                          "/share/doc/" ,name "-" ,version))
+             #t)))))
+    (home-page "https://faculty.missouri.edu/~stephen/software/")
+    (synopsis "User-preference utility for XKB extensions for X")
+    (description
+     "This is a program to help manage many of the XKB features of the X
+Window System. This includes such features as MouseKeys, AccessX,
+StickyKeys, BounceKeys, and SlowKeys. It includes a GUI program to help
+with MouseKeys-acceleration management.")
+    (license license:bsd-3)))
 
 (define-public xkbutils
   (package
-- 
2.31.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [bug#48892] [PATCH] gnu: Add xkbset.
  2021-06-07  0:37 [bug#48892] [PATCH] gnu: Add xkbset Paul A. Patience
@ 2021-06-07 10:04 ` Maxime Devos
  2021-06-07 12:40   ` Paul A. Patience
  0 siblings, 1 reply; 6+ messages in thread
From: Maxime Devos @ 2021-06-07 10:04 UTC (permalink / raw)
  To: Paul A. Patience, 48892

[-- Attachment #1: Type: text/plain, Size: 715 bytes --]

Paul A. Patience schreef op ma 07-06-2021 om 00:37 [+0000]:
> +       (let ((out (assoc-ref %outputs "out")))
> +         `("CC=gcc"
> +           ,(string-append "X11PREFIX=" out)
> +           ,(string-append "X11BASE=" (assoc-ref %build-inputs "libX11"))
> +           ,(string-append "INSTALL_MAN1=" out "/share/man/man1")))

You should do

  `(,,(string-append "CC=" (cc-for-target))
    ,(string-append "X11PREFIX=" ...) ...)

to make sure cross-compilation will work.
(Try ./pre-inst-env guix build xkbset --target=aarch64-linux-gnu.)

Also, libx11 is usualy named "libx11" (no capital letters)
in package inputs, and very infrequently "libX11". I would use "libx11".

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [bug#48892] [PATCH] gnu: Add xkbset.
  2021-06-07 10:04 ` Maxime Devos
@ 2021-06-07 12:40   ` Paul A. Patience
  2021-06-08 21:23     ` Ludovic Courtès
  0 siblings, 1 reply; 6+ messages in thread
From: Paul A. Patience @ 2021-06-07 12:40 UTC (permalink / raw)
  To: Maxime Devos; +Cc: 48892

[-- Attachment #1: Type: text/plain, Size: 956 bytes --]

On Monday, June 7, 2021 6:04 AM, Maxime Devos <maximedevos@telenet.be> wrote:

> You should do
>
> `(,,(string-append "CC=" (cc-for-target))
> ,(string-append "X11PREFIX=" ...) ...)

Fixed.
I suppose this needs to be fixed in many existing packages.
I hadn't seen cc-for-target until now.
(I also discovered %output in the meantime.)

> to make sure cross-compilation will work.
> (Try ./pre-inst-env guix build xkbset --target=aarch64-linux-gnu.)

Unfortunately it seems that:

    guix build: error: gnu/packages/tcl.scm:270:2: perl-tk@804.034: build system `perl' does not support cross builds

> Also, libx11 is usualy named "libx11" (no capital letters)
> in package inputs, and very infrequently "libX11". I would use "libx11".

Fixed.
I also prefer all lowercase, but the one package I had
looked at to determine the X11 library to include had used uppercase.

The updated patch is attached.

Thanks for the help,
Paul

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-xkbset.patch --]
[-- Type: text/x-patch; name=0001-gnu-Add-xkbset.patch, Size: 3618 bytes --]

From 59a4d628e2179c8a768c7fdf5401f2f8193c6893 Mon Sep 17 00:00:00 2001
From: "Paul A. Patience" <paul@apatience.com>
Date: Mon, 7 Jun 2021 08:34:43 -0400
Subject: [PATCH] gnu: Add xkbset.

* gnu/packages/xorg.scm (xkbset): New variable.
---
 gnu/packages/xorg.scm | 55 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm
index 9156fb3163..74998c7c24 100644
--- a/gnu/packages/xorg.scm
+++ b/gnu/packages/xorg.scm
@@ -28,6 +28,7 @@
 ;;; Copyright © 2020 Jean-Baptiste Note <jean-baptiste.note@m4x.org>
 ;;; Copyright © 2021 Nicolò Balzarotti <nicolo@nixo.xyz>
 ;;; Copyright © 2021 Matthew James Kraai <kraai@ftbfs.org>
+;;; Copyright © 2021 Paul A. Patience <paul@apatience.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -88,6 +89,7 @@
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages qt)
   #:use-module (gnu packages spice)
+  #:use-module (gnu packages tcl)
   #:use-module (gnu packages video)
   #:use-module (gnu packages xiph)
   #:use-module (gnu packages xml)
@@ -3980,6 +3982,59 @@ make keyboards more accessible to people with physical impairments.")
 requested commands if they occur.")
     (license license:x11)))
 
+(define-public xkbset
+  (package
+    (name "xkbset")
+    (version "0.6")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://faculty.missouri.edu/~stephen/software/"
+                           name "/" name "-" version ".tar.gz"))
+       (sha256
+        (base32 "199mlm127zk1lr8nrq22n68l2l8cjwc4cgwd67rg1i6497n2y0xc"))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("libx11" ,libx11)
+       ("perl" ,perl)
+       ("perl-tk" ,perl-tk)))
+    (arguments
+     `(#:tests? #f                      ; There are none.
+       #:make-flags
+       `(,,(string-append "CC=" (cc-for-target))
+         ,(string-append "X11PREFIX=" %output)
+         ,(string-append "X11BASE=" (assoc-ref %build-inputs "libx11"))
+         ,(string-append "INSTALL_MAN1=" %output "/share/man/man1"))
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (add-before 'install 'create-install-directories
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (mkdir-p out)
+               (with-directory-excursion out
+                 (for-each mkdir-p '("bin" "share/man/man1"))))
+             #t))
+         (add-after 'install 'wrap-perl-script
+           (lambda* (#:key outputs #:allow-other-keys)
+             (wrap-program (string-append (assoc-ref outputs "out")
+                                          "/bin/xkbset-gui")
+               `("PERL5LIB" ":" prefix (,(getenv "PERL5LIB"))))
+             #t))
+         (replace 'install-license-files
+           (lambda* (#:key outputs #:allow-other-keys)
+             (install-file "COPYRIGHT"
+                           (string-append (assoc-ref outputs "out")
+                                          "/share/doc/" ,name "-" ,version))
+             #t)))))
+    (home-page "https://faculty.missouri.edu/~stephen/software/")
+    (synopsis "User-preference utility for XKB extensions for X")
+    (description
+     "This is a program to help manage many of the XKB features of the X
+Window System. This includes such features as MouseKeys, AccessX,
+StickyKeys, BounceKeys, and SlowKeys. It includes a GUI program to help
+with MouseKeys-acceleration management.")
+    (license license:bsd-3)))
 
 (define-public xkbutils
   (package
-- 
2.31.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [bug#48892] [PATCH] gnu: Add xkbset.
  2021-06-07 12:40   ` Paul A. Patience
@ 2021-06-08 21:23     ` Ludovic Courtès
  2021-06-09 12:18       ` Paul A. Patience
  0 siblings, 1 reply; 6+ messages in thread
From: Ludovic Courtès @ 2021-06-08 21:23 UTC (permalink / raw)
  To: Paul A. Patience; +Cc: 48892, Maxime Devos

Hi,

"Paul A. Patience" <paul@apatience.com> skribis:

> From 59a4d628e2179c8a768c7fdf5401f2f8193c6893 Mon Sep 17 00:00:00 2001
> From: "Paul A. Patience" <paul@apatience.com>
> Date: Mon, 7 Jun 2021 08:34:43 -0400
> Subject: [PATCH] gnu: Add xkbset.
>
> * gnu/packages/xorg.scm (xkbset): New variable.

This should go to xdisorg.scm (xorg.scm is for packages distributed by
the X.org project).

> +    (synopsis "User-preference utility for XKB extensions for X")
> +    (description
> +     "This is a program to help manage many of the XKB features of the X
> +Window System. This includes such features as MouseKeys, AccessX,
> +StickyKeys, BounceKeys, and SlowKeys. It includes a GUI program to help
> +with MouseKeys-acceleration management.")

‘guix lint’ complains about two-spaces-after-period issues.  :-)

Also, s/GUI program/graphical program/ ?

Could you send an updated patch?  This should be the last one!

Thanks,
Ludo’.




^ permalink raw reply	[flat|nested] 6+ messages in thread

* [bug#48892] [PATCH] gnu: Add xkbset.
  2021-06-08 21:23     ` Ludovic Courtès
@ 2021-06-09 12:18       ` Paul A. Patience
  2021-06-11 22:42         ` bug#48892: " Ludovic Courtès
  0 siblings, 1 reply; 6+ messages in thread
From: Paul A. Patience @ 2021-06-09 12:18 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 48892, Maxime Devos

[-- Attachment #1: Type: text/plain, Size: 378 bytes --]

On Tuesday, June 8th, 2021 at 17:23, Ludovic Courtès <ludo@gnu.org> wrote:

> This should go to xdisorg.scm (xorg.scm is for packages distributed by
> the X.org project).

<snip>

> ‘guix lint’ complains about two-spaces-after-period issues. :-)
>
> Also, s/GUI program/graphical program/ ?

Good catches!
The updated patch is attached.

Best regards,
Paul

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-xkbset.patch --]
[-- Type: text/x-patch; name=0001-gnu-Add-xkbset.patch, Size: 3362 bytes --]

From 65b9463e159f0e3ff1ae0c4a0faca08b0c22ed81 Mon Sep 17 00:00:00 2001
From: "Paul A. Patience" <paul@apatience.com>
Date: Wed, 9 Jun 2021 08:07:44 -0400
Subject: [PATCH] gnu: Add xkbset.

* gnu/packages/xdisorg.scm (xkbset): New variable.
---
 gnu/packages/xdisorg.scm | 55 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index 5573e2afb5..66e1867809 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -46,6 +46,7 @@
 ;;; Copyright © 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
 ;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
 ;;; Copyright © 2021 Renzo Poddighe <renzo@poddighe.nl>
+;;; Copyright © 2021 Paul A. Patience <paul@apatience.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2871,3 +2872,57 @@ Pressing the key again will cycle to the application's next window,
 if there's more than one.")
     (home-page "https://github.com/mkropat/jumpapp")
     (license license:expat)))
+
+(define-public xkbset
+  (package
+    (name "xkbset")
+    (version "0.6")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://faculty.missouri.edu/~stephen/software/"
+                           name "/" name "-" version ".tar.gz"))
+       (sha256
+        (base32 "199mlm127zk1lr8nrq22n68l2l8cjwc4cgwd67rg1i6497n2y0xc"))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("libx11" ,libx11)
+       ("perl" ,perl)
+       ("perl-tk" ,perl-tk)))
+    (arguments
+     `(#:tests? #f                      ; There are none.
+       #:make-flags
+       `(,,(string-append "CC=" (cc-for-target))
+         ,(string-append "X11PREFIX=" %output)
+         ,(string-append "X11BASE=" (assoc-ref %build-inputs "libx11"))
+         ,(string-append "INSTALL_MAN1=" %output "/share/man/man1"))
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (add-before 'install 'create-install-directories
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (mkdir-p out)
+               (with-directory-excursion out
+                 (for-each mkdir-p '("bin" "share/man/man1"))))
+             #t))
+         (add-after 'install 'wrap-perl-script
+           (lambda* (#:key outputs #:allow-other-keys)
+             (wrap-program (string-append (assoc-ref outputs "out")
+                                          "/bin/xkbset-gui")
+               `("PERL5LIB" ":" prefix (,(getenv "PERL5LIB"))))
+             #t))
+         (replace 'install-license-files
+           (lambda* (#:key outputs #:allow-other-keys)
+             (install-file "COPYRIGHT"
+                           (string-append (assoc-ref outputs "out")
+                                          "/share/doc/" ,name "-" ,version))
+             #t)))))
+    (home-page "https://faculty.missouri.edu/~stephen/software/")
+    (synopsis "User-preference utility for XKB extensions for X")
+    (description
+     "This is a program to help manage many of the XKB features of the X Window
+System.  This includes such features as MouseKeys, AccessX, StickyKeys,
+BounceKeys, and SlowKeys.  It includes a graphical program to help with
+MouseKeys-acceleration management.")
+    (license license:bsd-3)))
-- 
2.31.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#48892: [PATCH] gnu: Add xkbset.
  2021-06-09 12:18       ` Paul A. Patience
@ 2021-06-11 22:42         ` Ludovic Courtès
  0 siblings, 0 replies; 6+ messages in thread
From: Ludovic Courtès @ 2021-06-11 22:42 UTC (permalink / raw)
  To: Paul A. Patience; +Cc: 48892@debbugs.gnu.org, Maxime Devos

Hi,

"Paul A. Patience" <paul@apatience.com> skribis:

> From 65b9463e159f0e3ff1ae0c4a0faca08b0c22ed81 Mon Sep 17 00:00:00 2001
> From: "Paul A. Patience" <paul@apatience.com>
> Date: Wed, 9 Jun 2021 08:07:44 -0400
> Subject: [PATCH] gnu: Add xkbset.
>
> * gnu/packages/xdisorg.scm (xkbset): New variable.

Applied, thanks!

Ludo’.




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-06-11 22:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-07  0:37 [bug#48892] [PATCH] gnu: Add xkbset Paul A. Patience
2021-06-07 10:04 ` Maxime Devos
2021-06-07 12:40   ` Paul A. Patience
2021-06-08 21:23     ` Ludovic Courtès
2021-06-09 12:18       ` Paul A. Patience
2021-06-11 22:42         ` bug#48892: " Ludovic Courtès

all messages for Guix-related lists mirrored at yhetil.org

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/guix

Example config snippet for mirrors.


AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git