From patchwork Mon Jun 7 12:40:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Paul A. Patience" X-Patchwork-Id: 30006 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id CCFFA27BC81; Mon, 7 Jun 2021 13:41:14 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 4A80C27BC78 for ; Mon, 7 Jun 2021 13:41:14 +0100 (BST) Received: from localhost ([::1]:40164 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lqEZ7-0000rz-8V for patchwork@mira.cbaines.net; Mon, 07 Jun 2021 08:41:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36096) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lqEYx-0000pt-TU for guix-patches@gnu.org; Mon, 07 Jun 2021 08:41:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:43161) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lqEYw-0005uf-FB for guix-patches@gnu.org; Mon, 07 Jun 2021 08:41:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lqEYw-0006P4-DW for guix-patches@gnu.org; Mon, 07 Jun 2021 08:41:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#48892] [PATCH] gnu: Add xkbset. Resent-From: "Paul A. Patience" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 07 Jun 2021 12:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48892 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxime Devos Cc: "48892@debbugs.gnu.org" <48892@debbugs.gnu.org> Received: via spool by 48892-submit@debbugs.gnu.org id=B48892.162306962724562 (code B ref 48892); Mon, 07 Jun 2021 12:41:02 +0000 Received: (at 48892) by debbugs.gnu.org; 7 Jun 2021 12:40:27 +0000 Received: from localhost ([127.0.0.1]:54707 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lqEYJ-0006Nz-6I for submit@debbugs.gnu.org; Mon, 07 Jun 2021 08:40:27 -0400 Received: from mail-40134.protonmail.ch ([185.70.40.134]:49853) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lqEYE-0006Nj-I3 for 48892@debbugs.gnu.org; Mon, 07 Jun 2021 08:40:21 -0400 Date: Mon, 07 Jun 2021 12:40:06 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apatience.com; s=protonmail3; t=1623069611; bh=ujT7zxG5IOwks8xxTSTY7hO3RacY2iaS5NwVrmzShVg=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=BEL5zmT4l4w0gIUy2Mjdqk3eoq1ACXdmVMnT2v7gTfAo374UPhQgSaKg4wFM1CTvx yBaj1vvR47j6CiTT1IuQmhbxmtECeK984/Z18LhVIX3g7Zcwq6PTOAyCfW4YmglB17 sII2le2COAVpEmtX8gxO9KqWQsPqHAVw874r3n8OwWhFOFbOWO3JqsgUKR3xLgyi5v wR5bAmiRHtkCHraq4sZcxgoIuy3OBxRkA25EItnKYuZHGbeuypTuqkDmu0sI5CpAKn vmwg8KClvINfJdyFTLMCCadtRhb4G4NRhE+QeE0EXXHYGA0kZEbkG6GxL2NRa+vOM/ ZQ+yuGAGCz1TQ== From: "Paul A. Patience" Message-ID: <5TFn9p50yemJDjZyyOinesgLnYyuQkLRDYtTeC2ZNhsOsD3rWIlGnAXbBgiXOshGdKA5vYPukXWpPcjCoWObz5i5wXzx0PWgHNPEl5jkJmg=@apatience.com> In-Reply-To: <12d1dd5236c1e122df7df3416f6acd3a7893878d.camel@telenet.be> References: <8bHcC11E1nCm3IcYXyjT8kdLXscTRtadOPwnuABvrLCbarM8i42900GRRYpvewZFMVbPibP_oNC8iFRm8i3hF6h6UncuC6D8ohS5oaIKJvA=@apatience.com> <12d1dd5236c1e122df7df3416f6acd3a7893878d.camel@telenet.be> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: "Paul A. Patience" Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches On Monday, June 7, 2021 6:04 AM, Maxime Devos 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 From 59a4d628e2179c8a768c7fdf5401f2f8193c6893 Mon Sep 17 00:00:00 2001 From: "Paul A. Patience" 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 ;;; Copyright © 2021 Nicolò Balzarotti ;;; Copyright © 2021 Matthew James Kraai +;;; Copyright © 2021 Paul A. Patience ;;; ;;; 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