diff options
| -rw-r--r-- | gnu/local.mk | 1 | ||||
| -rw-r--r-- | gnu/packages/aspell.scm | 18 | ||||
| -rw-r--r-- | gnu/packages/patches/aspell-default-dict-dir.patch | 20 |
3 files changed, 36 insertions, 3 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index 2da002b3791..ca26bcd812f 100644 --- a/gnu/local.mk +++ b/gnu/local.mk | |||
| @@ -499,6 +499,7 @@ dist_patch_DATA = \ | |||
| 499 | %D%/packages/patches/antiword-CVE-2014-8123.patch \ | 499 | %D%/packages/patches/antiword-CVE-2014-8123.patch \ |
| 500 | %D%/packages/patches/apr-skip-getservbyname-test.patch \ | 500 | %D%/packages/patches/apr-skip-getservbyname-test.patch \ |
| 501 | %D%/packages/patches/artanis-fix-Makefile.in.patch \ | 501 | %D%/packages/patches/artanis-fix-Makefile.in.patch \ |
| 502 | %D%/packages/patches/aspell-default-dict-dir.patch \ | ||
| 502 | %D%/packages/patches/ath9k-htc-firmware-binutils.patch \ | 503 | %D%/packages/patches/ath9k-htc-firmware-binutils.patch \ |
| 503 | %D%/packages/patches/ath9k-htc-firmware-gcc.patch \ | 504 | %D%/packages/patches/ath9k-htc-firmware-gcc.patch \ |
| 504 | %D%/packages/patches/ath9k-htc-firmware-objcopy.patch \ | 505 | %D%/packages/patches/ath9k-htc-firmware-objcopy.patch \ |
diff --git a/gnu/packages/aspell.scm b/gnu/packages/aspell.scm index 06ba2ce4727..509d428f649 100644 --- a/gnu/packages/aspell.scm +++ b/gnu/packages/aspell.scm | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | ;;; GNU Guix --- Functional package management for GNU | 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org> | 2 | ;;; Copyright © 2013, 2014, 2015, 2017 Ludovic Courtès <ludo@gnu.org> |
| 3 | ;;; Copyright © 2015, 2016 Alex Kost <alezost@gmail.com> | 3 | ;;; Copyright © 2015, 2016 Alex Kost <alezost@gmail.com> |
| 4 | ;;; Copyright © 2016 John Darrington <jmd@gnu.org> | 4 | ;;; Copyright © 2016 John Darrington <jmd@gnu.org> |
| 5 | ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il> | 5 | ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il> |
| @@ -26,6 +26,7 @@ | |||
| 26 | #:use-module (guix download) | 26 | #:use-module (guix download) |
| 27 | #:use-module (guix build-system gnu) | 27 | #:use-module (guix build-system gnu) |
| 28 | #:use-module (guix licenses) | 28 | #:use-module (guix licenses) |
| 29 | #:use-module (gnu packages) | ||
| 29 | #:use-module (gnu packages perl) | 30 | #:use-module (gnu packages perl) |
| 30 | #:use-module (gnu packages base)) | 31 | #:use-module (gnu packages base)) |
| 31 | 32 | ||
| @@ -40,7 +41,8 @@ | |||
| 40 | version ".tar.gz")) | 41 | version ".tar.gz")) |
| 41 | (sha256 | 42 | (sha256 |
| 42 | (base32 | 43 | (base32 |
| 43 | "1qgn5psfyhbrnap275xjfrzppf5a83fb67gpql0kfqv37al869gm")))) | 44 | "1qgn5psfyhbrnap275xjfrzppf5a83fb67gpql0kfqv37al869gm")) |
| 45 | (patches (search-patches "aspell-default-dict-dir.patch")))) | ||
| 44 | (build-system gnu-build-system) | 46 | (build-system gnu-build-system) |
| 45 | (arguments | 47 | (arguments |
| 46 | `(#:phases | 48 | `(#:phases |
| @@ -53,6 +55,15 @@ | |||
| 53 | '("ASPELL_CONF" "" = | 55 | '("ASPELL_CONF" "" = |
| 54 | ("${ASPELL_CONF:-\"dict-dir ${GUIX_PROFILE:-$HOME/.guix-profile}/lib/aspell\"}"))))))))) | 56 | ("${ASPELL_CONF:-\"dict-dir ${GUIX_PROFILE:-$HOME/.guix-profile}/lib/aspell\"}"))))))))) |
| 55 | (inputs `(("perl" ,perl))) | 57 | (inputs `(("perl" ,perl))) |
| 58 | |||
| 59 | (native-search-paths | ||
| 60 | ;; This is a Guix-specific environment variable that takes a single | ||
| 61 | ;; entry, not an actual search path. | ||
| 62 | (list (search-path-specification | ||
| 63 | (variable "ASPELL_DICT_DIR") | ||
| 64 | (separator #f) | ||
| 65 | (files '("lib/aspell"))))) | ||
| 66 | |||
| 56 | (home-page "http://aspell.net/") | 67 | (home-page "http://aspell.net/") |
| 57 | (synopsis "Spell checker") | 68 | (synopsis "Spell checker") |
| 58 | (description | 69 | (description |
| @@ -66,7 +77,8 @@ dictionaries, including personal ones.") | |||
| 66 | ;;; Dictionaries. | 77 | ;;; Dictionaries. |
| 67 | ;;; | 78 | ;;; |
| 68 | ;;; Use 'export ASPELL_CONF="dict-dir $HOME/.guix-profile/lib/aspell"' to use | 79 | ;;; Use 'export ASPELL_CONF="dict-dir $HOME/.guix-profile/lib/aspell"' to use |
| 69 | ;;; them. | 80 | ;;; them, or set the Guix-specific 'ASPELL_DICT_DIR', or just do nothing (as |
| 81 | ;;; long as 'HOME' is set, that's fine!). | ||
| 70 | ;;; | 82 | ;;; |
| 71 | 83 | ||
| 72 | (define* (aspell-dictionary dict-name full-name | 84 | (define* (aspell-dictionary dict-name full-name |
diff --git a/gnu/packages/patches/aspell-default-dict-dir.patch b/gnu/packages/patches/aspell-default-dict-dir.patch new file mode 100644 index 00000000000..17a6ff606f5 --- /dev/null +++ b/gnu/packages/patches/aspell-default-dict-dir.patch | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | This patch changes the default value of 'dict-dir' to correspond | ||
| 2 | to ~/.guix-profile/lib/aspell rather than $prefix/lib/aspell-X.Y. | ||
| 3 | |||
| 4 | This is not strictly necessary for the 'aspell' program itself since | ||
| 5 | one can simply set "ASPELL_CONF=dict-dir $HOME/.guix-profile/lib/aspell". | ||
| 6 | However it is necessary for applications that use libaspell since | ||
| 7 | 'ASPELL_CONF' is not honored in this case. See <https://bugs.gnu.org/25836>. | ||
| 8 | |||
| 9 | --- a/common/config.cpp | ||
| 10 | +++ b/common/config.cpp | ||
| 11 | @@ -1349,6 +1349,9 @@ namespace acommon { | ||
| 12 | # define REPL ".aspell.<lang>.prepl" | ||
| 13 | #endif | ||
| 14 | |||
| 15 | +#undef DICT_DIR | ||
| 16 | +#define DICT_DIR "<$ASPELL_DICT_DIR|home-dir/.guix-profile/lib/aspell>" | ||
| 17 | + | ||
| 18 | static const KeyInfo config_keys[] = { | ||
| 19 | // the description should be under 50 chars | ||
| 20 | {"actual-dict-dir", KeyInfoString, "<dict-dir^master>", 0} | ||
