[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
20/29: gnu: sbcl: Enable sb-gmp, sb-mpfr and install shared library.
From: |
guix-commits |
Subject: |
20/29: gnu: sbcl: Enable sb-gmp, sb-mpfr and install shared library. |
Date: |
Thu, 30 Jun 2022 14:02:16 -0400 (EDT) |
ambrevar pushed a commit to branch master
in repository guix.
commit 0eac11139a770703399751ea092419909203a8a8
Author: Pierre Neidhardt <mail@ambrevar.xyz>
AuthorDate: Thu Jun 30 18:58:25 2022 +0200
gnu: sbcl: Enable sb-gmp, sb-mpfr and install shared library.
* gnu/packages/lisp.scm (sbcl)[inputs]: Add gmp, mpfr.
[arguments]: Fix shared library makefile.
Fix contrib references to gmp and mpfr.
Add phase to build shared library.
Add phase to install shared library.
---
gnu/packages/lisp.scm | 28 +++++++++++++++++++++++++++-
1 file changed, 27 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm
index d59f11865b..af65d9327f 100644
--- a/gnu/packages/lisp.scm
+++ b/gnu/packages/lisp.scm
@@ -457,7 +457,9 @@ an interpreter, a compiler, a debugger, and much more.")
(texlive-updmap.cfg (list texlive-tex-texinfo))
which))
(inputs
- (list (list zstd "lib")))
+ (list gmp ; for sb-gmp
+ mpfr ; for sb-mpfr
+ (list zstd "lib")))
(arguments
`(#:modules ((guix build gnu-build-system)
(guix build utils)
@@ -539,6 +541,20 @@ an interpreter, a compiler, a debugger, and much more.")
(("\\(deftest grent\\.[12]" all)
(string-append "#+nil ;disabled by Guix\n" all))))
#t))
+ (add-before 'build 'fix-shared-library-makefile
+ (lambda _
+ (substitute* '("src/runtime/GNUmakefile")
+ ((" cc") " $(CC)"))
+ #t))
+ (add-before 'build 'fix-contrib-library-path
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((gmp (assoc-ref inputs "gmp"))
+ (mpfr (assoc-ref inputs "mpfr")))
+ (substitute* '("contrib/sb-gmp/gmp.lisp")
+ (("\"libgmp\\.so") (string-append "\"" gmp "/lib/libgmp.so")))
+ (substitute* '("contrib/sb-mpfr/mpfr.lisp")
+ (("\"libmpfr\\.so") (string-append "\"" mpfr
"/lib/libmpfr.so"))))
+ #t))
(replace 'build
(lambda* (#:key outputs #:allow-other-keys)
(setenv "CC" "gcc")
@@ -552,6 +568,10 @@ an interpreter, a compiler, a debugger, and much more.")
"--dynamic-space-size=3072"
"--with-sb-core-compression"
"--with-sb-xref-for-internals")))
+ (add-after 'build 'build-shared-library
+ (lambda* (#:key outputs #:allow-other-keys)
+ (setenv "CC" "gcc")
+ (invoke "sh" "make-shared-library.sh")))
(replace 'install
(lambda _
(invoke "sh" "install.sh")))
@@ -584,6 +604,12 @@ an interpreter, a compiler, a debugger, and much more.")
(string-append "(sb-ext:set-sbcl-source-location \""
source-dir "\")") )))
#t)))
+ (add-after 'install 'install-shared-library
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (lib-dir (string-append out "/lib")))
+ (install-file "src/runtime/libsbcl.so" lib-dir)
+ #t)))
(add-after 'install 'install-doc
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
- 22/29: gnu: Add mathkit., (continued)
- 22/29: gnu: Add mathkit., guix-commits, 2022/06/30
- 26/29: gnu: Add cl-geometry., guix-commits, 2022/06/30
- 28/29: gnu: Add cl-sdl2-ttf., guix-commits, 2022/06/30
- 29/29: gnu: Add sketch., guix-commits, 2022/06/30
- 17/29: gnu: Add slot-extra-options., guix-commits, 2022/06/30
- 03/29: gnu: Add cl-algebraic-data-type., guix-commits, 2022/06/30
- 16/29: gnu: sbcl-parachute: Update to 20210920., guix-commits, 2022/06/30
- 13/29: gnu: Add compiler-macro-notes., guix-commits, 2022/06/30
- 11/29: gnu: Add sealable-metaobjects., guix-commits, 2022/06/30
- 15/29: gnu: Add polymorphic-functions., guix-commits, 2022/06/30
- 20/29: gnu: sbcl: Enable sb-gmp, sb-mpfr and install shared library.,
guix-commits <=
- 21/29: gnu: Add sb-cga., guix-commits, 2022/06/30
- 23/29: gnu: Add sdl2kit., guix-commits, 2022/06/30
- 27/29: gnu: Add cl-sdl2-image., guix-commits, 2022/06/30