[PACKAGE] Add cl-svg, inferior-shell, fare-mop, cl-png

  • Done
  • quality assurance status badge
Details
2 participants
  • Guillaume Le Vaillant
  • Sharlatan Hellseher
Owner
unassigned
Submitted by
Sharlatan Hellseher
Severity
normal
S
S
Sharlatan Hellseher wrote on 17 Apr 2021 23:08
(address . guix-patches@gnu.org)
CAO+9K5qzK5QYDpj_u=xqTK+uL0NxSdDVcyvdW9+wXJ8u7hGkXg@mail.gmail.com
Hi Guix team!
Preparation list of patches for art generation system Weir
I've packed it but it's failed on ECL build with
;;; Warning: ;;; in file various.lisp, position 144 ;;; at
(DEFCONSTANT PII ...) ;;; ! The expression 6.283185307179586477l0 is
not of the expected type DOUBLE-FLOAT ;;; Warning: ;;; in file
various.lisp, position 195 ;;; at (DEFCONSTANT PI5 ...) ;;; ! The
expression 1.5707963267948966193l0 is not of the expected type
DOUBLE-FLOAT
Maintainer has not option for opening an issue.
For someone who has more knowledge in CL to check
--
… ??? ????? - ???????????? ?????????????? ?????? ??????? ????????
????? ????? ????? ? ??? ??????, ??????????? ????? ???????, ??
?????????? ?? ? ????????? ??????? ????? ? ?????????????????.
From 4c88394f72e61a7f7170075ca32d8e42b1acc645 Mon Sep 17 00:00:00 2001
From: Sharlatan Hellseher <sharlatanus@gmail.com>
Date: Sat, 17 Apr 2021 21:37:45 +0100
Subject: [PATCH] gnu: Add cl-png

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

Toggle diff (62 lines)
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index 7ee1957169..6c9353a9e2 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,47 @@ 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 "2.1.2" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ljosa/cl-png")
+ (commit commit)))
+ (file-name (git-file-name name 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 Common Lisp system @code{PNG} to operate with
+Portable Network Graphics file format.")
+ (license license:lgpl2.0))))
+
+(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"))
--
2.30.2
From add3e4d659e3cd8d065940b35d9ade590fe6714d Mon Sep 17 00:00:00 2001
From: Sharlatan Hellseher <sharlatanus@gmail.com>
Date: Sat, 17 Apr 2021 21:39:26 +0100
Subject: [PATCH] gnu: Add fare-mop

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

Toggle diff (51 lines)
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index 6c9353a9e2..2269431275 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -5683,6 +5683,44 @@ basic everyday functions and macros.")
(define-public ecl-fare-utils
(sbcl-package->ecl-package sbcl-fare-utils))
+(define-public sbcl-fare-mop
+ (let ((commit "538aa94590a0354f382eddd9238934763434af30")
+ (revision "1"))
+ (package
+ (name "sbcl-fare-mop")
+ (version (git-version "1.0.1" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ ;; Other mirror, Fare is most active on GitHub.
+ ;; https://gitlab.common-lisp.net/frideau/fare-mop
+ (url "https://github.com/fare/fare-mop")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0maxs8392953fhnaa6zwnm2mdbhxjxipp4g4rvypm06ixr6pyv1c"))))
+ (build-system asdf-build-system/sbcl)
+ (inputs
+ `(("close-mop" ,sbcl-closer-mop)
+ ("fare-utils" ,sbcl-fare-utils)))
+ (home-page "https://github.com/fare/fare-mop")
+ (synopsis "General purpose Common Lisp utilities using the Meta-Object Project")
+ (description
+ "FARE-MOP is a small collection of utilities using the MOP. It notably
+contains a method SIMPLE-PRINT-OBJECT, and a mixin SIMPLE-PRINT-OBJECT-MIXIN
+that allow you to trivially define PRINT-OBJECT methods that print the
+interesting slots in your objects, which is great for REPL interaction and
+debugging.")
+ (license license:unlicense))))
+
+(define-public ecl-fare-mop
+ (sbcl-package->ecl-package sbcl-fare-mop))
+
+(define-public cl-fare-mop
+ (sbcl-package->cl-source-package sbcl-fare-mop))
+
(define-public sbcl-trivial-utf-8
(let ((commit "4d427cfbb1c452436a0efb71c3205c9da67f718f")
(revision "1"))
--
2.30.2
From 86e28c08c10ce5039beea1089dc2f23feb8f58ea Mon Sep 17 00:00:00 2001
From: Sharlatan Hellseher <sharlatanus@gmail.com>
Date: Sat, 17 Apr 2021 21:41:15 +0100
Subject: [PATCH] gnu: Add inferior-shell

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

Toggle diff (50 lines)
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index 2269431275..bfa0c1a488 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -5721,6 +5721,43 @@ debugging.")
(define-public cl-fare-mop
(sbcl-package->cl-source-package sbcl-fare-mop))
+(define-public sbcl-inferior-shell
+ (let ((commit "15c2d04a7398db965ea1c3ba2d49efa7c851f2c2")
+ (revision "1"))
+ (package
+ (name "sbcl-inferior-shell")
+ (version (git-version "2.0.5" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ ;; Other mirror, Fare is most active on GitHub.
+ ;; https://gitlab.common-lisp.net/frideau/inferior-shell
+ (url "https://github.com/fare/inferior-shell")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "02qx37zzk5j4xmwh77k2qa2wvnzvaj6qml5dh2q7b6b1ljvgcj4m"))))
+ (build-system asdf-build-system/sbcl)
+ (inputs
+ `(("alexandira" ,sbcl-alexandria)
+ ("trivia" ,sbcl-trivia)
+ ("fare-utils" ,sbcl-fare-utils)
+ ("fare-quasiquote" ,sbcl-fare-quasiquote)
+ ("fare-mop" ,sbcl-fare-mop)))
+ (home-page "https://github.com/fare/inferior-shell")
+ (synopsis "Spawn local or remote processes and shell pipes")
+ (description
+ "This package provides Common Lisp system helping in scripting, it uses
+@code{uiop:run-program} as a backend.")
+ (license license:expat))))
+
+(define-public ecl-inferior-shell
+ (sbcl-package->ecl-package sbcl-inferior-shell))
+
+(define-public cl-inferior-shell
+ (sbcl-package->cl-source-package sbcl-fare-mop))
+
(define-public sbcl-trivial-utf-8
(let ((commit "4d427cfbb1c452436a0efb71c3205c9da67f718f")
(revision "1"))
--
2.30.2
From 9da7dd17ff3e5a86c3af91d3e764637bbfbb0df0 Mon Sep 17 00:00:00 2001
From: Sharlatan Hellseher <sharlatanus@gmail.com>
Date: Sat, 17 Apr 2021 21:44:09 +0100
Subject: [PATCH] gnu: Add cl-svg

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

Toggle diff (42 lines)
diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm
index bfa0c1a488..a0cd436066 100644
--- a/gnu/packages/lisp-xyz.scm
+++ b/gnu/packages/lisp-xyz.scm
@@ -9341,6 +9341,35 @@ Portable Network Graphics file format.")
(define-public cl-png
(sbcl-package->cl-source-package sbcl-png))
+(define-public sbcl-cl-svg
+ (let ((commit "1e988ebd2d6e2ee7be4744208828ef1b59e5dcdc")
+ (revision "1"))
+ (package
+ (name "sbcl-cl-svg")
+ (version (git-version "0.0.3" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/wmannis/cl-svg")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "11rmzimy6j7ln7q5y1h2kw1225rsfb6fpn89qjcq7h5lc8fay0wz"))))
+ (build-system asdf-build-system/sbcl)
+ (home-page "https://github.com/wmannis/cl-svg")
+ (synopsis "Write SVG file format")
+ (description
+ "This package provides Common Lisp system @code{CL-SVG} to produce
+Scalable Vector Graphics files.")
+ (license license:expat))))
+
+(define-public ecl-cl-svg
+ (sbcl-package->ecl-package sbcl-cl-svg))
+
+(define-public cl-svg
+ (sbcl-package->cl-source-package sbcl-fare-mop))
+
(define-public sbcl-nodgui
(let ((commit "4a9c2e7714b278fbe97d198c56f54ea87290001d")
(revision "1"))
--
2.30.2
G
G
Guillaume Le Vaillant wrote on 19 Apr 2021 17:54
(name . Sharlatan Hellseher)(address . sharlatanus@gmail.com)(address . 47851-done@debbugs.gnu.org)
87lf9ei827.fsf@yamatai
Patches pushed as 1cef75faaebec55d0c5f1c03aed8deebff1dbad4 and
following with a few fixes. Thanks

Sharlatan Hellseher <sharlatanus@gmail.com> skribis:

Toggle quote (17 lines)
> Hi Guix team!
>
> Preparation list of patches for art generation system Weir
> I've packed it but it's failed on ECL build with
>
> ;;; Warning: ;;; in file various.lisp, position 144 ;;; at
> (DEFCONSTANT PII ...) ;;; ! The expression 6.283185307179586477l0 is
> not of the expected type DOUBLE-FLOAT ;;; Warning: ;;; in file
> various.lisp, position 195 ;;; at (DEFCONSTANT PI5 ...) ;;; ! The
> expression 1.5707963267948966193l0 is not of the expected type
> DOUBLE-FLOAT
>
> Maintainer has not option for opening an issue.
>
> For someone who has more knowledge in CL to check
> https://github.com/Hellseher/guix-channel/blob/main/ffab/packages/lisp-xyz.scm#L1467

I think it's a bug in the "various.lisp" file. Inside it there is:

Toggle snippet (6 lines)
(declaim (type double-float PII PI5))

(defconstant PII (the double-float #.(* PI 2d0)))
(defconstant PI5 (the double-float #.(* PI 0.5d0)))

However the Common Lisp spec indicates that 'pi' is a 'long-float'. It
works with SBCL because it implements 'double-float' and 'long-float' as
the same type (which is allowed according to the spec). However in ECL
the types are different ('long-float' has more precision than
'double-float').

Converting 'pi' to a 'double-float' should make the code work in both
SBCL and ECL (note: I've not tested):

Toggle snippet (5 lines)
(declaim (type double-float PII PI5))

(defconstant PII (the double-float #.(* (float PI 1.0d0) 2d0)))
(defconstant PI5 (the double-float #.(* (float PI 1.0d0) 0.5d0)))
-----BEGIN PGP SIGNATURE-----

iIUEAREKAC0WIQTLxZxm7Ce5cXlAaz5r6CCK3yH+PwUCYH2nsA8cZ2x2QHBvc3Rl
by5uZXQACgkQa+ggit8h/j+BtgD+MQdOkIie8BWZqHpNtP5wtKjhfnpAcBaVLm53
/w89dmEA/0wuADQMqGbwhe0ExBTIJDVPhv8gZMPnuAvoitfylvA4
=EioJ
-----END PGP SIGNATURE-----

Closed
?