unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Sharlatan Hellseher <sharlatanus@gmail.com>
To: 48708@debbugs.gnu.org
Subject: [bug#48708] [PATCH 2/3]: gnu: Add cl-gamepad
Date: Thu, 27 May 2021 21:27:14 +0000	[thread overview]
Message-ID: <CAO+9K5rJOOsF=16afEVd13QLeuMb0nsi9GEUavCSzyn12w-9LQ@mail.gmail.com> (raw)
In-Reply-To: <CAO+9K5rNGZdVgyU4wbsBwny=NFS+7vPfu-QQMngYSGWKRw=AJQ@mail.gmail.com>

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

-- 
… наш разум - превосходная объяснительная машина которая способна
найти смысл почти в чем угодно, истолковать любой феномен, но
совершенно не в состоянии принять мысль о непредсказуемости.

[-- Attachment #2: 0002-gnu-Add-cl-gamepad.patch --]
[-- Type: text/x-patch, Size: 3161 bytes --]

From 3a00de74ea423a1ecc2fe2a8d3b281bd391436dd Mon Sep 17 00:00:00 2001
From: Sharlatan Hellseher <sharlatanus@gmail.com>
Date: Thu, 27 May 2021 22:05:17 +0100
Subject: [PATCH 2/3] gnu: Add cl-gamepad

* gnu/packages/lisp-xyz.scm: (sbcl-cl-gamepad, ecl-cl-gamepad,
  cl-gamepad): New variables
---
 gnu/packages/lisp-xyz.scm | 55 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index dcdf7b3f50..33d4bf99d0 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -90,6 +90,7 @@
   #:use-module (gnu packages web)
   #:use-module (gnu packages webkit)
   #:use-module (gnu packages xdisorg)
+  #:use-module (gnu packages xorg)
   #:use-module (ice-9 match)
   #:use-module (srfi srfi-1)
   #:use-module (srfi srfi-19))
@@ -17221,3 +17222,57 @@ the generic visualisation of graphs in this format.")
 
 (define-public cl-flow
   (sbcl-package->cl-source-package sbcl-flow))
+
+(define-public sbcl-cl-gamepad
+  (let ((commit "2bb8f9eef29f8968fd12d0b4060314bf925169ef")
+        (revision "1"))
+    (package
+      (name "sbcl-cl-gamepad")
+      (version (git-version "3.0.0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/Shirakumo/cl-gamepad")
+               (commit commit)))
+         (file-name (git-file-name "cl-gamepad" version))
+         (sha256
+          (base32 "18b9fainnswm0fb7lhkrkx3dxipyw0s7lzdjyqw7mchxpvicz9rv"))))
+      (build-system asdf-build-system/sbcl)
+      (arguments
+       `(#:phases
+         (modify-phases %standard-phases
+           ;; FIXME: (Sharlatan-20210527T212052+0100):
+           ;; default-device-mappings.lisp contains auto-generated code if it
+           ;; kept unsubstituted build fails with:
+           ;;
+           ;;  The function ORG.SHIRAKUMO.FRAF.GAMEPAD:LIST-DEVICES is undefined.
+           ;;
+           (add-after 'unpack 'skip-load-default-device-mappings
+             (lambda _
+               (substitute* "cl-gamepad.asd"
+                 ((".*default-device-mappings.*") ""))))
+           (add-after 'unpack 'patch-evdev-lib-path
+             (lambda* (#:key inputs #:allow-other-keys)
+               (substitute* "evdev-cffi.lisp"
+                 (("libevdev.so" all)
+                  (string-append
+                   (assoc-ref inputs "libevdev")
+                   "/lib/" all))))))))
+      (inputs
+       `(("cffi" ,sbcl-cffi)
+         ("documentation-utils" ,sbcl-documentation-utils)
+         ("libevdev" ,libevdev)
+         ("trivial-features" ,sbcl-trivial-features)))
+      (home-page "https://shirakumo.github.io/cl-gamepad/")
+      (synopsis "Library for access to gamepads and joystick input devices")
+      (description
+       "This is a library to provide cross-platform access to gamepads,
+joysticks, and other such HID devices.")
+      (license license:zlib))))
+
+(define-public ecl-cl-gamepad
+  (sbcl-package->ecl-package sbcl-cl-gamepad))
+
+(define-public cl-gamepad
+  (sbcl-package->cl-source-package sbcl-cl-gamepad))
-- 
2.31.1


  parent reply	other threads:[~2021-05-27 21:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-27 21:24 [bug#48708] [PATCH 0/3] Add Common Lisp game engine - trial Sharlatan Hellseher
2021-05-27 21:26 ` [bug#48708] [PATCH 1/3]: gnu: Add cl-flow Sharlatan Hellseher
2021-05-27 21:27 ` Sharlatan Hellseher [this message]
2021-06-08  9:22   ` [bug#48708] [PATCH 2/3]: gnu: Add cl-gamepad Guillaume Le Vaillant
2021-06-08 20:05     ` Sharlatan Hellseher
2021-06-08 22:01       ` Sharlatan Hellseher
2021-06-12 20:57         ` Sharlatan Hellseher
2021-06-24 12:33           ` bug#48708: " Guillaume Le Vaillant
2021-05-27 21:27 ` [bug#48708] [PATCH 3/3]: gnu: Add cl-trial Sharlatan Hellseher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAO+9K5rJOOsF=16afEVd13QLeuMb0nsi9GEUavCSzyn12w-9LQ@mail.gmail.com' \
    --to=sharlatanus@gmail.com \
    --cc=48708@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).