diff mbox series

[bug#48708,2/3] : gnu: Add cl-gamepad

Message ID CAO+9K5rJOOsF=16afEVd13QLeuMb0nsi9GEUavCSzyn12w-9LQ@mail.gmail.com
State Accepted
Headers show
Series Add Common Lisp game engine - trial | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

Sharlatan Hellseher May 27, 2021, 9:27 p.m. UTC
-- 
… наш разум - превосходная объяснительная машина которая способна
найти смысл почти в чем угодно, истолковать любой феномен, но
совершенно не в состоянии принять мысль о непредсказуемости.

Comments

Guillaume Le Vaillant June 8, 2021, 9:22 a.m. UTC | #1
I pushed the patch for cl-flow as
c03da7edb0bc4bb48c2f8e00e1ef5932c399f800.

Concerning cl-gamepad, is the library working even when all the gamepad
mappings are missing?

I took a quick look to the issue with the 'list-devices' function, and
apparently the compiler is expecting it to be in the
'org.shirakumo.fraf.gamepad' package, however it is defined in the
'org.shirakumo.fraf.gamepad.impl' package.
Maybe you could ask upstream about it?
Sharlatan Hellseher June 8, 2021, 8:05 p.m. UTC | #2
Hi Guillaume,

Thanks for the clue, I've open an issue with Shinmera, but he is not
responsive in general so it could take some time when he notices that
open issue.

https://github.com/Shirakumo/cl-gamepad/issues/8

On Tue, 8 Jun 2021 at 09:22, Guillaume Le Vaillant <glv@posteo.net> wrote:
>
> I pushed the patch for cl-flow as
> c03da7edb0bc4bb48c2f8e00e1ef5932c399f800.
>
> Concerning cl-gamepad, is the library working even when all the gamepad
> mappings are missing?
>
> I took a quick look to the issue with the 'list-devices' function, and
> apparently the compiler is expecting it to be in the
> 'org.shirakumo.fraf.gamepad' package, however it is defined in the
> 'org.shirakumo.fraf.gamepad.impl' package.
> Maybe you could ask upstream about it?



-- 

… наш разум - превосходная объяснительная машина которая способна
найти смысл почти в чем угодно, истолковать любой феномен, но
совершенно не в состоянии принять мысль о непредсказуемости.
Sharlatan Hellseher June 8, 2021, 10:01 p.m. UTC | #3
Hi,

I think we hitting this issue (I guess) when ASDF does not load
trivial-fiature during :linux feature check.

https://github.com/quicklisp/quicklisp-client/pull/122

Also cl-gamepad.asd has some not trivial layout.

On Tue, 8 Jun 2021 at 20:05, Sharlatan Hellseher <sharlatanus@gmail.com> wrote:
>
> Hi Guillaume,
>
> Thanks for the clue, I've open an issue with Shinmera, but he is not
> responsive in general so it could take some time when he notices that
> open issue.
>
> https://github.com/Shirakumo/cl-gamepad/issues/8
>
> On Tue, 8 Jun 2021 at 09:22, Guillaume Le Vaillant <glv@posteo.net> wrote:
> >
> > I pushed the patch for cl-flow as
> > c03da7edb0bc4bb48c2f8e00e1ef5932c399f800.
> >
> > Concerning cl-gamepad, is the library working even when all the gamepad
> > mappings are missing?
> >
> > I took a quick look to the issue with the 'list-devices' function, and
> > apparently the compiler is expecting it to be in the
> > 'org.shirakumo.fraf.gamepad' package, however it is defined in the
> > 'org.shirakumo.fraf.gamepad.impl' package.
> > Maybe you could ask upstream about it?
>
>
>
> --
>
> … наш разум - превосходная объяснительная машина которая способна
> найти смысл почти в чем угодно, истолковать любой феномен, но
> совершенно не в состоянии принять мысль о непредсказуемости.



-- 

… наш разум - превосходная объяснительная машина которая способна
найти смысл почти в чем угодно, истолковать любой феномен, но
совершенно не в состоянии принять мысль о непредсказуемости.
Sharlatan Hellseher June 12, 2021, 8:57 p.m. UTC | #4
Hi,

Shinmera did not provide any useful information on this issue and
pointed on the problem somewhere in the OS itself.

I've played a little with asdf:load-system in REPL and I could load it
and evaluate asdf:compile-system but when compile directly it exits
with the same error

--8<---------------cut here---------------start------------->8---
CL-USER> (asdf:compile-system :cl-gamepad)
; Debugger entered on #<UNDEFINED-FUNCTION LIST-DEVICES {1002B438B3}>
[1] CL-USER>
;
; compilation unit aborted
;   caught 1 fatal ERROR condition

; Evaluation aborted on #<SB-KERNEL::RETRY-UNDEFINED-FUNCTION
LIST-DEVICES {1002EA0003}>
CL-USER> (asdf:load-system :cl-gamepad)
; compiling file "/mnt/library/code/cl-gamepad/documentation.lisp"
(written 12 JUN 2021 09:37:42 PM):
; processing (IN-PACKAGE #:ORG.SHIRAKUMO.FRAF.GAMEPAD)
; processing (DOCUMENTATION-UTILS:DEFINE-DOCS (FUNCTION CONFIGURE-DEVICE ...))
; processing (DOCUMENTATION-UTILS:DEFINE-DOCS (TYPE
*DEFAULT-MAPPINGS-FILE* ...) ...)
; processing (DOCUMENTATION-UTILS:DEFINE-DOCS (VARIABLE +LABELS+ ...) ...)

; wrote /home/sharlatan/.cache/common-lisp/sbcl-2.1.5-linux-x64/mnt/library/code/cl-gamepad/documentation-tmpGHU3ALSV.fasl
; compilation finished in 0:00:00.004

T
CL-USER> (asdf:compile-system :cl-gamepad)
T
--8<---------------cut here---------------start------------->8---


On Tue, 8 Jun 2021 at 22:01, Sharlatan Hellseher <sharlatanus@gmail.com> wrote:
>
> Hi,
>
> I think we hitting this issue (I guess) when ASDF does not load
> trivial-fiature during :linux feature check.
>
> https://github.com/quicklisp/quicklisp-client/pull/122
>
> Also cl-gamepad.asd has some not trivial layout.
>
> On Tue, 8 Jun 2021 at 20:05, Sharlatan Hellseher <sharlatanus@gmail.com> wrote:
> >
> > Hi Guillaume,
> >
> > Thanks for the clue, I've open an issue with Shinmera, but he is not
> > responsive in general so it could take some time when he notices that
> > open issue.
> >
> > https://github.com/Shirakumo/cl-gamepad/issues/8
> >
> > On Tue, 8 Jun 2021 at 09:22, Guillaume Le Vaillant <glv@posteo.net> wrote:
> > >
> > > I pushed the patch for cl-flow as
> > > c03da7edb0bc4bb48c2f8e00e1ef5932c399f800.
> > >
> > > Concerning cl-gamepad, is the library working even when all the gamepad
> > > mappings are missing?
> > >
> > > I took a quick look to the issue with the 'list-devices' function, and
> > > apparently the compiler is expecting it to be in the
> > > 'org.shirakumo.fraf.gamepad' package, however it is defined in the
> > > 'org.shirakumo.fraf.gamepad.impl' package.
> > > Maybe you could ask upstream about it?
> >
> >
> >
> > --
> >
> > … наш разум - превосходная объяснительная машина которая способна
> > найти смысл почти в чем угодно, истолковать любой феномен, но
> > совершенно не в состоянии принять мысль о непредсказуемости.
>
>
>
> --
>
> … наш разум - превосходная объяснительная машина которая способна
> найти смысл почти в чем угодно, истолковать любой феномен, но
> совершенно не в состоянии принять мысль о непредсказуемости.



--

… наш разум - превосходная объяснительная машина которая способна
найти смысл почти в чем угодно, истолковать любой феномен, но
совершенно не в состоянии принять мысль о непредсказуемости.
Guillaume Le Vaillant June 24, 2021, 12:33 p.m. UTC | #5
Sharlatan Hellseher <sharlatanus@gmail.com> skribis:

> Shinmera did not provide any useful information on this issue and
> pointed on the problem somewhere in the OS itself.
>
> I've played a little with asdf:load-system in REPL and I could load it
> and evaluate asdf:compile-system but when compile directly it exits
> with the same error

I changed your package definition to use a custom build phase using
'asdf:load-system' instead of the usual 'asdf:compile-system' as
a workaround. However I'm don't know why one works and the other
doesn't...

Patches pushed as d09184ce2eafd1c5f7d4d1962c44b0becfaede16 and
following.
Thanks.
diff mbox series

Patch

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