summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorSharlatan Hellseher <sharlatanus@gmail.com>2021-04-17 21:37:45 +0100
committerGuillaume Le Vaillant <glv@posteo.net>2021-04-19 17:06:31 +0200
commit1cef75faaebec55d0c5f1c03aed8deebff1dbad4 (patch)
tree0c1d9f4cdc707575060fdb1602e8e71e541b2b1e /gnu
parenta91844530f335ab353ff938286f81d267a564171 (diff)
downloadguix-1cef75faaebec55d0c5f1c03aed8deebff1dbad4.tar.gz
gnu: Add cl-png.
* gnu/packages/lisp-xyz.scm (sbcl-png, cl-png, ecl-png): New variables.

Signed-off-by: Guillaume Le Vaillant <glv@posteo.net>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/lisp-xyz.scm43
1 files changed, 43 insertions, 0 deletions
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index 93f9ea8e75..d896e91654 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -68,6 +68,7 @@
   #:use-module (gnu packages gl)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gtk)
+  #:use-module (gnu packages image)
   #:use-module (gnu packages imagemagick)
   #:use-module (gnu packages libevent)
   #:use-module (gnu packages libffi)
@@ -9224,6 +9225,48 @@ for reading and writing JPEG image files.")
 (define-public ecl-cl-jpeg
   (sbcl-package->ecl-package sbcl-cl-jpeg))
 
+(define-public sbcl-png
+  (let ((commit "11b965fe378fd0561abe3616b18ff03af5179648")
+        (revision "1"))
+    (package
+      (name "sbcl-png")
+      (version (git-version "0.6" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/ljosa/cl-png")
+               (commit commit)))
+         (file-name (git-file-name "cl-png" version))
+         (sha256
+          (base32 "173hqwpd0rwqf95mfx1h9l9c3i8bb0gvnpspzmmz3g5x3440czy4"))))
+      (build-system asdf-build-system/sbcl)
+      (arguments
+       `(#:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'fix-lib-paths
+             (lambda* (#:key inputs #:allow-other-keys)
+               (substitute* "libpng.lisp"
+                 (("\"libpng\"")
+                  (string-append "\""
+                                 (assoc-ref inputs "libpng")
+                                 "/lib/libpng\""))))))))
+      (inputs
+       `(("cffi" ,sbcl-cffi)
+         ("libpng" ,libpng)))
+      (home-page "https://github.com/ljosa/cl-png")
+      (synopsis "Read and write PNG file format")
+      (description
+       "This package provides a @code{PNG} Common Lisp system to operate with
+Portable Network Graphics file format.")
+      (license license:lgpl2.1))))
+
+(define-public ecl-png
+  (sbcl-package->ecl-package sbcl-png))
+
+(define-public cl-png
+  (sbcl-package->cl-source-package sbcl-png))
+
 (define-public sbcl-nodgui
   (let ((commit "4a9c2e7714b278fbe97d198c56f54ea87290001d")
         (revision "1"))