guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/02: gnu: hunspell-dict-en: Include all the .dic files.


From: Ludovic Courtès
Subject: 01/02: gnu: hunspell-dict-en: Include all the .dic files.
Date: Fri, 12 Jan 2018 19:59:18 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit 22c334fa2e9c42fd79eef86f71a704c437ac917e
Author: Ludovic Courtès <address@hidden>
Date:   Sat Jan 13 00:32:55 2018 +0100

    gnu: hunspell-dict-en: Include all the .dic files.
    
    Fixes a regression introduced in
    d4d7d70912642be18d93c9ce6470f8650097b5e5 which broke
    'hunspell-dict-en' (but not the 'hunspell-dict-en-*' variants.)
    
    * gnu/packages/aspell.scm (aspell-word-list)[install]: Check whether
    'LANGUAGE.dic' exist before installing it.  If it doesn't exist, install
    all of *.dic.
---
 gnu/packages/aspell.scm | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/aspell.scm b/gnu/packages/aspell.scm
index ec8fa05..e1fe3db 100644
--- a/gnu/packages/aspell.scm
+++ b/gnu/packages/aspell.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2017 Ludovic Courtès <address@hidden>
+;;; Copyright © 2013, 2014, 2015, 2017, 2018 Ludovic Courtès <address@hidden>
 ;;; Copyright © 2015, 2016 Alex Kost <address@hidden>
 ;;; Copyright © 2016 John Darrington <address@hidden>
 ;;; Copyright © 2016, 2017 Efraim Flashner <address@hidden>
@@ -268,10 +268,20 @@ dictionaries, including personal ones.")
                     (hunspell (string-append out "/share/hunspell"))
                     (myspell  (string-append out "/share/myspell"))
                     (doc      (string-append out "/share/doc/"
-                                             ,name)))
+                                             ,name))
+                    (dot-dic  ,(string-append "speller/" language ".dic")))
                (mkdir-p myspell)
-               (install-file ,(string-append "speller/" language ".dic")
-                             hunspell)
+
+               ;; Usually there's only a 'LANGUAGE.dic' file, but for the "en"
+               ;; dictionary, there no 'en.dic'.  Instead, there's a set of
+               ;; 'en*.dic' files, hence the 'find-files' call below.
+               (if (file-exists? dot-dic)
+                   (install-file dot-dic hunspell)
+                   (for-each (lambda (dic)
+                               (install-file dic hunspell))
+                             (find-files "speller"
+                                         ,(string-append language 
".*\\.dic$"))))
+
                (install-file ,(string-append "speller/" language ".aff")
                              hunspell)
                (symlink hunspell (string-append myspell "/dicts"))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]