[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
07/17: gnu: aspell: 'dict-dir' set to ~/.guix-profile/lib/aspell or $ASP
From: |
Ludovic Courtès |
Subject: |
07/17: gnu: aspell: 'dict-dir' set to ~/.guix-profile/lib/aspell or $ASPELL_DICT_DIR. |
Date: |
Sat, 20 May 2017 04:24:05 -0400 (EDT) |
civodul pushed a commit to branch version-0.13.0
in repository guix.
commit 56a03975eb287796128e80feb6799bc07f4b8185
Author: Ludovic Courtès <address@hidden>
Date: Wed May 17 16:10:48 2017 +0200
gnu: aspell: 'dict-dir' set to ~/.guix-profile/lib/aspell or
$ASPELL_DICT_DIR.
See <https://bugs.gnu.org/25836> for background.
* gnu/packages/patches/aspell-default-dict-dir.patch: New file.
* gnu/packages/aspell.scm (aspell)[source](patches): New field.
[native-search-paths]: New field.
* gnu/local.mk (dist_patch_DATA): Add it.
---
gnu/local.mk | 1 +
gnu/packages/aspell.scm | 18 +++++++++++++++---
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 2da002b..ca26bcd 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -499,6 +499,7 @@ dist_patch_DATA =
\
%D%/packages/patches/antiword-CVE-2014-8123.patch \
%D%/packages/patches/apr-skip-getservbyname-test.patch \
%D%/packages/patches/artanis-fix-Makefile.in.patch \
+ %D%/packages/patches/aspell-default-dict-dir.patch \
%D%/packages/patches/ath9k-htc-firmware-binutils.patch \
%D%/packages/patches/ath9k-htc-firmware-gcc.patch \
%D%/packages/patches/ath9k-htc-firmware-objcopy.patch \
diff --git a/gnu/packages/aspell.scm b/gnu/packages/aspell.scm
index 06ba2ce..509d428 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 Ludovic Courtès <address@hidden>
+;;; Copyright © 2013, 2014, 2015, 2017 Ludovic Courtès <address@hidden>
;;; Copyright © 2015, 2016 Alex Kost <address@hidden>
;;; Copyright © 2016 John Darrington <address@hidden>
;;; Copyright © 2016 Efraim Flashner <address@hidden>
@@ -26,6 +26,7 @@
#:use-module (guix download)
#:use-module (guix build-system gnu)
#:use-module (guix licenses)
+ #:use-module (gnu packages)
#:use-module (gnu packages perl)
#:use-module (gnu packages base))
@@ -40,7 +41,8 @@
version ".tar.gz"))
(sha256
(base32
- "1qgn5psfyhbrnap275xjfrzppf5a83fb67gpql0kfqv37al869gm"))))
+ "1qgn5psfyhbrnap275xjfrzppf5a83fb67gpql0kfqv37al869gm"))
+ (patches (search-patches "aspell-default-dict-dir.patch"))))
(build-system gnu-build-system)
(arguments
`(#:phases
@@ -53,6 +55,15 @@
'("ASPELL_CONF" "" =
("${ASPELL_CONF:-\"dict-dir
${GUIX_PROFILE:-$HOME/.guix-profile}/lib/aspell\"}")))))))))
(inputs `(("perl" ,perl)))
+
+ (native-search-paths
+ ;; This is a Guix-specific environment variable that takes a single
+ ;; entry, not an actual search path.
+ (list (search-path-specification
+ (variable "ASPELL_DICT_DIR")
+ (separator #f)
+ (files '("lib/aspell")))))
+
(home-page "http://aspell.net/")
(synopsis "Spell checker")
(description
@@ -66,7 +77,8 @@ dictionaries, including personal ones.")
;;; Dictionaries.
;;;
;;; Use 'export ASPELL_CONF="dict-dir $HOME/.guix-profile/lib/aspell"' to use
-;;; them.
+;;; them, or set the Guix-specific 'ASPELL_DICT_DIR', or just do nothing (as
+;;; long as 'HOME' is set, that's fine!).
;;;
(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 0000000..17a6ff6
--- /dev/null
+++ b/gnu/packages/patches/aspell-default-dict-dir.patch
@@ -0,0 +1,20 @@
+This patch changes the default value of 'dict-dir' to correspond
+to ~/.guix-profile/lib/aspell rather than $prefix/lib/aspell-X.Y.
+
+This is not strictly necessary for the 'aspell' program itself since
+one can simply set "ASPELL_CONF=dict-dir $HOME/.guix-profile/lib/aspell".
+However it is necessary for applications that use libaspell since
+'ASPELL_CONF' is not honored in this case. See <https://bugs.gnu.org/25836>.
+
+--- a/common/config.cpp
++++ b/common/config.cpp
+@@ -1349,6 +1349,9 @@ namespace acommon {
+ # define REPL ".aspell.<lang>.prepl"
+ #endif
+
++#undef DICT_DIR
++#define DICT_DIR "<$ASPELL_DICT_DIR|home-dir/.guix-profile/lib/aspell>"
++
+ static const KeyInfo config_keys[] = {
+ // the description should be under 50 chars
+ {"actual-dict-dir", KeyInfoString, "<dict-dir^master>", 0}
- branch version-0.13.0 updated (920803f -> 03119da), Ludovic Courtès, 2017/05/20
- 04/17: profiles: Add elapsed time to manual-database hook to output message., Ludovic Courtès, 2017/05/20
- 01/17: gnu: tor: Update to 0.3.0.7., Ludovic Courtès, 2017/05/20
- 02/17: gnu: glibc/hurd: Use modify-phases syntax., Ludovic Courtès, 2017/05/20
- 03/17: gnu: glibc/hurd: Do not apply i686 patch., Ludovic Courtès, 2017/05/20
- 06/17: build: Compile stackage only if 'guile-json' is available., Ludovic Courtès, 2017/05/20
- 09/17: services: openssh: Don't depend on networking., Ludovic Courtès, 2017/05/20
- 11/17: services: user-homes: Do not create home directories marked as no-create., Ludovic Courtès, 2017/05/20
- 10/17: install: Enable SSH in installation image., Ludovic Courtès, 2017/05/20
- 15/17: gnu: guile-ssh: Fix potential double-free/use-after-free issue., Ludovic Courtès, 2017/05/20
- 07/17: gnu: aspell: 'dict-dir' set to ~/.guix-profile/lib/aspell or $ASPELL_DICT_DIR.,
Ludovic Courtès <=
- 14/17: modules: Add more source-less modules., Ludovic Courtès, 2017/05/20
- 12/17: union: Gracefully handle dangling symlinks in the input., Ludovic Courtès, 2017/05/20
- 13/17: publish: Fix narinfo rendering for already-compressed items., Ludovic Courtès, 2017/05/20
- 17/17: vm: Support creating FAT partitions., Ludovic Courtès, 2017/05/20
- 05/17: gnu: qemu: Fix CVE-2017-7493., Ludovic Courtès, 2017/05/20
- 08/17: maint: The 'release' target builds a VM image., Ludovic Courtès, 2017/05/20
- 16/17: vm: Support arbitrary partition flags., Ludovic Courtès, 2017/05/20