projects/guix·blob java-team · refs

513 lines · 19.7 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013, 2014, 2015, 2017, 2018, 2019, 2020 Ludovic Courtès <[email protected]>
3;;; Copyright © 2015, 2016 Alex Kost <[email protected]>
4;;; Copyright © 2016 John Darrington <[email protected]>
5;;; Copyright © 2016, 2017, 2019, 2020, 2022 Efraim Flashner <[email protected]>
6;;; Copyright © 2016 Christopher Andersson <[email protected]>
7;;; Copyright © 2016 Theodoros Foradis <[email protected]>
8;;; Copyright © 2016, 2017, 2019, 2021 Tobias Geerinckx-Rice <[email protected]>
9;;; Copyright © 2019 Jens Mølgaard <[email protected]>
10;;; Copyright © 2020 Timotej Lazar <[email protected]>
11;;; Copyright © 2020 Marcin Karpezo <[email protected]>
12;;; Copyright © 2020 Jonathan Brielmaier <[email protected]>
13;;; Copyright © 2020 Jakub Kądziołka <[email protected]>
14;;; Copyright © 2020 Noah Landis <[email protected]>
15;;; Copyright © 2021 Sergiu Ivanov <[email protected]>
16;;; Copyright © 2023 Yovan Naumovski <[email protected]>
17;;; Copyright © 2023 Zheng Junjie <[email protected]>
18;;; Copyright © 2024, 2025 Maxim Cournoyer <[email protected]>
19;;;
20;;; This file is part of GNU Guix.
21;;;
22;;; GNU Guix is free software; you can redistribute it and/or modify it
23;;; under the terms of the GNU General Public License as published by
24;;; the Free Software Foundation; either version 3 of the License, or (at
25;;; your option) any later version.
26;;;
27;;; GNU Guix is distributed in the hope that it will be useful, but
28;;; WITHOUT ANY WARRANTY; without even the implied warranty of
29;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30;;; GNU General Public License for more details.
31;;;
32;;; You should have received a copy of the GNU General Public License
33;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
34
35(define-module (gnu packages aspell)
36 #:use-module (guix packages)
37 #:use-module (guix download)
38 #:use-module (guix gexp)
39 #:use-module (guix git-download)
40 #:use-module (guix build-system cmake)
41 #:use-module (guix build-system gnu)
42 #:use-module (guix licenses)
43 #:use-module (guix utils)
44 #:use-module (gnu packages)
45 #:use-module (gnu packages base)
46 #:use-module (gnu packages bison)
47 #:use-module (gnu packages compression)
48 #:use-module (gnu packages ncurses)
49 #:use-module (gnu packages perl)
50 #:use-module (ice-9 match))
51
52(define-public aspell
53 (package
54 (name "aspell")
55 (version "0.60.8.2")
56 (source
57 (origin
58 (method url-fetch)
59 (uri (string-append "mirror://gnu/aspell/aspell-"
60 version ".tar.gz"))
61 (sha256
62 (base32
63 "06b9szgm9cj1zh58r7sbl5fbi3vi9fs7b1as4ir8y176x9ilizjp"))
64 (patches (search-patches "aspell-default-dict-dir.patch"))))
65 (build-system gnu-build-system)
66 (arguments
67 `(#:phases
68 (modify-phases %standard-phases
69 (add-before 'build 'set-filter-path
70 (lambda* (#:key outputs #:allow-other-keys)
71 ;; Change the default value of 'filter-path' so that filters such
72 ;; as 'tex-filter.so' can be found. By default none of the
73 ;; filters would be found.
74 (let* ((out (assoc-ref outputs "out"))
75 (libdir (string-append out "/lib/aspell-"
76 ,(version-major+minor version))))
77 (substitute* "common/config.cpp"
78 (("\"filter-path(.*)DICT_DIR" _ middle)
79 (string-append "\"filter-path" middle
80 "\"" libdir "\"")))))))))
81 (native-inputs (list perl))
82
83 (native-search-paths
84 ;; This is a Guix-specific environment variable that takes a single
85 ;; entry, not an actual search path.
86 (list (search-path-specification
87 (variable "ASPELL_DICT_DIR")
88 (separator #f)
89 (files '("lib/aspell")))))
90
91 (home-page "http://aspell.net/")
92 (synopsis "Spell checker")
93 (description
94 "Aspell is a spell-checker which can be used either as a library or as
95a standalone program. Notable features of Aspell include its full support of
96documents written in the UTF-8 encoding and its ability to use multiple
97dictionaries, including personal ones.")
98 (license lgpl2.1+)))
99
100;;;
101;;; Dictionaries.
102;;;
103;;; Use 'export ASPELL_CONF="dict-dir $HOME/.guix-profile/lib/aspell"' to use
104;;; them, or set the Guix-specific 'ASPELL_DICT_DIR', or just do nothing (as
105;;; long as 'HOME' is set, that's fine!).
106;;;
107
108(define* (aspell-dictionary dict-name full-name
109 #:key version sha256 (prefix "aspell6-"))
110 (package
111 (name (string-append
112 "aspell-dict-"
113 ;; Downcase and replace underscore in package names
114 ;; to follow Guix naming conventions.
115 (string-map (match-lambda
116 (#\_ #\-)
117 (chr chr))
118 (string-downcase dict-name))))
119 (version version)
120 (source (origin
121 (method url-fetch)
122 (uri (string-append "mirror://gnu/aspell/dict/" dict-name
123 "/" prefix dict-name "-"
124 version ".tar.bz2"))
125 (hash (content-hash sha256))))
126 (build-system gnu-build-system)
127 (arguments
128 `(#:phases
129 (modify-phases %standard-phases
130 (replace 'configure
131 (lambda* (#:key outputs #:allow-other-keys)
132 (let ((out (assoc-ref outputs "out")))
133 (invoke "./configure")))))
134 #:make-flags
135 (let ((out (assoc-ref %outputs "out")))
136 (list (string-append "dictdir=" out "/lib/aspell")
137 (string-append "datadir=" out "/lib/aspell")))
138 #:tests? #f))
139 (native-inputs (list aspell which))
140 (synopsis (string-append full-name " dictionary for GNU Aspell")) ; XXX: i18n
141 (description
142 "This package provides a dictionary for the GNU Aspell spell checker.")
143 (license gpl2+)
144 (properties
145 ;; Unfortunately any versions with a trailing 'dash and digit' (eg.: '-0')
146 ;; will fail to register as a version.
147 `((upstream-name . ,(string-append prefix dict-name))
148 (ftp-directory . ,(string-append "/aspell/dict/" dict-name))))
149 (home-page "http://aspell.net/")))
150
151
152(define-public aspell-dict-ar
153 (aspell-dictionary "ar" "Arabic"
154 #:version "1.2-0"
155 #:prefix "aspell6-"
156 #:sha256
157 (base32
158 "1avw40bp8yi5bnkq64ihm2rldgw34lk89yz281q9bmndh95a47h4")))
159
160(define-public aspell-dict-be
161 (aspell-dictionary "be" "Belarusian"
162 #:version "0.01"
163 #:prefix "aspell5-"
164 #:sha256
165 (base32
166 "1svls9p7rsfi3hs0afh0cssj006qb4v1ik2yzqgj8hm10c6as2sm")))
167
168(define-public aspell-dict-bg
169 (aspell-dictionary "bg" "Bulgarian"
170 #:version "4.1-0"
171 #:prefix "aspell6-"
172 #:sha256
173 (base32
174 "1alacmgpfk0yrgq83y23d16fhav1bxmb98kg8d2a5r9bvh2h0mvl")))
175
176(define-public aspell-dict-bn
177 (aspell-dictionary "bn" "Bengali"
178 #:version "0.01.1-1"
179 #:sha256
180 (base32
181 "1nc02jd67iggirwxnhdvlvaqm0xfyks35c4psszzj3dhzv29qgxh")))
182
183(define-public aspell-dict-ca
184 (let ((version "2.5.0")
185 (sha256
186 (base32 "0kbi8fi7a1bys31kfqrlh332gyik0cfdmxgl7n15sa9c305rkgwq")))
187 (package
188 (inherit (aspell-dictionary "ca" "Catalan"
189 #:version version
190 #:sha256 sha256))
191 (source
192 (origin
193 (method url-fetch)
194 (uri (string-append "https://www.softcatala.org/pub/softcatala/aspell/"
195 version "/aspell6-ca-" version ".tar.bz2"))
196 (hash (content-hash sha256))))
197 (home-page "https://www.softcatala.org/pub/softcatala/aspell/"))))
198
199(define-public aspell-dict-cs
200 (aspell-dictionary "cs" "Czech"
201 #:version "20040614-1"
202 #:sha256
203 (base32
204 "0rihj4hsw96pd9casvmpvw3r8040pfa28p1h73x4vyn20zwr3h01")))
205
206(define-public aspell-dict-de
207 (aspell-dictionary "de" "German"
208 #:version "20161207-7-0"
209 #:sha256
210 (base32
211 "0wamclvp66xfmv5wff96v6gdlnfv4y8lx3f8wvxyzm5imwgms4n2")))
212
213(define-public aspell-dict-da
214 (aspell-dictionary "da" "Danish"
215 #:version "1.6.36-11-0"
216 #:sha256
217 (base32
218 "1xz2haayvwlxgss9jf1x2311a1ixbk75q2vgfprjhibsmb7cpinv")))
219
220(define-public aspell-dict-el
221 (aspell-dictionary "el" "Greek"
222 #:version "0.08-0"
223 #:prefix "aspell6-"
224 #:sha256
225 (base32
226 "1ljcc30zg2v2h3w5h5jr5im41mw8jbsgvvhdd2cii2yzi8d0zxja")))
227
228(define-public aspell-dict-en
229 (aspell-dictionary "en" "English"
230 #:version "2020.12.07-0"
231 #:sha256
232 (base32
233 "1cwzqkm8gr1w51rpckwlvb43sb0b5nbwy7s8ns5vi250515773sc")))
234
235(define-public aspell-dict-eo
236 (aspell-dictionary "eo" "Esperanto"
237 #:version "2.1.20000225a-2"
238 #:sha256
239 (base32
240 "09vf0mbiicbmyb4bwb7v7lgpabnylg0wy7m3hlhl5rjdda6x3lj1")))
241
242(define-public aspell-dict-es
243 (aspell-dictionary "es" "Spanish"
244 #:version "1.11-2"
245 #:sha256
246 (base32
247 "1k5g328ac1hdpp6fsg57d8md6i0aqcwlszp3gbmp5706wyhpydmd")))
248
249(define-public aspell-dict-fi
250 (aspell-dictionary "fi" "Finnish"
251 #:version "0.7-0"
252 #:prefix "aspell6-"
253 #:sha256
254 (base32
255 "07d5s08ba4dd89cmwy9icc01i6fjdykxlb9ravmhdrhi8mxz1mzq")))
256
257(define-public aspell-dict-fr
258 (aspell-dictionary "fr" "French"
259 #:version "0.50-3"
260 #:prefix "aspell-"
261 #:sha256
262 (base32
263 "14ffy9mn5jqqpp437kannc3559bfdrpk7r36ljkzjalxa53i0hpr")))
264
265(define-public aspell-dict-grc
266 (aspell-dictionary "grc" "Ancient Greek"
267 #:version "0.02-0"
268 #:sha256
269 (base32
270 "1zxr8958v37v260fkqd4pg37ns5h5kyqm54hn1hg70wq5cz8h512")))
271
272(define-public aspell-dict-he
273 (aspell-dictionary "he" "Hebrew"
274 #:version "1.0-0"
275 #:sha256
276 (base32
277 "13bhbghx5b8g0119g3wxd4n8mlf707y41vlf59irxjj0kynankfn")))
278
279(define-public aspell-dict-hi
280 (aspell-dictionary "hi" "Hindi"
281 #:version "0.02-0"
282 #:prefix "aspell6-"
283 #:sha256
284 (base32
285 "0drs374qz4419zx1lf2k281ydxf2750jk5ailafj1x0ncz27h1ys")))
286
287(define-public aspell-dict-it
288 (let ((version "2.4-20070901-0")
289 (sha256
290 (base32 "0d6ypii3jblprpibazb6ypady536jz62rwxlss1x1raq07rhvvqn")))
291 (package
292 (inherit (aspell-dictionary "it" "Italian"
293 #:version version
294 #:sha256 sha256))
295
296 ;; The version hosted at <https://ftp.gnu.org/gnu/aspell/dict> is even
297 ;; more out of date.
298 (source
299 (origin
300 (method url-fetch)
301 (uri (string-append "mirror://sourceforge/linguistico/"
302 "Dizionario%20italiano%20per%20Aspell/" version "/"
303 "aspell6-it-" version ".tar.bz2"))
304 (hash (content-hash sha256))))
305 (home-page
306 "https://linguistico.sourceforge.net/pages/dizionario_italiano.html"))))
307
308(define-public aspell-dict-mi
309 (aspell-dictionary "mi" "Maori"
310 #:version "0.50-0"
311 #:prefix "aspell-"
312 #:sha256
313 (base32
314 "12bxplpd348yx8d2q8qvahi9dlp7qf28qmanzhziwc7np8rixvmy")))
315
316(define-public aspell-dict-nl
317 (aspell-dictionary "nl" "Dutch"
318 #:version "0.50-2"
319 #:prefix "aspell-"
320 #:sha256
321 (base32
322 "0ffb87yjsh211hllpc4b9khqqrblial4pzi1h9r3v465z1yhn3j4")))
323
324(define-public aspell-dict-nn
325 (aspell-dictionary "nn" "Norwegian Nynorsk"
326 #:version "0.50.1-1"
327 #:prefix "aspell-"
328 #:sha256
329 (base32
330 "0w2k5l5rbqpliripgqwiqixz5ghnjf7i9ggbrc4ly4vy1ia10rmc")))
331
332(define-public aspell-dict-nb
333 (aspell-dictionary "nb" "Norwegian Bokmål"
334 #:version "0.50-2"
335 #:prefix "aspell-"
336 #:sha256
337 (base32
338 "1xvns7dwx2sc0msldj7r2hv0426913rg3dpnkxlrvnsyrxzjpbpc")))
339
340(define-public aspell-dict-pl
341 (aspell-dictionary "pl" "Polish"
342 #:version "0.51-0"
343 #:prefix "aspell-"
344 #:sha256
345 (base32
346 "1a3ccji6k5gys7l3ilr2lh5pzxgzb7ipc5vb737svl6nqgdy8757")))
347
348(define-public aspell-dict-pt-br
349 (aspell-dictionary "pt_BR" "Brazilian Portuguese"
350 #:version "20131030-12-0"
351 #:sha256
352 (base32
353 "1xqlpk21s93c6blkdnpk7l62q9fxjvzdv2x86chl8p2x1gdrj3gb")))
354
355(define-public aspell-dict-pt-pt
356 (aspell-dictionary "pt_PT" "Portuguese"
357 #:version "20190329-1-0"
358 #:sha256
359 (base32
360 "0ld0d0ily4jqifjfsxfv4shbicz6ymm2gk56fq9gbzra1j4qnw75")))
361
362(define-public aspell-dict-ru
363 (aspell-dictionary "ru" "Russian"
364 #:version "0.99f7-1"
365 #:sha256
366 (base32
367 "0ip6nq43hcr7vvzbv4lwwmlwgfa60hrhsldh9xy3zg2prv6bcaaw")))
368
369(define-public aspell-dict-sl
370 (aspell-dictionary "sl" "Slovenian"
371 #:version "0.50-0"
372 #:prefix "aspell-"
373 #:sha256
374 (base32
375 "1l9kc5g35flq8kw9jhn2n0bjb4sipjs4qkqzgggs438kywkx2rp5")))
376
377(define-public aspell-dict-sv
378 (aspell-dictionary "sv" "Swedish"
379 #:version "0.51-0"
380 #:prefix "aspell-"
381 #:sha256
382 (base32
383 "02jwkjhr32kvyibnyzgx3smbnm576jwdzg3avdf6zxwckhy5fw4v")))
384
385(define-public aspell-dict-uk
386 (aspell-dictionary "uk" "Ukrainian"
387 #:version "1.4.0-0"
388 #:sha256
389 (base32
390 "137i4njvnslab6l4s291s11xijr5jsy75lbdph32f9y183lagy9m")))
391
392(define-public aspell-dict-ro
393 (aspell-dictionary "ro" "Romanian"
394 #:version "3.3-2"
395 #:prefix "aspell5-"
396 #:sha256
397 (base32
398 "0gb8j9iy1acdl11jq76idgc2lbc1rq3w04favn8cyh55d1v8phsk")))
399
400(define-public ispell
401 (package
402 (name "ispell")
403 (version "3.4.06")
404 (source
405 (origin
406 (method url-fetch)
407 (uri (string-append "https://www.cs.hmc.edu/~geoff/tars/ispell-"
408 version ".tar.gz"))
409 (sha256
410 (base32 "19pbhg3pbnykkk9hla2kfhfanm7wcdja2qria365l1y8shridj8p"))))
411 (build-system gnu-build-system)
412 (arguments
413 `(#:parallel-build? #f
414 #:tests? #f ; no tests
415 #:phases
416 (modify-phases %standard-phases
417 (replace 'configure
418 (lambda* (#:key inputs outputs #:allow-other-keys)
419 ;; Based on local.h.linux
420 (let* ((grep (assoc-ref inputs "grep"))
421 (out (assoc-ref outputs "out")))
422 (call-with-output-file "local.h"
423 (lambda (port)
424 (format port "#define MINIMENU~%")
425 (format port "#define USG~%")
426 (format port "#define HAS_RENAME~%")
427 (format port "#define CC \"gcc\"~%")
428 (format port "#define POUNDBANG \"#!~a\"~%" (which "sh"))
429 (format port "#define EGREPCMD \"~a/bin/grep -Ei\"~%" grep)
430 (format port "#define BINDIR \"~a/bin\"~%" out)
431 (format port "#define LIBDIR \"~a/lib/ispell\"~%" out)
432 (format port "#define MAN1DIR \"~a/share/man/man1\"~%" out)
433 (format port "#define MAN45DIR \"~a/share/man/man5\"~%" out)))))))))
434 (inputs
435 (list grep ncurses))
436 (native-inputs
437 (list bison))
438 (synopsis "Interactive spell-checking tool for Unix")
439 (description "Ispell is an interactive spell-checking tool supporting many
440European languages.")
441 (home-page "https://www.cs.hmc.edu/~geoff/ispell.html")
442 (license bsd-3)))
443
444;;; This is basically ispell but built with CMake, and which provides a CMake
445;;; config file.
446(define-public ispell-for-linphone
447 (let ((commit "05574fe160222c3d0b6283c1433c9b087271fad1")
448 (revision "0"))
449 (package
450 (inherit ispell)
451 (name "ispell-for-linphone")
452 ;; The version is captured in the ISPELL_VERSION variable in the
453 ;; CMakeLists.txt file at the root of the project.
454 (version (git-version "3.4.05" revision commit))
455 (source (origin
456 (method git-fetch)
457 (uri (git-reference
458 (url "https://gitlab.linphone.org/BC/public/external/ispell")
459 (commit commit)))
460 (file-name (git-file-name name version))
461 (sha256
462 (base32
463 "0shwbms6y0i18n2qnvjlbwfmzk5rydlp7wbf4dl1rn74r244p132"))
464 (patches (search-patches "ispell-for-linphone-cmake.patch"))))
465 (build-system cmake-build-system)
466 (arguments
467 (substitute-keyword-arguments arguments
468 ((#:modules _ ''())
469 '((guix build cmake-build-system)
470 (guix build utils)
471 (srfi srfi-26)))
472 ((#:phases phases '%standard-phases)
473 #~(modify-phases #$phases
474 (add-before 'configure 'really-configure
475 (assoc-ref %standard-phases 'configure))
476 (add-after 'configure 'install-headers
477 (lambda _
478 (let ((include-dir (string-append #$output "/include/ISpell")))
479 (with-directory-excursion "../source"
480 (for-each (cut install-file <> include-dir)
481 '("config.h" "defhash.h" "ispell.h"
482 "libispell.h" "local.h")))))))))))))
483
484(define-public spell
485 (package
486 (name "spell")
487 (version "1.1")
488 (source
489 (origin
490 (method url-fetch)
491 (uri (string-append "mirror://gnu/spell/spell-" version ".tar.gz"))
492 (sha256
493 (base32 "0i4pqbhzkv5y4c2j7ajx713jykxsnn4dqdcqfvzn04xkgra47hkw"))))
494 (build-system gnu-build-system)
495 (arguments
496 (list #:phases
497 #~(modify-phases %standard-phases
498 (add-after 'unpack 'patch-commands
499 (lambda* (#:key inputs #:allow-other-keys)
500 (substitute* "spell.c"
501 (("aspell")
502 (search-input-file inputs "bin/aspell"))
503 (("ispell_prog = \"ispell\"")
504 (format #f "ispell_prog = ~s"
505 (search-input-file inputs "bin/ispell")))))))))
506 (inputs (list aspell ispell))
507 (synopsis "Spell checking")
508 (description
509 "Spell is a command-line spell-checking program. It reads through
510a text input and prints each misspelled word on a line of its own. It is
511implemented as a wrapper for GNU aspell or ispell.")
512 (home-page "https://savannah.gnu.org/projects/spell/")
513 (license gpl3+)))