gnu: emacs-guix: Update to 0.3.1.
[jackhill/guix/guix.git] / gnu / packages / lisp.scm
index 80161de..43d9c9c 100644 (file)
@@ -3,9 +3,10 @@
 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2016 Federico Beffa <beffa@fbengineering.ch>
-;;; Copyright © 2016 ng0 <ngillmann@runbox.com>
+;;; 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.
 ;;;
   #:use-module (guix build-system asdf)
   #:use-module (guix build-system trivial)
   #:use-module (gnu packages base)
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages fontutils)
+  #:use-module (gnu packages maths)
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages bdw-gc)
   #:use-module (gnu packages libffi)
   #:use-module (gnu packages libffcall)
   #:use-module (gnu packages readline)
+  #:use-module (gnu packages sdl)
   #:use-module (gnu packages libsigsegv)
+  #:use-module (gnu packages linux)
   #:use-module (gnu packages admin)
   #:use-module (gnu packages ed)
+  #:use-module (gnu packages gl)
+  #:use-module (gnu packages gcc)
+  #:use-module (gnu packages glib)
+  #:use-module (gnu packages gettext)
   #:use-module (gnu packages m4)
+  #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages version-control)
+  #:use-module (gnu packages xorg)
   #:use-module (ice-9 match)
   #:use-module (srfi srfi-1))
 
      `(#: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
@@ -118,7 +128,7 @@ interface to the Tk widget system.")
 (define-public ecl
   (package
     (name "ecl")
-    (version "16.1.2")
+    (version "16.1.3")
     (source
      (origin
        (method url-fetch)
@@ -126,7 +136,7 @@ interface to the Tk widget system.")
              "https://common-lisp.net/project/ecl/static/files/release/"
              name "-" version ".tgz"))
        (sha256
-        (base32 "16ab8qs3awvdxy8xs8jy82v8r04x4wr70l9l2j45vgag18d2nj1d"))
+        (base32 "0m0j24w5d5a9dwwqyrg0d35c0nys16ijb4r0nyk87yp82v38b9bn"))
        (modules '((guix build utils)))
        (snippet
         ;; Add ecl-bundle-systems to 'default-system-source-registry'.
@@ -141,9 +151,6 @@ interface to the Tk widget system.")
               ("libffi" ,libffi)))
     (arguments
      '(#:tests? #t
-       #:make-flags `(,(string-append "ECL="
-                                      (assoc-ref %outputs "out")
-                                      "/bin/ecl"))
        #:parallel-tests? #f
        #:phases
        (modify-phases %standard-phases
@@ -171,7 +178,12 @@ interface to the Tk widget system.")
                          `("kernel-headers" ,@libraries)))
                  `("LIBRARY_PATH" suffix ,library-directories)
                  `("LD_LIBRARY_PATH" suffix ,library-directories)))))
-         (add-after 'wrap 'check (assoc-ref %standard-phases 'check)))))
+         (add-after 'wrap 'check (assoc-ref %standard-phases 'check))
+         (add-before 'check 'fix-path-to-ecl
+           (lambda _
+             (substitute* "build/tests/Makefile"
+               (("\\$\\{exec_prefix\\}/") ""))
+             #t)))))
     (native-search-paths
      (list (search-path-specification
             (variable "XDG_DATA_DIRS")
@@ -401,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
@@ -452,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)))
@@ -499,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")
@@ -530,6 +549,69 @@ The core is 12 builtin special forms and 33 builtin functions.")
       (home-page "https://github.com/JeffBezanson/femtolisp")
       (license license:bsd-3))))
 
+(define-public lush2
+  (package
+    (name "lush2")
+    (version "2.0.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://sourceforge/lush/lush2/lush-"
+                           version ".tar.gz"))
+       (modules '((guix build utils)))
+       (snippet
+        '(begin
+           (substitute* "src/unix.c"
+               (("\\{ \"LUSH_DATE\", __DATE__ \\},") "")
+               (("\\{ \"LUSH_TIME\", __TIME__ \\},") ""))
+             (substitute* "src/main.c"
+               (("\" \\(built \" __DATE__ \"\\)\"") ""))))
+       (sha256
+        (base32
+         "02pkfn3nqdkm9fm44911dbcz0v3r0l53vygj8xigl6id5g3iwi4k"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(;; We have to add these LIBS so that they are found.
+       #:configure-flags (list "LIBS=-lz"
+                               "X_EXTRA_LIBS=-lfontconfig"
+                               "--with-x")
+       #:tests? #f)) ; No make check.
+    (native-inputs `(("intltool" ,intltool)))
+    (inputs
+     `(("alsa-lib" ,alsa-lib)
+       ("sdl" ,sdl)
+       ("sdl-image" ,sdl-image)
+       ("sdl-mixer" ,sdl-mixer)
+       ("sdl-net" ,sdl-net)
+       ("sdl-ttf" ,sdl-ttf)
+       ("lapack" ,lapack)
+       ("libxft" ,libxft)
+       ("fontconfig" ,fontconfig)
+       ("gsl" ,gsl)
+       ("openblas" ,openblas)
+       ("glu" ,glu)
+       ("mesa" ,mesa)
+       ("mesa-utils" ,mesa-utils)
+       ("binutils" ,binutils)
+       ("libiberty" ,libiberty)
+       ("readline" ,readline)
+       ("zlib" ,zlib)
+       ("gettext-minimal" ,gettext-minimal)))
+    (synopsis "Lisp Universal Shell")
+    (description
+     "Lush is an object-oriented Lisp interpreter/compiler with features
+designed to please people who want to prototype large numerical
+applications.  Lush includes an extensive library of
+vector/matrix/tensor manipulation, numerous numerical libraries
+(including GSL, LAPACK, and BLAS), a set of graphic functions, a
+simple GUI toolkit, and interfaces to various graphic and multimedia
+libraries such as OpenGL, SDL, Video4Linux, and ALSA (video/audio
+grabbing), and others.  Lush is an ideal frontend script language for
+programming projects written in C or other languages.  Lush also has
+libraries for Machine Learning, Neural Nets and statistical estimation.")
+    (home-page "http://lush.sourceforge.net/")
+    (license license:lgpl2.1+)))
+
 (define-public sbcl-alexandria
   (let ((revision "1")
         (commit "926a066611b7b11cb71e26c827a271e500888c30"))
@@ -805,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))))))