[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#25836: [PATCH] gnu: Add gspell
From: |
Ludovic Courtès |
Subject: |
bug#25836: [PATCH] gnu: Add gspell |
Date: |
Fri, 10 Mar 2017 11:57:12 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) |
Hi Catonano,
Thanks for the patch. I’ve modified the package like this:
--8<---------------cut here---------------start------------->8---
(define-public gspell
(package
(name "gspell")
(version "1.3.2")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnome/sources/" name "/"
(version-major+minor version) "/"
name "-" version ".tar.xz"))
(sha256
(base32
"1n4kd5i11l79h8bpvx3cz79ww0b4z89y99h4czvyg80qlarn585w"))))
(build-system glib-or-gtk-build-system)
(arguments
'(#:phases
(modify-phases %standard-phases
(add-before 'check 'pre-check
(lambda* (#:key inputs #:allow-other-keys)
;; Tests require a running X server.
(system "Xvfb :1 &")
(setenv "DISPLAY" ":1")
;; For the missing /etc/machine-id.
(setenv "DBUS_FATAL_WARNINGS" "0")
;; Allow Enchant and its Aspell backend to find the en_US
;; dictionary.
(setenv "ASPELL_CONF"
(string-append "dict-dir "
(assoc-ref inputs "aspell-dict-en")
"/lib/aspell"))
#t)))))
(inputs
`(("enchant" ,enchant)
("iso-codes" ,iso-codes)
("gtk+" ,gtk+)
("glib" ,glib)))
(native-inputs
`(("glib" ,glib "bin")
("pkg-config" ,pkg-config)
("xmllint" ,libxml2)
;; For tests.
("xorg-server" ,xorg-server)
("aspell-dict-en" ,aspell-dict-en)))
(home-page
"https://wiki.gnome.org/Projects/gspell")
(synopsis "GNOME's alternative spell checker")
(description
"gspell provides a flexible API to add spell checking to a GTK+
application.")
(license license:gpl2+)))
--8<---------------cut here---------------end--------------->8---
However, the tests still fail to find dictionaries as can be seen in
test-checker.log for instance:
--8<---------------cut here---------------start------------->8---
process 133: D-Bus library appears to be incorrectly set up; failed to read
machine uuid: Failed to open "/etc/machine-id": No such file or directory
See the manual page for dbus-uuidgen to correct this issue.
/checker/check_word: **
ERROR:../../gspell-1.3.2/testsuite/test-checker.c:32:test_check_word: assertion
failed: (lang != NULL)
FAIL test-checker (exit status: 134)
--8<---------------cut here---------------end--------------->8---
(The bit about D-Bus is a harmless warning.) The assertion failure
corresponds to:
--8<---------------cut here---------------start------------->8---
lang = gspell_language_lookup ("en_US");
g_assert (lang != NULL);
--8<---------------cut here---------------end--------------->8---
For some reason, ‘get_aspell_dict_info_list’ looks for things under
Aspell’s $prefix, and thus returns an empty list.
This is because ‘ASPELL_CONF’ is ignored here, contrary to what happens
when running the ‘aspell’ program.
To be continued…
Ludo’.
- bug#25836: [PATCH] gnu: Add gspell,
Ludovic Courtès <=