summary refs log tree commit diff
path: root/gnu/packages
diff options
context:
space:
mode:
authorSharlatan Hellseher <sharlatanus@gmail.com>2021-04-02 21:46:37 +0100
committerGuillaume Le Vaillant <glv@posteo.net>2021-04-03 14:58:43 +0200
commit83ecb38148b0edd7f678b078373255f746a4090b (patch)
tree5d3a54486932e4f155a8b8a112c9d05545da643d /gnu/packages
parent39f69aff21720c8d3c884200fb301a23346f8c6b (diff)
downloadguix-83ecb38148b0edd7f678b078373255f746a4090b.tar.gz
gnu: Add cl-opengl.
* gnu/packages/lisp-xyz.scm: (sbcl-cl-opengl, cl-opengl, ecl-cl-opengl):
  New variables.

Signed-off-by: Guillaume Le Vaillant <glv@posteo.net>
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/lisp-xyz.scm53
1 files changed, 53 insertions, 0 deletions
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index e1a5a9a7a6..9eb937314e 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -64,6 +64,7 @@
   #:use-module (gnu packages file)
   #:use-module (gnu packages fonts)
   #:use-module (gnu packages fontutils)
+  #:use-module (gnu packages gl)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages imagemagick)
@@ -15564,3 +15565,55 @@ immediately loaded.")
 
 (define-public cl-conspack
   (sbcl-package->cl-source-package sbcl-cl-conspack))
+
+(define-public sbcl-cl-opengl
+  (let ((commit "e2d83e0977b7e7ac3f3d348d8ccc7ccd04e74d59")
+        (revision "1"))
+    (package
+      (name "sbcl-cl-opengl")
+      (version (git-version "0.1.0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/3b/cl-opengl")
+               (commit commit)))
+         (file-name (git-file-name "cl-opengl" version))
+         (sha256
+          (base32 "0mhqmll09f079pnd6mgswz9nvr6h5n27d4q7zpmm2igf1v460id7"))))
+      (build-system asdf-build-system/sbcl)
+      (arguments
+       `(#:asd-systems '("cl-opengl" "cl-glu" "cl-glut")
+         #:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'patch-lib-path
+             (lambda* (#:key inputs #:allow-other-keys)
+               (substitute* "gl/library.lisp"
+                 (("libGL.so" all)
+                  (string-append (assoc-ref inputs "mesa") "/lib/" all)))
+               (substitute* "glu/library.lisp"
+                 (("libGLU.so" all)
+                  (string-append (assoc-ref inputs "glu") "/lib/" all)))
+               (substitute* "glut/library.lisp"
+                 (("libglut.so" all)
+                  (string-append (assoc-ref inputs "freeglut") "/lib/" all)))
+               #t)))))
+      (inputs
+       `(("alexandria" ,sbcl-alexandria)
+         ("cffi" ,sbcl-cffi)
+         ("float-features" ,sbcl-float-features)
+         ("freeglut" ,freeglut)
+         ("glu" ,glu)
+         ("mesa" ,mesa)))
+      (home-page "https://github.com/3b/cl-opengl")
+      (synopsis "Common Lisp bindings to OpenGL, GLU and GLUT APIs")
+      (description
+       "This package provides a set of bindings and utilities for accessing the
+OpenGL (Mesa), GLU and GLUT (FreeGLUT) APIs using CFFI.")
+      (license license:bsd-3))))
+
+(define-public ecl-cl-opengl
+  (sbcl-package->ecl-package sbcl-cl-opengl))
+
+(define-public cl-opengl
+  (sbcl-package->cl-source-package sbcl-cl-opengl))