diff options
Diffstat (limited to 'gnu/packages/lisp.scm')
-rw-r--r-- | gnu/packages/lisp.scm | 174 |
1 files changed, 148 insertions, 26 deletions
diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm index 63f5ba744e..fa8b25ae85 100644 --- a/gnu/packages/lisp.scm +++ b/gnu/packages/lisp.scm @@ -18,6 +18,7 @@ ;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com> ;;; Copyright © 2020 Zhu Zihao <all_but_last@163.com> ;;; Copyright © 2021 Sharlatan Hellseher <sharlatanus@gmail.com> +;;; Copyright © 2021 Paul A. Patience <paul@apatience.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -45,6 +46,7 @@ #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) + #:use-module (guix gexp) #:use-module (guix utils) #:use-module (guix build-system copy) #:use-module (guix build-system gnu) @@ -53,28 +55,32 @@ #:use-module (guix build-system trivial) #:use-module (gnu packages admin) #:use-module (gnu packages base) + #:use-module (gnu packages bash) #:use-module (gnu packages bdw-gc) #:use-module (gnu packages compression) #:use-module (gnu packages ed) #:use-module (gnu packages fontutils) #:use-module (gnu packages gcc) #:use-module (gnu packages gettext) + #:use-module (gnu packages ghostscript) #:use-module (gnu packages gl) #:use-module (gnu packages glib) - #:use-module (gnu packages m4) - #:use-module (gnu packages maths) - #:use-module (gnu packages multiprecision) - #:use-module (gnu packages ncurses) + #:use-module (gnu packages groff) #:use-module (gnu packages libffcall) #:use-module (gnu packages libffi) #:use-module (gnu packages libsigsegv) #:use-module (gnu packages linux) + #:use-module (gnu packages m4) + #:use-module (gnu packages maths) + #:use-module (gnu packages multiprecision) + #:use-module (gnu packages ncurses) + #:use-module (gnu packages onc-rpc) #:use-module (gnu packages perl) #:use-module (gnu packages readline) #:use-module (gnu packages sdl) #:use-module (gnu packages tex) - #:use-module (gnu packages tls) #:use-module (gnu packages texinfo) + #:use-module (gnu packages tls) #:use-module (gnu packages version-control) #:use-module (gnu packages xorg) #:use-module (ice-9 match)) @@ -123,33 +129,52 @@ Definition Facility.") (license license:expat))) (define-public gcl - (let ((commit "d3335e2b3deb63f930eb0328e9b05377744c9512") - (revision "2")) ;Guix package revision + (let ((commit "ff7ef981765cc0efdb4b1db27c292f5c11a72753") + (revision "3")) ;Guix package revision (package (name "gcl") - (version (string-append "2.6.12-" revision "." - (string-take commit 7))) + (version (git-version "2.6.12" revision commit)) (source (origin (method git-fetch) (uri (git-reference (url "https://git.savannah.gnu.org/r/gcl.git") (commit commit))) - (file-name (string-append "gcl-" version "-checkout")) + (file-name (git-file-name name version)) (sha256 - (base32 "05v86lhvsby05nzvcd3c4k0wljvgdgd0i6arzd2fx1yd67dl6fgj")))) + (base32 "0z64fxxcaial2i1s1hms8r095dm1ff3wd8ivwdx894a3yln9c0an")))) (build-system gnu-build-system) (arguments `(#:parallel-build? #f ; The build system seems not to be thread safe. #:test-target "ansi-tests/test_results" - #:configure-flags '("--enable-ansi") ; required for use by the maxima package - #:make-flags (list - (string-append "GCL_CC=" (assoc-ref %build-inputs "gcc") - "/bin/gcc") - (string-append "CC=" (assoc-ref %build-inputs "gcc") - "/bin/gcc")) + #:configure-flags ,#~(list + "--enable-ansi" ; required by the maxima package + (string-append "CFLAGS=-I" + #$(this-package-input "libtirpc") + "/include/tirpc") + (string-append "LDFLAGS=-L" + #$(this-package-input "libtirpc") + "/lib") + "LIBS=-ltirpc") + #:make-flags ,#~(list + (string-append "GCL_CC=" #$gcc "/bin/gcc") + (string-append "CC="#$gcc "/bin/gcc")) #:phases (modify-phases %standard-phases + (add-after 'unpack 'realpath-workaround + ;; Calls to the realpath function can set errno even if the return + ;; value of the function indicates that there is no error, which + ;; make massert consider that there was an error. + (lambda _ + (substitute* "gcl/o/main.c" + (("massert\\(realpath\\(s,o\\)\\);" all) + "massert((realpath(s, o) != NULL) && ((errno = 0) == 0));")))) + (add-after 'unpack 'fix-makefile + ;; The "final" target doesn't exist. + (lambda _ + (substitute* "gcl/makefile" + (("\\$\\(MAKE\\) -C \\$\\(PORTDIR\\) final") + "$(MAKE) -C $(PORTDIR)")))) (add-before 'configure 'pre-conf (lambda* (#:key inputs #:allow-other-keys) (chdir "gcl") @@ -204,7 +229,9 @@ Definition Facility.") ;; https://www.ma.utexas.edu/pipermail/maxima/2008/009769.html (delete 'strip)))) (inputs - `(("gmp" ,gmp) + `(("bash-minimal" ,bash-minimal) + ("gmp" ,gmp) + ("libtirpc" ,libtirpc) ("readline" ,readline))) (native-inputs `(("m4" ,m4) @@ -842,10 +869,64 @@ enough to play the original mainframe Zork all the way through.") (home-page "http://www.russotto.net/git/mrussotto/confusion/src/master/src/README") (license license:gpl3+)))) +(define man-for-txr + (let ((commit "dfbf19b9a96474b8c1bacac85e43605e5691ceb2") + ;; Number of additional commits since the last tag (see the output of + ;; "git describe --tags"). + (revision "41")) + (package + (name "man-for-txr") + (version (git-version "1.6g" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "http://www.kylheku.com/git/man/") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1zy0g8fj9nsfwzvg88hyaiy94r8j14xhs8vy2ln2niqdm6x2lvy2")))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ; There are no tests. + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'fix-man2html-makefile + (lambda _ + (substitute* "man2html/Makefile.in" + ;; It inadvertently ignores @bindir@. + (("^(bindir = \\$\\(DESTDIR\\)\\$\\(PREFIX\\)).*" _ prefix) + (string-append prefix "@bindir@\n"))) + #t)) + (add-after 'unpack 'delete-generated-files + (lambda _ + (for-each delete-file + (append + (list "conf_script") + (map (lambda (d) (string-append d "/Makefile")) + '("." "man" "man2html" "src")) + (map (lambda (f) (string-append "src/" f)) + '("makewhatis.in" "man.conf" + "paths.h" "version.h")))) + #t)) + (replace 'configure + (lambda* (#:key outputs #:allow-other-keys) + (setenv "CC" ,(cc-for-target)) + ;; Humor the manually written configure script. + (invoke "./configure" "+lang" "en" "+fhs" + (string-append "-prefix=" (assoc-ref outputs "out"))) + #t))))) + (home-page "http://www.kylheku.com/cgit/man/") + (synopsis "Modifications to the man utilities, specifically man2html") + (description + "This is a fork of the man utilities intended specifically for building +the HTML documentation of TXR.") + (license license:gpl2)))) + (define-public txr (package (name "txr") - (version "263") + (version "270") (source (origin (method git-fetch) @@ -854,8 +935,16 @@ enough to play the original mainframe Zork all the way through.") (commit (string-append "txr-" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "14zaziymnbr2ld79x4h7sf88bzzzj82w3xpavmcx7mhwannb2swh")))) + (base32 "1kp64h3ls8mddvrlaqqylrb3brckfrqvkk8049xn15mimfggg0xv")))) (build-system gnu-build-system) + (native-inputs + ;; Required to build the documentation. + `(("ghostscript" ,ghostscript) + ("groff" ,groff) + ("man2html" ,man-for-txr))) + (inputs + `(("bash" ,bash-minimal) + ("libffi" ,libffi))) (arguments `(#:configure-flags (list ,(string-append "cc=" (cc-for-target)) @@ -863,6 +952,35 @@ enough to play the original mainframe Zork all the way through.") #:test-target "tests" #:phases (modify-phases %standard-phases + (add-after 'unpack 'fix-license-installation + (lambda* (#:key outputs #:allow-other-keys) + (substitute* "Makefile" + (("INSTALL(,.*LICENSE,.*)\\$\\(datadir\\)" _ match) + (string-append "INSTALL" match + (assoc-ref outputs "out") + "/share/doc/" ,name "-" ,version))) + #t)) + (delete 'install-license-files) + (add-after 'unpack 'inhibit-doc-syms-generation + (lambda _ + (substitute* "genman.txr" + ;; Exit from genman.txr before it tries to write to + ;; stdlib/doc-syms.tl, which is anyway kept up to date with + ;; each release (and is already compiled to stdlib/doc-syms.tlo + ;; when genman.txr is run). + (("^@\\(output \"stdlib/doc-syms\\.tl\"\\).*" line) + (string-append "@(do (exit))\n" line))) + #t)) + (add-after 'unpack 'fix-paths + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "stream.c" + (("/bin/sh") + (string-append (assoc-ref inputs "bash") "/bin/bash"))))) + (add-after 'unpack 'fix-tests + (lambda _ + (substitute* (list "tests/017/realpath.tl" + "tests/017/realpath.expected") + (("/usr/bin") "/")))) (replace 'configure ;; ./configure is a hand-written script that can't handle standard ;; autotools arguments like CONFIG_SHELL. @@ -870,14 +988,18 @@ enough to play the original mainframe Zork all the way through.") (setenv "txr_shell" (which "bash")) (apply invoke "./configure" configure-flags) #t)) - (add-after 'configure 'fix-tests + (add-after 'build 'build-doc (lambda _ - (substitute* (list "tests/017/realpath.tl" - "tests/017/realpath.expected") - (("/usr/bin") "/")) + (setenv "GS_GENERATE_UUIDS" "0") + (invoke "make" "txr-manpage.html" "txr-manpage.pdf") + #t)) + (add-after 'install 'install-doc + (lambda* (#:key outputs #:allow-other-keys) + (let ((doc (string-append (assoc-ref outputs "out") + "/share/doc/" ,name "-" ,version))) + (for-each (lambda (f) (install-file f doc)) + '("txr-manpage.html" "txr-manpage.pdf"))) #t))))) - (inputs - `(("libffi" ,libffi))) (synopsis "General-purpose, multi-paradigm programming language") (description "TXR is a general-purpose, multi-paradigm programming language. It |