Merge branch 'staging' into core-updates
[jackhill/guix/guix.git] / gnu / packages / aspell.scm
index 1e2149c..56d69fd 100644 (file)
@@ -1,11 +1,12 @@
 ;;; 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 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2015, 2016 Alex Kost <alezost@gmail.com>
 ;;; Copyright © 2016 John Darrington <jmd@gnu.org>
-;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2017, 2019 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016 Christopher Andersson <christopher@8bits.nu>
 ;;; Copyright © 2016 Theodoros Foradis <theodoros@foradis.org>
-;;; Copyright © 2016, 2017 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2016, 2017, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2019 Jens Mølgaard <jens@zete.tk>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
   #:use-module (guix licenses)
+  #:use-module (guix utils)
   #:use-module (gnu packages)
   #:use-module (gnu packages base)
   #:use-module (gnu packages compression)
-  #:use-module (gnu packages perl))
+  #: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)
                           version ".tar.gz"))
       (sha256
        (base32
-        "1qgn5psfyhbrnap275xjfrzppf5a83fb67gpql0kfqv37al869gm"))
+        "1wi60ankalmh8ds7nplz434jd7j94gdvbahdwsr539rlad8pxdzr"))
       (patches (search-patches "aspell-default-dict-dir.patch"))))
     (build-system gnu-build-system)
     (arguments
      `(#:phases
        (modify-phases %standard-phases
-         (add-after 'install 'wrap-aspell
+         (add-before 'build 'set-filter-path
            (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\"}")))
+             ;; Change the default value of 'filter-path' so that filters such
+             ;; as 'tex-filter.so' can be found.  By default none of the
+             ;; filters would be found.
+             (let* ((out    (assoc-ref outputs "out"))
+                    (libdir (string-append out "/lib/aspell-"
+                                           ,(version-major+minor version))))
+               (substitute* "common/config.cpp"
+                 (("\"filter-path(.*)DICT_DIR" _ middle)
+                  (string-append "\"filter-path" middle
+                                 "\"" libdir "\"")))
                #t))))))
     (inputs `(("perl" ,perl)))
 
@@ -87,7 +95,14 @@ dictionaries, including personal ones.")
 (define* (aspell-dictionary dict-name full-name
                             #:key version sha256 (prefix "aspell6-"))
   (package
-    (name (string-append "aspell-dict-" dict-name))
+    (name (string-append
+           "aspell-dict-"
+           ;; Downcase and replace underscore in package names
+           ;; to follow Guix naming conventions.
+           (string-map (match-lambda
+                         (#\_ #\-)
+                         (chr chr))
+           (string-downcase dict-name))))
     (version version)
     (source (origin
               (method url-fetch)
@@ -117,19 +132,52 @@ dictionaries, including personal ones.")
     (home-page "http://aspell.net/")))
 
 
-(define-public aspell-dict-ca
-  (aspell-dictionary "ca" "Catalan"
-                     #:version "2.1.5-1"
+(define-public aspell-dict-ar
+  (aspell-dictionary "ar" "Arabic"
+                     #:version "1.2-0"
+                    #:prefix "aspell6-"
+                     #:sha256
+                     (base32
+                      "1avw40bp8yi5bnkq64ihm2rldgw34lk89yz281q9bmndh95a47h4")))
+
+(define-public aspell-dict-be
+  (aspell-dictionary "be" "Belarusian"
+                     #:version "0.01"
+                     #:prefix "aspell5-"
                      #:sha256
                      (base32
-                      "1fb5y5kgvk25nlsfvc8cai978hg66x3pbp9py56pldc7vxzf9npb")))
+                      "1svls9p7rsfi3hs0afh0cssj006qb4v1ik2yzqgj8hm10c6as2sm")))
+
+(define-public aspell-dict-ca
+  (let ((version "2.5.0")
+        (sha256
+         (base32 "0kbi8fi7a1bys31kfqrlh332gyik0cfdmxgl7n15sa9c305rkgwq")))
+    (package
+      (inherit (aspell-dictionary "ca" "Catalan"
+                                  #:version version
+                                  #:sha256 sha256))
+      (source
+       (origin
+         (method url-fetch)
+         (uri (string-append "https://www.softcatala.org/pub/softcatala/aspell/"
+                             version "/aspell6-ca-" version ".tar.bz2"))
+         (sha256 sha256)))
+      (home-page "https://www.softcatala.org/pub/softcatala/aspell/"))))
 
 (define-public aspell-dict-de
   (aspell-dictionary "de" "German"
-                     #:version "20030222-1"
+                     #:version "20161207-7-0"
+                     #:sha256
+                     (base32
+                      "0wamclvp66xfmv5wff96v6gdlnfv4y8lx3f8wvxyzm5imwgms4n2")))
+
+(define-public aspell-dict-da
+  (aspell-dictionary "da" "Danish"
+                     #:version "1.4.42-1"
+                     #:prefix "aspell5-"
                      #:sha256
                      (base32
-                      "01p92qj66cqb346gk7hjfynaap5sbcn85xz07kjfdq623ghr8v5s")))
+                      "1hfkmiyhgrx5lgrb2mffjbdn1hivrm73wcg7x0iid74p2yb0fjpp")))
 
 (define-public aspell-dict-el
   (aspell-dictionary "el" "Greek"
@@ -141,10 +189,10 @@ dictionaries, including personal ones.")
 
 (define-public aspell-dict-en
   (aspell-dictionary "en" "English"
-                     #:version "2017.08.24-0"
+                     #:version "2019.10.06-0"
                      #:sha256
                      (base32
-                      "0z2vvm1by485cm0sna21cmw6zb771c2l2lnn676zmrwm46q65d89")))
+                      "1zai9wrqwgb9z9vfgb22qhrvxvg73jg0ix44j1khm2f6m96lncr4")))
 
 (define-public aspell-dict-eo
   (aspell-dictionary "eo" "Esperanto"
@@ -160,6 +208,14 @@ dictionaries, including personal ones.")
                      (base32
                       "1k5g328ac1hdpp6fsg57d8md6i0aqcwlszp3gbmp5706wyhpydmd")))
 
+(define-public aspell-dict-fi
+  (aspell-dictionary "fi" "Finnish"
+                     #:version "0.7-0"
+                     #:prefix "aspell6-"
+                     #:sha256
+                     (base32
+                      "07d5s08ba4dd89cmwy9icc01i6fjdykxlb9ravmhdrhi8mxz1mzq")))
+
 (define-public aspell-dict-fr
   (aspell-dictionary "fr" "French"
                      #:version "0.50-3"
@@ -182,12 +238,41 @@ dictionaries, including personal ones.")
                      (base32
                       "13bhbghx5b8g0119g3wxd4n8mlf707y41vlf59irxjj0kynankfn")))
 
+(define-public aspell-dict-hi
+  (aspell-dictionary "hi" "Hindi"
+                     #:version "0.02-0"
+                     #:prefix "aspell6-"
+                     #:sha256
+                     (base32
+                      "0drs374qz4419zx1lf2k281ydxf2750jk5ailafj1x0ncz27h1ys")))
+
 (define-public aspell-dict-it
-  (aspell-dictionary "it" "Italian"
-                     #:version "2.2_20050523-0"
+  (let ((version "2.4-20070901-0")
+        (sha256
+         (base32 "0d6ypii3jblprpibazb6ypady536jz62rwxlss1x1raq07rhvvqn")))
+    (package
+      (inherit (aspell-dictionary "it" "Italian"
+                                  #:version version
+                                  #:sha256 sha256))
+
+      ;; The version hosted at <https://ftp.gnu.org/gnu/aspell/dict> is even
+      ;; more out of date.
+      (source
+       (origin
+         (method url-fetch)
+         (uri (string-append "mirror://sourceforge/linguistico/"
+                             "Dizionario%20italiano%20per%20Aspell/" version "/"
+                             "aspell6-it-" version ".tar.bz2"))
+         (sha256 sha256)))
+       (home-page
+        "http://linguistico.sourceforge.net/pages/dizionario_italiano.html"))))
+
+(define-public aspell-dict-mi
+  (aspell-dictionary "mi" "Maori"
+                     #:version "0.50-0"
                      #:sha256
                      (base32
-                      "1gdf7bc1a0kmxsmphdqq8pl01h667mjsj6hihy6kqy14k5qdq69v")))
+                      "12bxplpd348yx8d2q8qvahi9dlp7qf28qmanzhziwc7np8rixvmy")))
 
 (define-public aspell-dict-nl
   (aspell-dictionary "nl" "Dutch"
@@ -197,13 +282,26 @@ dictionaries, including personal ones.")
                      (base32
                       "0ffb87yjsh211hllpc4b9khqqrblial4pzi1h9r3v465z1yhn3j4")))
 
+(define-public aspell-dict-nn
+  (aspell-dictionary "nn" "Norwegian Nynorsk"
+                     #:version "0.50.1-1"
+                     #:sha256
+                     (base32
+                      "0w2k5l5rbqpliripgqwiqixz5ghnjf7i9ggbrc4ly4vy1ia10rmc")))
+
 (define-public aspell-dict-pt-br
-  (aspell-dictionary "pt-br" "Brazilian Portuguese"
-                     #:version "20090702-0"
-                     #:prefix "aspell6-"
+  (aspell-dictionary "pt_BR" "Brazilian Portuguese"
+                     #:version "20131030-12-0"
+                     #:sha256
+                     (base32
+                      "1xqlpk21s93c6blkdnpk7l62q9fxjvzdv2x86chl8p2x1gdrj3gb")))
+
+(define-public aspell-dict-pt-pt
+  (aspell-dictionary "pt_PT" "Portuguese"
+                     #:version "20190329-1-0"
                      #:sha256
                      (base32
-                      "1y09lx9zf2rnp55r16b2vgj953l3538z1vaqgflg9mdvm555bz3p")))
+                      "0ld0d0ily4jqifjfsxfv4shbicz6ymm2gk56fq9gbzra1j4qnw75")))
 
 (define-public aspell-dict-ru
   (aspell-dictionary "ru" "Russian"
@@ -220,6 +318,13 @@ dictionaries, including personal ones.")
                      (base32
                       "02jwkjhr32kvyibnyzgx3smbnm576jwdzg3avdf6zxwckhy5fw4v")))
 
+(define-public aspell-dict-uk
+  (aspell-dictionary "uk" "Ukrainian"
+                     #:version "1.4.0-0"
+                     #:sha256
+                     (base32
+                      "137i4njvnslab6l4s291s11xijr5jsy75lbdph32f9y183lagy9m")))
+
 \f
 ;;;
 ;;; Hunspell packages made from the Aspell word lists.
@@ -234,7 +339,7 @@ dictionaries, including personal ones.")
                                              (string-downcase language))))
   (package
     (name (string-append "hunspell-dict-" nick))
-    (version "2017.08.24")
+    (version "2018.04.16")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -242,7 +347,7 @@ dictionaries, including personal ones.")
                     version ".tar.gz"))
               (sha256
                (base32
-                "1kdhydzg5z5x20ad2j1x5hbdhvy08ljkfdi2v3gbyvghbagxm15s"))))
+                "11lkrnhwrf5mvrrq45k4mads3n9aswgac8dc25ba61c75alxb5rs"))))
     (native-inputs
      `(("tar" ,tar)
        ("gzip" ,gzip)
@@ -262,7 +367,7 @@ dictionaries, including personal ones.")
              (mkdir "speller/hunspell")
 
              ;; XXX: This actually builds all the dictionary variants.
-             (zero? (system* "make" "-C" "speller" "hunspell"))))
+             (invoke "make" "-C" "speller" "hunspell")))
          (replace 'install
            (lambda* (#:key outputs #:allow-other-keys)
              (let* ((out      (assoc-ref %outputs "out"))