gnu: emacs-consult: Fix grammar.
[jackhill/guix/guix.git] / gnu / packages / enchant.scm
CommitLineData
1deac344
MB
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2014 Marek Benc <merkur32@gmail.com>
c1d59b3c 3;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com>
65b6682e 4;;; Copyright © 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
43b4f936 5;;; Copyright © 2020 Julien Lepiller <julien@lepiller.eu>
1deac344
MB
6;;;
7;;; This file is part of GNU Guix.
8;;;
9;;; GNU Guix is free software; you can redistribute it and/or modify it
10;;; under the terms of the GNU General Public License as published by
11;;; the Free Software Foundation; either version 3 of the License, or (at
12;;; your option) any later version.
13;;;
14;;; GNU Guix is distributed in the hope that it will be useful, but
15;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17;;; GNU General Public License for more details.
18;;;
19;;; You should have received a copy of the GNU General Public License
20;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21
22(define-module (gnu packages enchant)
23 #:use-module (gnu packages)
24 #:use-module (gnu packages aspell)
5c5dfb6d 25 #:use-module (gnu packages boost)
c1d59b3c 26 #:use-module (gnu packages check)
1deac344 27 #:use-module (gnu packages glib)
5c5dfb6d 28 #:use-module (gnu packages icu4c)
43b4f936 29 #:use-module (gnu packages libreoffice)
5c5dfb6d
RG
30 #:use-module (gnu packages man)
31 #:use-module (gnu packages perl)
1deac344 32 #:use-module (gnu packages pkg-config)
5c5dfb6d 33 #:use-module (gnu packages version-control)
1deac344 34 #:use-module (guix packages)
5c5dfb6d 35 #:use-module (guix git-download)
1deac344 36 #:use-module (guix download)
5c5dfb6d 37 #:use-module (guix build-system cmake)
1deac344 38 #:use-module (guix build-system gnu)
43b4f936 39 #:use-module (guix build-system python)
c1d59b3c
MB
40 #:use-module (guix licenses)
41 #:use-module (srfi srfi-1))
1deac344 42
5c5dfb6d
RG
43(define-public nuspell
44 (package
45 (name "nuspell")
65b6682e 46 (version "3.1.2")
5c5dfb6d
RG
47 (source
48 (origin
49 (method git-fetch)
50 (uri
51 (git-reference
8ed4c468 52 (url "https://github.com/nuspell/nuspell")
5c5dfb6d
RG
53 (commit
54 (string-append "v" version))))
55 (file-name
56 (git-file-name name version))
57 (sha256
65b6682e 58 (base32 "0wbb6dwmzlsyy224y0liis0azgzwbjdvcyzc31pw1aw6vbp36na6"))))
5c5dfb6d
RG
59 (build-system cmake-build-system)
60 (native-inputs
61 `(("catch" ,catch-framework2)
62 ("git" ,git-minimal)
63 ("perl" ,perl)
64 ;;FIX-ME: Building with ronn fails.
65 ;;("ronn" ,ronn)
66 ("pkg-config" ,pkg-config)))
67 (inputs
68 `(("boost" ,boost)))
69 (propagated-inputs
70 `(("icu4c" ,icu4c)))
71 (synopsis "Fast and safe spellchecking C++ library")
72 (description "Nuspell is a fast and safe spelling checker software
73program. It is designed for languages with rich morphology and complex word
74compounding. Nuspell is written in modern C++ and it supports Hunspell
75dictionaries.")
76 (home-page "https://nuspell.github.io/")
77 (license lgpl3+)))
78
1deac344
MB
79(define-public enchant
80 (package
81 (name "enchant")
1a86305c 82 (version "2.2.15")
c1d59b3c
MB
83 (source (origin
84 (method url-fetch)
85 (uri (string-append "https://github.com/AbiWord/enchant/releases"
86 "/download/v" version "/enchant-"
87 version ".tar.gz"))
88 (sha256
89 (base32
1a86305c 90 "00vcykbb7lxh51prvmsb62a06q18a6rlk9ba5a7g45c1awaj43rv"))))
1deac344 91 (build-system gnu-build-system)
18ef85b6 92 (arguments
c1d59b3c
MB
93 '(#:configure-flags '("--disable-static"
94 ;; Tests require a relocatable build.
95 "--enable-relocatable")))
1deac344 96 (inputs
c5b20437
JL
97 `(("aspell" ,aspell)
98 ("hunspell" ,hunspell)))
99 (propagated-inputs
9a59b294
MB
100 ;; Required by enchant.pc.
101 `(("glib" ,glib)))
1deac344
MB
102 (native-inputs
103 `(("glib:bin" ,glib "bin")
c1d59b3c
MB
104 ("pkg-config" ,pkg-config)
105 ("unittest-cpp" ,unittest-cpp)))
1deac344
MB
106 (synopsis "Multi-backend spell-checking library wrapper")
107 (description
108 "On the surface, Enchant appears to be a generic spell checking library.
109Looking closer, you'll see the Enchant is more-or-less a fancy wrapper around
110the dlopen() system call.
111
112Enchant steps in to provide uniformity and conformity on top of these libraries,
113and implement certain features that may be lacking in any individual provider
114library. Everything should \"just work\" for any and every definition of \"just
e881752c 115working\".")
52b87855 116 (home-page "https://abiword.github.io/enchant/")
1deac344 117 (license lgpl2.1+)))
c1d59b3c
MB
118
119;; Some packages are not ready for the 2.x API yet, so we keep this version
120;; around. The library and executables of Enchant 2 have been designed not to
121;; conflict with 1.x, so it's OK if both end up in the same profile.
122(define-public enchant-1.6
123 (package
124 (inherit enchant)
125 (version "1.6.0")
126 (arguments '(#:configure-flags '("--disable-static")))
127 (native-inputs (alist-delete "unittest-cpp"
128 (package-native-inputs enchant)))
129 (source (origin
130 (method url-fetch)
131 (uri (string-append "http://www.abisource.com/downloads/enchant/"
132 version "/enchant-" version ".tar.gz"))
133 (sha256
134 (base32
135 "0zq9yw1xzk8k9s6x83n1f9srzcwdavzazn3haln4nhp9wxxrxb1g"))))))
43b4f936
JL
136
137(define-public python-pyenchant
138 (package
139 (name "python-pyenchant")
140 (version "2.0.0")
141 (source (origin
142 (method url-fetch)
143 (uri (pypi-uri "pyenchant" version))
144 (sha256
145 (base32
146 "1872ckgdip8nj9rnh167m0gsj5754qfg2hjxzsl1s06f5akwscgw"))))
147 (build-system python-build-system)
148 (arguments
149 `(#:tests? #f; FIXME: Dictionary for language 'en_US' could not be found
150 #:phases
151 (modify-phases %standard-phases
152 (add-before 'build 'setlib
153 (lambda* (#:key inputs #:allow-other-keys)
154 (substitute* "enchant/_enchant.py"
155 (("/opt/local/lib/libenchant.dylib\"")
156 (string-append "/opt/local/lib/libenchant.dylib\"\n"
157 " yield \"" (assoc-ref inputs "enchant")
158 "/lib/libenchant-2.so\""))))))))
159 (inputs
160 `(("enchant" ,enchant)))
161 (home-page "https://github.com/pyenchant/pyenchant")
162 (synopsis "Spellchecking library for Python")
163 (description "PyEnchant is a spellchecking library for Python, based on the
164Enchant library. PyEnchant combines all the functionality of the underlying
165Enchant library with the flexibility of Python. It also provides some
166higher-level functionality than is available in the C API.")
167 (license lgpl2.1+)))