diff options
author | Ashish SHUKLA <ashish.is@lostca.se> | 2025-03-20 10:09:52 +0100 |
---|---|---|
committer | jgart <jgart@dismail.de> | 2025-03-23 21:48:02 -0500 |
commit | 9e8f4ba600d113d21f78ad05bbe466843131640a (patch) | |
tree | 43e672351971ecf729703c7ab75c60814fb33dc1 /gnu/packages/lisp.scm | |
parent | 740b933e5df16d9422a16e3e79e3ad5869c5c565 (diff) |
gnu: clasp-cl: Update to 2.7.0.
* gnu/packages/lisp.scm (clasp-cl): Update to 2.7.0.
[inputs]: Replace clang, and llvm with clang-toolchain. Switch to LLVM 19
as per upstream release notes. [#:phases]: Add fix-sh-paths phase to patch
"/bin/sh" references. Add install-lib phase to install libclasp.so file.
<configure>: Update ld-flags, and pass more arguments. <build>: Enable
parallel building.
Most of the changes here are derived from upstream[0].
[0] https://raw.githubusercontent.com/clasp-developers/clasp/refs/tags/2.7.0/guix/clasp.scm
Change-Id: Id66086e0fe67ed2db62d1a0913b31e3946188519
Signed-off-by: jgart <jgart@dismail.de>
Diffstat (limited to 'gnu/packages/lisp.scm')
-rw-r--r-- | gnu/packages/lisp.scm | 51 |
1 files changed, 35 insertions, 16 deletions
diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm index 1af71bc9a2..b5b5128c55 100644 --- a/gnu/packages/lisp.scm +++ b/gnu/packages/lisp.scm @@ -28,7 +28,7 @@ ;;; Copyright © 2023 Andrew Kravchuk <awkravchuk@gmail.com> ;;; Copyright © 2024 Andreas Enge <andreas@enge.fr> ;;; Copyright © 2024 bigbug <bigbookofbug@proton.me> -;;; Copyright © 2024 Ashish SHUKLA <ashish.is@lostca.se> +;;; Copyright © 2024, 2025 Ashish SHUKLA <ashish.is@lostca.se> ;;; Copyright © 2024 Omar Bassam <omar.bassam88@gmail.com> ;;; Copyright © 2024 Suhail Singh <suhail@bayesians.ca> ;;; Copyright © 2024 David Pflug <david@pflug.io> @@ -382,7 +382,7 @@ interface.") (define-public clasp-cl (package (name "clasp-cl") - (version "2.6.0") + (version "2.7.0") (source (origin (method url-fetch) @@ -390,16 +390,24 @@ interface.") "https://github.com/clasp-developers/clasp/releases/download/" version "/clasp-" version ".tar.gz")) (sha256 - (base32 "10jjhcid6qp64gx29iyy5rqqijwy8hrvx66f0xabdj8w3007ky39")))) + (base32 "1sf8m0w3d4kagf4chb7viqndnr152crpsy979ll61krcfxaybc4j")))) (build-system gnu-build-system) (inputs - (list boost clang-15 fmt `(,gcc "lib") gmp libelf libunwind llvm-15)) + (list boost clang-toolchain-19 fmt `(,gcc "lib") gmp libelf libunwind)) (native-inputs (list binutils-gold ninja pkg-config sbcl)) (arguments `(#:phases (modify-phases %standard-phases (delete 'check) + (add-after 'unpack 'fix-sh-paths + (lambda _ + (substitute* '("dependencies/quicklisp-client/asdf.lisp" + "src/lisp/modules/asdf/uiop/run-program.lisp" + "src/lisp/modules/asdf/uiop/launch-program.lisp" + "src/lisp/regression-tests/extensions.lisp") + (("\"/bin/sh\"") + (string-append "\"" (which "sh") "\""))))) (add-after 'unpack 'patch-koga (lambda* _ (call-with-port (open-file "src/koga/units.lisp" "a") @@ -415,15 +423,16 @@ interface.") "/__fasls")))) (replace 'configure (lambda* (#:key inputs outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out")) - (clang (assoc-ref inputs "clang")) - (ld-flags - (string-join - (apply append - (map (lambda (f) - (list "-L" f "-rpath" f)) - (string-split (getenv "LIBRARY_PATH") #\:))) - ","))) + (let* ((out (assoc-ref outputs "out")) + (clang (assoc-ref inputs "clang-toolchain")) + (ld-flags (string-join + (apply append + (map (lambda (f) + (list "-L" f "-rpath" f)) + ;; prepend self in rpaths + (cons (string-append out "/lib") + (string-split (getenv "LIBRARY_PATH") #\:)))) + ","))) (invoke "sbcl" "--script" "./koga" @@ -436,13 +445,23 @@ interface.") "--package-path=/" (string-append "--bin-path=" out "/bin") (string-append "--lib-path=" out "/lib/clasp") + (string-append "--dylib-path=" out "/lib") + (string-append "--pkgconfig-path=" out "/lib/pkgconfig") (string-append "--share-path=" out "/share/clasp"))))) (replace 'build - (lambda* _ - (invoke "ninja" "-C" "build"))) + (lambda* (#:key parallel-build? #:allow-other-keys) + (let ((jobs (if parallel-build? + (number->string (parallel-job-count)) + "1"))) + (setenv "CLASP_BUILD_JOBS" jobs) + (invoke "ninja" "-C" "build" "-j" jobs)))) (replace 'install (lambda* _ - (invoke "ninja" "-C" "build" "install")))))) + (invoke "ninja" "-C" "build" "install"))) + (add-after 'install 'install-lib + (lambda* (#:key outputs #:allow-other-keys) + (install-file "build/boehmprecise/lib/libclasp.so" + (string-append (assoc-ref outputs "out") "/lib"))))))) (home-page "https://clasp-developers.github.io/") (synopsis "Common Lisp implementation based on LLVM and C++") (description "Clasp is a new Common Lisp implementation that seamlessly |