gnu: emacs-guix: Update to 0.3.1.
[jackhill/guix/guix.git] / gnu / packages / lisp.scm
index 425c273..43d9c9c 100644 (file)
@@ -6,6 +6,7 @@
 ;;; Copyright © 2016, 2017 ng0 <contact.ng0@cryptolab.net>
 ;;; Copyright © 2016 Andy Patterson <ajpatter@uwaterloo.ca>
 ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
      `(#:parallel-build? #f  ; The build system seems not to be thread safe.
        #:tests? #f  ; There does not seem to be make check or anything similar.
        #:configure-flags '("--enable-ansi") ; required for use by the maxima package
-       #:phases (alist-cons-before
-                'configure 'pre-conf
-                (lambda _
-                  ;; Patch bug when building readline support.  This bug was
-                  ;; also observed by Debian
-                  ;; https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=741819
-                  (substitute* "o/gcl_readline.d"
-                    (("rl_attempted_completion_function = \
-\\(CPPFunction \\*\\)rl_completion;")
-                      "rl_attempted_completion_function = rl_completion;"))
-                  (substitute*
-                      (append
-                       '("pcl/impl/kcl/makefile.akcl"
-                         "add-defs"
-                         "unixport/makefile.dos"
-                         "add-defs.bat"
-                         "gcl-tk/makefile.prev"
-                         "add-defs1")
-                       (find-files "h" "\\.defs"))
-                    (("SHELL=/bin/(ba)?sh")
-                     (string-append "SHELL=" (which "bash")))))
-                ;; drop strip phase to make maxima build, see
-                ;; https://www.ma.utexas.edu/pipermail/maxima/2008/009769.html
-                (alist-delete 'strip
-                 %standard-phases))))
+       #:phases (modify-phases %standard-phases
+                  (add-before 'configure 'pre-conf
+                    (lambda _
+                      (substitute*
+                        (append
+                         '("pcl/impl/kcl/makefile.akcl"
+                           "add-defs"
+                           "unixport/makefile.dos"
+                           "add-defs.bat"
+                           "gcl-tk/makefile.prev"
+                           "add-defs1")
+                         (find-files "h" "\\.defs"))
+                        (("SHELL=/bin/bash")
+                         (string-append "SHELL=" (which "bash")))
+                        (("SHELL=/bin/sh")
+                         (string-append "SHELL=" (which "sh"))))
+                      #t))
+                  ;; drop strip phase to make maxima build, see
+                  ;; https://www.ma.utexas.edu/pipermail/maxima/2008/009769.html
+                  (delete 'strip))))
+    (inputs
+     `(("gmp" ,gmp)
+       ("readline" ,readline)))
     (native-inputs
-     `(("m4" ,m4)
-       ("readline" ,readline)
+     `(("gcc" ,gcc-4.9)
+       ("m4" ,m4)
        ("texinfo" ,texinfo)
        ("texlive" ,texlive)))
-    (home-page "http://www.gnu.org/software/gcl")
+    (home-page "https://www.gnu.org/software/gcl/")
     (synopsis "A Common Lisp implementation")
     (description "GCL is an implementation of the Common Lisp language.  It
 features the ability to compile to native object code and to load native
@@ -414,6 +413,9 @@ statistical profiler, a code coverage tool, and many other extensions.")
        ("subversion" ,subversion)))
     (arguments
      `(#:tests? #f                      ;no 'check' target
+       #:modules ((srfi srfi-26)
+                  (guix build utils)
+                  (guix build gnu-build-system))
        #:phases
        (alist-replace
         'unpack
@@ -465,18 +467,22 @@ statistical profiler, a code coverage tool, and many other extensions.")
                         ;; "guix package --search="
                         (_              "UNSUPPORTED")))
                     (heap (string-append kernel ".image")))
-               (mkdir-p libdir)
+               (install-file kernel libdir)
+               (install-file heap libdir)
+
+               (let ((dirs '("lib" "library" "examples" "contrib"
+                             "tools" "objc-bridge")))
+                 (for-each copy-recursively
+                           dirs
+                           (map (cut string-append libdir <>) dirs)))
+
                (mkdir-p bindir)
-               (copy-file kernel (string-append libdir kernel))
-               (copy-file heap (string-append libdir heap))
                (with-output-to-file wrapper
                  (lambda ()
                    (display
                     (string-append
                      "#!" bash "/bin/sh\n"
-                     "if [ -z \"$CCL_DEFAULT_DIRECTORY\" ]; then\n"
-                     "    CCL_DEFAULT_DIRECTORY=" libdir "\n"
-                     "fi\n"
+                     "CCL_DEFAULT_DIRECTORY=" libdir "\n"
                      "export CCL_DEFAULT_DIRECTORY\n"
                      "exec " libdir kernel "\n"))))
                (chmod wrapper #o755)))
@@ -512,7 +518,7 @@ interface.")
       ;; https://github.com/JeffBezanson/femtolisp/issues/25
       (supported-systems
        (fold delete %supported-systems
-             '("armhf-linux" "mips64el-linux")))
+             '("armhf-linux" "mips64el-linux" "aarch64-linux")))
       (build-system gnu-build-system)
       (arguments
        `(#:make-flags '("CC=gcc" "release")
@@ -881,7 +887,7 @@ from other CLXes around the net.")
 It attempts to be highly customizable while relying entirely on the keyboard
 for input.  These design decisions reflect the growing popularity of
 productive, customizable lisp based systems.")
-    (home-page "http://github.com/stumpwm/stumpwm")
+    (home-page "https://github.com/stumpwm/stumpwm")
     (license license:gpl2+)
     (properties `((ecl-variant . ,(delay ecl-stumpwm))))))