gnu: facter: Update to 4.0.33.
[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>
4c7ca747 4;;; Copyright © 2019 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)
c1d59b3c 25 #:use-module (gnu packages check)
1deac344 26 #:use-module (gnu packages glib)
43b4f936 27 #:use-module (gnu packages libreoffice)
1deac344
MB
28 #:use-module (gnu packages pkg-config)
29 #:use-module (guix packages)
30 #:use-module (guix download)
31 #:use-module (guix build-system gnu)
43b4f936 32 #:use-module (guix build-system python)
c1d59b3c
MB
33 #:use-module (guix licenses)
34 #:use-module (srfi srfi-1))
1deac344
MB
35
36(define-public enchant
37 (package
38 (name "enchant")
2f894cbc 39 (version "2.2.8")
c1d59b3c
MB
40 (source (origin
41 (method url-fetch)
42 (uri (string-append "https://github.com/AbiWord/enchant/releases"
43 "/download/v" version "/enchant-"
44 version ".tar.gz"))
45 (sha256
46 (base32
2f894cbc 47 "0m9m564qqwbssvvf7y3dlz1yxzqsjiqy1yd2zsmb3l0d7y2y5df7"))))
1deac344 48 (build-system gnu-build-system)
18ef85b6 49 (arguments
c1d59b3c
MB
50 '(#:configure-flags '("--disable-static"
51 ;; Tests require a relocatable build.
52 "--enable-relocatable")))
1deac344 53 (inputs
9a59b294
MB
54 `(("aspell" ,aspell))) ;; Currently, the only supported backend in Guix
55 (propagated-inputs ;; is aspell. (This information might be old)
56 ;; Required by enchant.pc.
57 `(("glib" ,glib)))
1deac344
MB
58 (native-inputs
59 `(("glib:bin" ,glib "bin")
c1d59b3c
MB
60 ("pkg-config" ,pkg-config)
61 ("unittest-cpp" ,unittest-cpp)))
1deac344
MB
62 (synopsis "Multi-backend spell-checking library wrapper")
63 (description
64 "On the surface, Enchant appears to be a generic spell checking library.
65Looking closer, you'll see the Enchant is more-or-less a fancy wrapper around
66the dlopen() system call.
67
68Enchant steps in to provide uniformity and conformity on top of these libraries,
69and implement certain features that may be lacking in any individual provider
70library. Everything should \"just work\" for any and every definition of \"just
e881752c 71working\".")
52b87855 72 (home-page "https://abiword.github.io/enchant/")
1deac344 73 (license lgpl2.1+)))
c1d59b3c
MB
74
75;; Some packages are not ready for the 2.x API yet, so we keep this version
76;; around. The library and executables of Enchant 2 have been designed not to
77;; conflict with 1.x, so it's OK if both end up in the same profile.
78(define-public enchant-1.6
79 (package
80 (inherit enchant)
81 (version "1.6.0")
82 (arguments '(#:configure-flags '("--disable-static")))
83 (native-inputs (alist-delete "unittest-cpp"
84 (package-native-inputs enchant)))
85 (source (origin
86 (method url-fetch)
87 (uri (string-append "http://www.abisource.com/downloads/enchant/"
88 version "/enchant-" version ".tar.gz"))
89 (sha256
90 (base32
91 "0zq9yw1xzk8k9s6x83n1f9srzcwdavzazn3haln4nhp9wxxrxb1g"))))))
43b4f936
JL
92
93(define-public python-pyenchant
94 (package
95 (name "python-pyenchant")
96 (version "2.0.0")
97 (source (origin
98 (method url-fetch)
99 (uri (pypi-uri "pyenchant" version))
100 (sha256
101 (base32
102 "1872ckgdip8nj9rnh167m0gsj5754qfg2hjxzsl1s06f5akwscgw"))))
103 (build-system python-build-system)
104 (arguments
105 `(#:tests? #f; FIXME: Dictionary for language 'en_US' could not be found
106 #:phases
107 (modify-phases %standard-phases
108 (add-before 'build 'setlib
109 (lambda* (#:key inputs #:allow-other-keys)
110 (substitute* "enchant/_enchant.py"
111 (("/opt/local/lib/libenchant.dylib\"")
112 (string-append "/opt/local/lib/libenchant.dylib\"\n"
113 " yield \"" (assoc-ref inputs "enchant")
114 "/lib/libenchant-2.so\""))))))))
115 (inputs
116 `(("enchant" ,enchant)))
117 (home-page "https://github.com/pyenchant/pyenchant")
118 (synopsis "Spellchecking library for Python")
119 (description "PyEnchant is a spellchecking library for Python, based on the
120Enchant library. PyEnchant combines all the functionality of the underlying
121Enchant library with the flexibility of Python. It also provides some
122higher-level functionality than is available in the C API.")
123 (license lgpl2.1+)))