summary refs log tree commit diff
path: root/gnu/packages/lisp.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/lisp.scm')
-rw-r--r--gnu/packages/lisp.scm78
1 files changed, 48 insertions, 30 deletions
diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm
index b5aa6a087d..ae110a608f 100644
--- a/gnu/packages/lisp.scm
+++ b/gnu/packages/lisp.scm
@@ -5,7 +5,7 @@
 ;;; Copyright © 2016 Federico Beffa <beffa@fbengineering.ch>
 ;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
 ;;; Copyright © 2016, 2017 Andy Patterson <ajpatter@uwaterloo.ca>
-;;; Copyright © 2017, 2019 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2017, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2017, 2019–2021 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2018 Benjamin Slade <slade@jnanam.net>
@@ -47,6 +47,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)
@@ -66,20 +67,21 @@
   #:use-module (gnu packages gl)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages groff)
-  #:use-module (gnu packages m4)
-  #:use-module (gnu packages maths)
-  #:use-module (gnu packages multiprecision)
-  #:use-module (gnu packages ncurses)
   #: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))
@@ -128,33 +130,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")
@@ -209,7 +230,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)
@@ -446,7 +469,7 @@ an interpreter, a compiler, a debugger, and much more.")
        ("ed" ,ed)
        ("inetutils" ,inetutils)         ;for hostname(1)
        ("texinfo" ,texinfo)
-       ("texlive" ,(texlive-union (list texlive-tex-texinfo)))
+       ("texlive" ,(texlive-updmap.cfg (list texlive-tex-texinfo)))
        ("which" ,which)
        ("zlib" ,zlib)))
     (arguments
@@ -518,10 +541,6 @@ an interpreter, a compiler, a debugger, and much more.")
                  (("\\(deftest grent\\.[12]" all)
                   (string-append "#+nil ;disabled by Guix\n" all))))
              #t))
-         ;; FIXME: the texlive-union insists on regenerating fonts.  It stores
-         ;; them in HOME, so it needs to be writeable.
-         (add-before 'build 'set-HOME
-           (lambda _ (setenv "HOME" "/tmp") #t))
          (replace 'build
            (lambda* (#:key outputs #:allow-other-keys)
              (setenv "CC" "gcc")
@@ -1210,12 +1229,11 @@ assembler, PEG) is less than 1MB.")
        (modify-phases %standard-phases
          (add-before 'install 'fix-utils-path
            (lambda* (#:key inputs #:allow-other-keys)
-             (let* ((coreutils (string-append (assoc-ref inputs "coreutils") "/bin/"))
-                    (cat (string-append coreutils "cat"))
-                    (paste (string-append coreutils "paste"))
-                    (sort (string-append coreutils "sort"))
-                    (basename (string-append coreutils "basename"))
-                    (sed (string-append (assoc-ref inputs "sed") "/bin/sed")))
+             (let* ((cat (search-input-file inputs "/bin/cat"))
+                    (paste (search-input-file inputs "/bin/paste"))
+                    (sort (search-input-file inputs "/bin/sort"))
+                    (basename (search-input-file inputs "/bin/basename"))
+                    (sed (search-input-file inputs "/bin/sed")))
                (substitute* "lisp-repl-core-dumper"
                  (("\\$\\(basename") (string-append "$(" basename))
                  (("\\<cat\\>") cat)