Merge branch 'staging' into core-updates
[jackhill/guix/guix.git] / gnu / packages / enchant.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014 Marek Benc <merkur32@gmail.com>
3 ;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com>
4 ;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr>
5 ;;;
6 ;;; This file is part of GNU Guix.
7 ;;;
8 ;;; GNU Guix is free software; you can redistribute it and/or modify it
9 ;;; under the terms of the GNU General Public License as published by
10 ;;; the Free Software Foundation; either version 3 of the License, or (at
11 ;;; your option) any later version.
12 ;;;
13 ;;; GNU Guix is distributed in the hope that it will be useful, but
14 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ;;; GNU General Public License for more details.
17 ;;;
18 ;;; You should have received a copy of the GNU General Public License
19 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20
21 (define-module (gnu packages enchant)
22 #:use-module (gnu packages)
23 #:use-module (gnu packages aspell)
24 #:use-module (gnu packages check)
25 #:use-module (gnu packages glib)
26 #:use-module (gnu packages pkg-config)
27 #:use-module (guix packages)
28 #:use-module (guix download)
29 #:use-module (guix build-system gnu)
30 #:use-module (guix licenses)
31 #:use-module (srfi srfi-1))
32
33 (define-public enchant
34 (package
35 (name "enchant")
36 (version "2.2.7")
37 (source (origin
38 (method url-fetch)
39 (uri (string-append "https://github.com/AbiWord/enchant/releases"
40 "/download/v" version "/enchant-"
41 version ".tar.gz"))
42 (sha256
43 (base32
44 "029smcna98hllgkm2gy94qa7qphxs4xaa8cdbg5kaaw16mhrf8hv"))))
45 (build-system gnu-build-system)
46 (arguments
47 '(#:configure-flags '("--disable-static"
48 ;; Tests require a relocatable build.
49 "--enable-relocatable")))
50 (inputs
51 `(("aspell" ,aspell))) ;; Currently, the only supported backend in Guix
52 (propagated-inputs ;; is aspell. (This information might be old)
53 ;; Required by enchant.pc.
54 `(("glib" ,glib)))
55 (native-inputs
56 `(("glib:bin" ,glib "bin")
57 ("pkg-config" ,pkg-config)
58 ("unittest-cpp" ,unittest-cpp)))
59 (synopsis "Multi-backend spell-checking library wrapper")
60 (description
61 "On the surface, Enchant appears to be a generic spell checking library.
62 Looking closer, you'll see the Enchant is more-or-less a fancy wrapper around
63 the dlopen() system call.
64
65 Enchant steps in to provide uniformity and conformity on top of these libraries,
66 and implement certain features that may be lacking in any individual provider
67 library. Everything should \"just work\" for any and every definition of \"just
68 working\".")
69 (home-page "https://abiword.github.io/enchant/")
70 (license lgpl2.1+)))
71
72 ;; Some packages are not ready for the 2.x API yet, so we keep this version
73 ;; around. The library and executables of Enchant 2 have been designed not to
74 ;; conflict with 1.x, so it's OK if both end up in the same profile.
75 (define-public enchant-1.6
76 (package
77 (inherit enchant)
78 (version "1.6.0")
79 (arguments '(#:configure-flags '("--disable-static")))
80 (native-inputs (alist-delete "unittest-cpp"
81 (package-native-inputs enchant)))
82 (source (origin
83 (method url-fetch)
84 (uri (string-append "http://www.abisource.com/downloads/enchant/"
85 version "/enchant-" version ".tar.gz"))
86 (sha256
87 (base32
88 "0zq9yw1xzk8k9s6x83n1f9srzcwdavzazn3haln4nhp9wxxrxb1g"))))))