WIP: bees service
[jackhill/guix/guix.git] / gnu / packages / aspell.scm
index af38c14..26c0cf4 100644 (file)
@@ -1,12 +1,17 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2015, 2016 Alex Kost <alezost@gmail.com>
 ;;; Copyright © 2016 John Darrington <jmd@gnu.org>
-;;; Copyright © 2016, 2017, 2019 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2017, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016 Christopher Andersson <christopher@8bits.nu>
 ;;; Copyright © 2016 Theodoros Foradis <theodoros@foradis.org>
-;;; Copyright © 2016, 2017, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2016, 2017, 2019, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2019 Jens Mølgaard <jens@zete.tk>
+;;; Copyright © 2020 Timotej Lazar <timotej.lazar@araneo.si>
+;;; Copyright © 2020 Marcin Karpezo <sirmacik@wioo.waw.pl>
+;;; Copyright © 2020 Jonathan Brielmaier <jonathan.brielmaier@web.de>
+;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
+;;; Copyright © 2020 Noah Landis <noahlandis@posteo.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
   #:use-module (guix utils)
   #:use-module (gnu packages)
   #:use-module (gnu packages base)
+  #:use-module (gnu packages bison)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages ncurses)
   #:use-module (gnu packages perl)
   #:use-module (ice-9 match))
 
 (define-public aspell
   (package
     (name "aspell")
-    (version "0.60.6.1")
+    (version "0.60.8")
     (source
      (origin
       (method url-fetch)
@@ -46,9 +53,8 @@
                           version ".tar.gz"))
       (sha256
        (base32
-        "1qgn5psfyhbrnap275xjfrzppf5a83fb67gpql0kfqv37al869gm"))
-      (patches (search-patches "aspell-default-dict-dir.patch"
-                               "aspell-gcc-compat.patch"))))
+        "1wi60ankalmh8ds7nplz434jd7j94gdvbahdwsr539rlad8pxdzr"))
+      (patches (search-patches "aspell-default-dict-dir.patch"))))
     (build-system gnu-build-system)
     (arguments
      `(#:phases
                  (("\"filter-path(.*)DICT_DIR" _ middle)
                   (string-append "\"filter-path" middle
                                  "\"" libdir "\"")))
-               #t)))
-         (add-after 'install 'wrap-aspell
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let ((bin/aspell (string-append (assoc-ref outputs "out")
-                                              "/bin/aspell")))
-               (wrap-program bin/aspell
-                 '("ASPELL_CONF" "" =
-                   ("${ASPELL_CONF:-\"dict-dir ${GUIX_PROFILE:-$HOME/.guix-profile}/lib/aspell\"}")))
                #t))))))
     (inputs `(("perl" ,perl)))
 
@@ -118,7 +116,7 @@ dictionaries, including personal ones.")
               (uri (string-append "mirror://gnu/aspell/dict/" dict-name
                                   "/" prefix dict-name "-"
                                   version ".tar.bz2"))
-              (sha256 sha256)))
+              (hash (content-hash sha256))))
     (build-system gnu-build-system)
     (arguments
      `(#:phases
@@ -170,9 +168,16 @@ dictionaries, including personal ones.")
          (method url-fetch)
          (uri (string-append "https://www.softcatala.org/pub/softcatala/aspell/"
                              version "/aspell6-ca-" version ".tar.bz2"))
-         (sha256 sha256)))
+         (hash (content-hash sha256))))
       (home-page "https://www.softcatala.org/pub/softcatala/aspell/"))))
 
+(define-public aspell-dict-cs
+  (aspell-dictionary "cs" "Czech"
+                     #:version "20040614-1"
+                     #:sha256
+                     (base32
+                      "0rihj4hsw96pd9casvmpvw3r8040pfa28p1h73x4vyn20zwr3h01")))
+
 (define-public aspell-dict-de
   (aspell-dictionary "de" "German"
                      #:version "20161207-7-0"
@@ -182,11 +187,10 @@ dictionaries, including personal ones.")
 
 (define-public aspell-dict-da
   (aspell-dictionary "da" "Danish"
-                     #:version "1.4.42-1"
-                     #:prefix "aspell5-"
+                     #:version "1.6.36-11-0"
                      #:sha256
                      (base32
-                      "1hfkmiyhgrx5lgrb2mffjbdn1hivrm73wcg7x0iid74p2yb0fjpp")))
+                      "1xz2haayvwlxgss9jf1x2311a1ixbk75q2vgfprjhibsmb7cpinv")))
 
 (define-public aspell-dict-el
   (aspell-dictionary "el" "Greek"
@@ -272,13 +276,14 @@ dictionaries, including personal ones.")
          (uri (string-append "mirror://sourceforge/linguistico/"
                              "Dizionario%20italiano%20per%20Aspell/" version "/"
                              "aspell6-it-" version ".tar.bz2"))
-         (sha256 sha256)))
+         (hash (content-hash sha256))))
        (home-page
         "http://linguistico.sourceforge.net/pages/dizionario_italiano.html"))))
 
 (define-public aspell-dict-mi
   (aspell-dictionary "mi" "Maori"
                      #:version "0.50-0"
+                     #:prefix "aspell-"
                      #:sha256
                      (base32
                       "12bxplpd348yx8d2q8qvahi9dlp7qf28qmanzhziwc7np8rixvmy")))
@@ -294,10 +299,19 @@ dictionaries, including personal ones.")
 (define-public aspell-dict-nn
   (aspell-dictionary "nn" "Norwegian Nynorsk"
                      #:version "0.50.1-1"
+                     #:prefix "aspell-"
                      #:sha256
                      (base32
                       "0w2k5l5rbqpliripgqwiqixz5ghnjf7i9ggbrc4ly4vy1ia10rmc")))
 
+(define-public aspell-dict-pl
+  (aspell-dictionary "pl" "Polish"
+                     #:version "0.51-0"
+                     #:prefix "aspell-"
+                     #:sha256
+                     (base32
+                      "1a3ccji6k5gys7l3ilr2lh5pzxgzb7ipc5vb737svl6nqgdy8757")))
+
 (define-public aspell-dict-pt-br
   (aspell-dictionary "pt_BR" "Brazilian Portuguese"
                      #:version "20131030-12-0"
@@ -319,6 +333,14 @@ dictionaries, including personal ones.")
                      (base32
                       "0ip6nq43hcr7vvzbv4lwwmlwgfa60hrhsldh9xy3zg2prv6bcaaw")))
 
+(define-public aspell-dict-sl
+  (aspell-dictionary "sl" "Slovenian"
+                     #:version "0.50-0"
+                     #:prefix "aspell-"
+                     #:sha256
+                     (base32
+                      "1l9kc5g35flq8kw9jhn2n0bjb4sipjs4qkqzgggs438kywkx2rp5")))
+
 (define-public aspell-dict-sv
   (aspell-dictionary "sv" "Swedish"
                      #:version "0.51-0"
@@ -352,8 +374,8 @@ dictionaries, including personal ones.")
     (source (origin
               (method url-fetch)
               (uri (string-append
-                    "http://downloads.sourceforge.net/wordlist/scowl-"
-                    version ".tar.gz"))
+                    "mirror://sourceforge/wordlist/SCOWL/"
+                    version "/scowl-" version ".tar.gz"))
               (sha256
                (base32
                 "11lkrnhwrf5mvrrq45k4mads3n9aswgac8dc25ba61c75alxb5rs"))))
@@ -397,8 +419,12 @@ dictionaries, including personal ones.")
                              (find-files "speller"
                                          ,(string-append language ".*\\.dic$"))))
 
-               (install-file ,(string-append "speller/" language ".aff")
-                             hunspell)
+               ;; Install affix files corresponding to installed dictionaries
+               (for-each (lambda (dic)
+                           (install-file (string-append
+                                           "speller/" (basename dic ".dic") ".aff")
+                                         hunspell))
+                         (find-files hunspell ".*\\.dic$"))
                (symlink hunspell (string-append myspell "/dicts"))
                (for-each (lambda (file)
                            (install-file file doc))
@@ -446,3 +472,49 @@ under permissive licensing terms.  See the 'Copyright' file."))))
 (define-word-list-dictionary hunspell-dict-en-us
   "en_US"
   (synopsis "Hunspell dictionary for United States English"))
+
+(define-public ispell
+  (package
+    (name "ispell")
+    (version "3.4.02")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://www.cs.hmc.edu/~geoff/tars/ispell-"
+                           version ".tar.gz"))
+       (sha256
+        (base32 "0b6rqzqjdhwf323sf1dv8qzx5pxa5asz618922r59zjp65660yb6"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:parallel-build? #f
+       #:tests? #f ; no tests
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             ;; Based on local.h.linux
+             (let* ((grep (assoc-ref inputs "grep"))
+                    (out (assoc-ref outputs "out")))
+               (call-with-output-file "local.h"
+                 (lambda (port)
+                   (format port "#define MINIMENU~%")
+                   (format port "#define USG~%")
+                   (format port "#define HAS_RENAME~%")
+                   (format port "#define CC \"gcc\"~%")
+                   (format port "#define POUNDBANG \"#!~a\"~%" (which "sh"))
+                   (format port "#define EGREPCMD \"~a/bin/grep -Ei\"~%" grep)
+                   (format port "#define BINDIR \"~a/bin\"~%" out)
+                   (format port "#define LIBDIR \"~a/lib/ispell\"~%" out)
+                   (format port "#define MAN1DIR \"~a/share/man/man1\"~%" out)
+                   (format port "#define MAN45DIR \"~a/share/man/man5\"~%" out))))
+             #t)))))
+    (inputs
+     `(("grep" ,grep)
+       ("ncurses" ,ncurses)))
+    (native-inputs
+     `(("bison" ,bison)))
+    (synopsis "Interactive spell-checking tool for Unix")
+    (description "Ispell is an interactive spell-checking tool supporting many
+European languages.")
+    (home-page "https://www.cs.hmc.edu/~geoff/ispell.html")
+    (license bsd-3)))