Commit | Line | Data |
---|---|---|
7939e70a TUBK |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com> | |
ff3f6766 | 3 | ;;; Copyright © 2015, 2016, 2017 Ricardo Wurmus <rekado@elephly.net> |
a64a8c46 | 4 | ;;; Copyright © 2015, 2016 Ben Woodcroft <donttrustben@gmail.com> |
e522d840 | 5 | ;;; Copyright © 2015 Roel Janssen <roel@gnu.org> |
2d8cf0b3 | 6 | ;;; Copyright © 2016 Jelle Licht <jlicht@fsfe.org> |
f17a5447 | 7 | ;;; Copyright © 2016 Alex Griffin <a@ajgrf.com> |
9116f126 | 8 | ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il> |
8888fe82 | 9 | ;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is> |
0905048a | 10 | ;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com> |
5353cea0 | 11 | ;;; Copyright © 2017 Eric Bavier <bavier@member.fsf.org> |
7fdca77e | 12 | ;;; Copyright © 2017 Rene Saavedra <rennes@openmailbox.org> |
d0abaf89 | 13 | ;;; Copyright © 2017 Hartmut Goebel <h.goebel@crazy-compilers.com> |
7939e70a TUBK |
14 | ;;; |
15 | ;;; This file is part of GNU Guix. | |
16 | ;;; | |
17 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
18 | ;;; under the terms of the GNU General Public License as published by | |
19 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
20 | ;;; your option) any later version. | |
21 | ;;; | |
22 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
23 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
24 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
25 | ;;; GNU General Public License for more details. | |
26 | ;;; | |
27 | ;;; You should have received a copy of the GNU General Public License | |
28 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
29 | ||
30 | (define-module (gnu packages textutils) | |
31 | #:use-module ((guix licenses) #:prefix license:) | |
32 | #:use-module (guix packages) | |
33 | #:use-module (guix download) | |
34 | #:use-module (guix git-download) | |
ff3f6766 | 35 | #:use-module (guix build-system ant) |
7939e70a | 36 | #:use-module (guix build-system gnu) |
c8d969b5 | 37 | #:use-module (guix build-system cmake) |
f17a5447 | 38 | #:use-module (guix build-system trivial) |
9116f126 | 39 | #:use-module (gnu packages) |
f571e1c3 | 40 | #:use-module (gnu packages autotools) |
148585c2 | 41 | #:use-module (gnu packages compression) |
ff3f6766 | 42 | #:use-module (gnu packages java) |
8888fe82 | 43 | #:use-module (gnu packages ncurses) |
44 | #:use-module (gnu packages perl) | |
45 | #:use-module (gnu packages pkg-config) | |
f17a5447 | 46 | #:use-module (gnu packages python) |
8888fe82 | 47 | #:use-module (gnu packages readline) |
148585c2 | 48 | #:use-module (gnu packages slang)) |
7939e70a TUBK |
49 | |
50 | (define-public recode | |
51 | (package | |
52 | (name "recode") | |
53 | ;; Last beta release (3.7-beta2) is from 2008; last commit from Feb 2014. | |
54 | ;; So we use that commit instead. | |
55 | (version "3.7.0.201402") | |
56 | (source | |
57 | (origin | |
58 | (method git-fetch) | |
59 | (uri (git-reference | |
60 | (url "https://github.com/pinard/Recode.git") | |
61 | (commit "2d7092a9999194fc0e9449717a8048c8d8e26c18"))) | |
62 | (sha256 | |
6f323b07 TUBK |
63 | (base32 "1wssv8z6g3ryrw33sksz4rjhlnhgvvdqszw1ggl4rcwks34n86zm")) |
64 | (file-name (string-append name "-" version "-checkout")))) | |
7939e70a TUBK |
65 | (build-system gnu-build-system) |
66 | (native-inputs `(("python" ,python-2))) | |
67 | (arguments | |
68 | '(#:phases | |
69 | (alist-cons-before | |
fee4693e | 70 | 'check 'pre-check |
7939e70a TUBK |
71 | (lambda _ |
72 | (substitute* "tests/setup.py" | |
73 | (("([[:space:]]*)include_dirs=.*" all space) | |
fee4693e SB |
74 | (string-append all space "library_dirs=['../src/.libs'],\n"))) |
75 | ;; The test extension 'Recode.so' lacks RUNPATH for 'librecode.so'. | |
76 | (setenv "LD_LIBRARY_PATH" (string-append (getcwd) "/src/.libs"))) | |
7939e70a TUBK |
77 | %standard-phases))) |
78 | (home-page "https://github.com/pinard/Recode") | |
79 | (synopsis "Text encoding converter") | |
80 | (description "The Recode library converts files between character sets and | |
81 | usages. It recognises or produces over 200 different character sets (or about | |
82 | 300 if combined with an iconv library) and transliterates files between almost | |
83 | any pair. When exact transliteration are not possible, it gets rid of | |
84 | offending characters or falls back on approximations. The recode program is a | |
85 | handy front-end to the library.") | |
86 | (license license:gpl2+))) | |
688fe865 TUBK |
87 | |
88 | (define-public enca | |
89 | (package | |
90 | (name "enca") | |
91 | (version "1.16") | |
92 | (source | |
93 | (origin | |
94 | (method url-fetch) | |
95 | (uri (string-append | |
96 | "https://github.com/nijel/enca/archive/" version ".tar.gz")) | |
97 | (sha256 | |
bbee7bd7 TUBK |
98 | (base32 "1xik00x0yvhswsw2isnclabhv536xk1s42cf5z54gfbpbhc7ni8l")) |
99 | (file-name (string-append name "-" version ".tar.gz")))) | |
688fe865 TUBK |
100 | (build-system gnu-build-system) |
101 | (inputs `(("recode" ,recode))) | |
6795b8d8 LC |
102 | |
103 | ;; Both 'test-convert-64.sh' and 'test-convert-filter.sh' manipulate a | |
104 | ;; 'test.tmp' file, so they have to run in sequence. | |
105 | (arguments '(#:parallel-tests? #f)) | |
106 | ||
688fe865 TUBK |
107 | (home-page "https://github.com/nijel/enca") |
108 | (synopsis "Text encoding detection tool") | |
109 | (description "Enca (Extremely Naive Charset Analyser) consists of libenca, | |
110 | an encoding detection library, and enca, a command line frontend, integrating | |
111 | libenca and several charset conversion libraries and tools.") | |
112 | (license license:gpl2))) | |
cd15ad82 RW |
113 | |
114 | (define-public utf8proc | |
115 | (package | |
116 | (name "utf8proc") | |
5d230d5b | 117 | (version "2.1.0") |
cd15ad82 RW |
118 | (source |
119 | (origin | |
120 | (method url-fetch) | |
121 | (uri (string-append | |
122 | "https://github.com/JuliaLang/utf8proc/archive/v" | |
123 | version ".tar.gz")) | |
124 | (file-name (string-append name "-" version ".tar.gz")) | |
125 | (sha256 | |
5d230d5b | 126 | (base32 "0q1jhdkk4f9b0zb8s2ql3sba3br5nvjsmbsaybmgj064k9hwbk15")))) |
cd15ad82 | 127 | (build-system gnu-build-system) |
5353cea0 EB |
128 | (inputs ;test data that is otherwise downloaded with curl |
129 | `(("NormalizationTest.txt" | |
130 | ,(origin | |
131 | (method url-fetch) | |
132 | (uri (string-append "http://www.unicode.org/Public/9.0.0/ucd/" | |
133 | "NormalizationTest.txt")) | |
134 | (sha256 | |
135 | (base32 "1fxrz0bilsbwl685336aqi88k62i6nqhm62rvy4zhg3bcm4dhj1d")))) | |
136 | ("GraphemeBreakTest.txt" | |
137 | ,(origin | |
138 | (method url-fetch) | |
139 | (uri (string-append "http://www.unicode.org/Public/9.0.0/ucd/" | |
140 | "auxiliary/GraphemeBreakTest.txt")) | |
141 | (sha256 | |
142 | (base32 "0qbhyhmf0778lc2hcwlpizrvmdxwpk959v2q2wb8abv09ba7wvn7")))))) | |
cd15ad82 | 143 | (arguments |
5353cea0 | 144 | '(#:make-flags (list "CC=gcc" |
f1e3a8ae | 145 | (string-append "prefix=" (assoc-ref %outputs "out"))) |
cd15ad82 | 146 | #:phases |
f1e3a8ae | 147 | (modify-phases %standard-phases |
5353cea0 EB |
148 | (delete 'configure) |
149 | (add-before 'check 'check-data | |
150 | (lambda* (#:key inputs #:allow-other-keys) | |
151 | (for-each (lambda (i) | |
152 | (copy-file (assoc-ref inputs i) | |
153 | (string-append "data/" i))) | |
154 | '("NormalizationTest.txt" "GraphemeBreakTest.txt")) | |
155 | (substitute* "data/GraphemeBreakTest.txt" | |
156 | (("÷") "/") | |
157 | (("×") "+"))))))) | |
cd15ad82 RW |
158 | (home-page "http://julialang.org/utf8proc/") |
159 | (synopsis "C library for processing UTF-8 Unicode data") | |
160 | (description "utf8proc is a small C library that provides Unicode | |
161 | normalization, case-folding, and other operations for data in the UTF-8 | |
9b72ce60 | 162 | encoding, supporting Unicode version 9.0.0.") |
cd15ad82 | 163 | (license license:expat))) |
f571e1c3 RW |
164 | |
165 | (define-public libgtextutils | |
166 | (package | |
167 | (name "libgtextutils") | |
168 | (version "0.7") | |
169 | (source | |
170 | (origin | |
171 | (method url-fetch) | |
172 | (uri (string-append | |
173 | "https://github.com/agordon/libgtextutils/releases/download/" | |
174 | version "/libgtextutils-" version ".tar.gz")) | |
175 | (sha256 | |
176 | (base32 "0jiybkb2z58wa2msvllnphr4js2hvjvh988pavb3mzkgr6ihwbkr")))) | |
177 | (build-system gnu-build-system) | |
178 | (arguments | |
179 | '(#:phases | |
180 | (alist-cons-after | |
181 | 'unpack 'autoreconf | |
182 | (lambda _ (zero? (system* "autoreconf" "-vif"))) | |
183 | %standard-phases))) | |
184 | (native-inputs | |
185 | `(("autoconf" ,autoconf) | |
186 | ("automake" ,automake) | |
187 | ("libtool" ,libtool))) | |
188 | (home-page "https://github.com/agordon/libgtextutils") | |
189 | (synopsis "Gordon's text utils library") | |
190 | (description | |
191 | "libgtextutils is a text utilities library used by the fastx toolkit from | |
192 | the Hannon Lab.") | |
193 | (license license:agpl3+))) | |
aae2b445 BW |
194 | |
195 | (define-public cityhash | |
a64a8c46 | 196 | (let ((commit "8af9b8c")) |
aae2b445 BW |
197 | (package |
198 | (name "cityhash") | |
a64a8c46 | 199 | (version (string-append "1.1-2." commit)) |
aae2b445 BW |
200 | (source (origin |
201 | (method git-fetch) | |
202 | (uri (git-reference | |
203 | (url "https://github.com/google/cityhash.git") | |
204 | (commit commit))) | |
205 | (file-name (string-append name "-" version ".tar.gz")) | |
206 | (sha256 | |
207 | (base32 | |
208 | "0n6skf5dv8yfl1ckax8dqhvsbslkwc9158zf2ims0xqdvzsahbi6")))) | |
a64a8c46 BW |
209 | (build-system gnu-build-system) |
210 | (arguments | |
211 | '(#:make-flags (list "CXXFLAGS=-g -O3") | |
212 | #:phases | |
213 | (modify-phases %standard-phases | |
214 | ;; citycrc is not installed by default but is used by some | |
215 | ;; programs. | |
216 | (add-after 'install 'install-citycrc | |
217 | (lambda* (#:key outputs #:allow-other-keys) | |
218 | (let* ((out (assoc-ref outputs "out")) | |
219 | (include (string-append out "/include"))) | |
220 | (install-file "src/citycrc.h" include)) | |
221 | #t))))) | |
222 | (home-page "https://github.com/google/cityhash") | |
223 | (synopsis "C++ hash functions for strings") | |
224 | (description | |
225 | "CityHash provides hash functions for strings. The functions mix the | |
aae2b445 | 226 | input bits thoroughly but are not suitable for cryptography.") |
a64a8c46 | 227 | (license license:expat)))) |
e522d840 | 228 | |
9128db21 RW |
229 | (define-public ustr |
230 | (package | |
231 | (name "ustr") | |
232 | (version "1.0.4") | |
233 | (source (origin | |
234 | (method url-fetch) | |
235 | (uri (string-append "http://www.and.org/ustr/" version | |
236 | "/ustr-" version ".tar.bz2")) | |
237 | (sha256 | |
238 | (base32 | |
7fdca77e RS |
239 | "1i623ygdj7rkizj7985q9d6vj5amwg686aqb5j3ixpkqkyp6xbrx")) |
240 | (patches (search-patches "ustr-fix-build-with-gcc-5.patch")))) | |
9128db21 RW |
241 | (build-system gnu-build-system) |
242 | (arguments | |
243 | `(#:make-flags | |
244 | (list "CC=gcc" | |
245 | "HIDE=" | |
246 | ;; Override "/sbin/ldconfig" with "echo" because we don't need | |
247 | ;; "ldconfig". | |
248 | "LDCONFIG=echo" | |
249 | (string-append "prefix=" (assoc-ref %outputs "out")) | |
250 | "all-shared") | |
251 | #:phases | |
252 | (modify-phases %standard-phases | |
253 | (add-after 'unpack 'disable-check-for-stdint | |
254 | (lambda _ | |
255 | ;; Of course we have stdint.h, just not in /usr/include | |
256 | (substitute* '("Makefile" | |
257 | "ustr-import.in") | |
258 | (("-f \"/usr/include/stdint.h\"") "-z \"\"")) | |
259 | #t)) | |
260 | ;; No configure script | |
261 | (delete 'configure)))) | |
262 | (home-page "http://www.and.org/ustr/") | |
263 | (synopsis "String library with very low memory overhead") | |
264 | (description | |
265 | "Ustr is a string library for C with very low memory overhead.") | |
266 | ;; Quoted from the home page: "The License for the code is MIT, new-BSD, | |
267 | ;; LGPL, etc. ... if you need another license to help compatibility, just | |
268 | ;; ask for it. It's basically public domain, without all the legal | |
269 | ;; problems for everyone that trying to make something public domain | |
270 | ;; entails." | |
271 | (license license:public-domain))) | |
272 | ||
e522d840 RJ |
273 | (define-public libconfig |
274 | (package | |
275 | (name "libconfig") | |
276 | (version "1.5") | |
277 | (source (origin | |
278 | (method url-fetch) | |
279 | (uri (string-append "http://www.hyperrealm.com/libconfig/" | |
280 | "libconfig-" version ".tar.gz")) | |
281 | (sha256 | |
282 | (base32 | |
283 | "1xh3hzk63v4y8815lc5209m3s6ms2cpgw4h5hg462i4f1lwsl7g3")))) | |
284 | (build-system gnu-build-system) | |
285 | (home-page "http://www.hyperrealm.com/libconfig/") | |
286 | (synopsis "C/C++ configuration file library") | |
287 | (description | |
288 | "Libconfig is a simple library for manipulating structured configuration | |
289 | files. This file format is more compact and more readable than XML. And | |
290 | unlike XML, it is type-aware, so it is not necessary to do string parsing in | |
291 | application code.") | |
292 | (license license:lgpl2.1+))) | |
c8d969b5 PP |
293 | |
294 | (define-public pfff | |
295 | (package | |
296 | (name "pfff") | |
297 | (version "1.0") | |
298 | (source (origin | |
299 | (method url-fetch) | |
300 | (uri (string-append "https://github.com/pfff/pfff/archive/v" | |
301 | version ".tar.gz")) | |
302 | (file-name (string-append name "-" version ".tar.gz")) | |
303 | (sha256 | |
304 | (base32 | |
305 | "00m553aa277iarxj6dalmklyb64r7ias49bfwzbacsfg8h3kar8m")))) | |
306 | (build-system cmake-build-system) | |
307 | (home-page "http://biit.cs.ut.ee/pfff/") | |
308 | (synopsis "Probabilistic fast file fingerprinting tool") | |
309 | (description | |
310 | "pfff is a tool for calculating a compact digital fingerprint of a file | |
311 | by sampling randomly from the file instead of reading it in full. | |
312 | Consequently, the computation has a flat performance characteristic, | |
313 | correlated with data variation rather than file size. pfff can be as reliable | |
314 | as existing hashing techniques, with provably negligible risk of collisions.") | |
315 | (license license:bsd-3))) | |
2d8cf0b3 JL |
316 | |
317 | (define-public oniguruma | |
318 | (package | |
319 | (name "oniguruma") | |
320 | (version "5.9.6") | |
321 | (source (origin | |
322 | (method url-fetch) | |
323 | (uri (string-append "https://github.com/kkos/" | |
324 | "oniguruma/releases/download/v" version | |
325 | "/onig-" version ".tar.gz")) | |
326 | (sha256 | |
327 | (base32 | |
328 | "19s79vsclqn170mw0ajwv7j37qsbn4f1yjz3yavnhvva6c820r6m")))) | |
329 | (build-system gnu-build-system) | |
330 | (home-page "https://github.com/kkos/oniguruma") | |
331 | (synopsis "Regular expression library") | |
332 | (description "Oniguruma is a regular expressions library. The special | |
333 | characteristic of this library is that different character encoding for every | |
334 | regular expression object can be specified.") | |
335 | (license license:bsd-2))) | |
1b90e57e RW |
336 | |
337 | (define-public antiword | |
338 | (package | |
339 | (name "antiword") | |
340 | (version "0.37") | |
341 | (source (origin | |
342 | (method url-fetch) | |
343 | (uri (string-append "http://www.winfield.demon.nl/linux" | |
344 | "/antiword-" version ".tar.gz")) | |
345 | (sha256 | |
346 | (base32 | |
9116f126 EF |
347 | "1b7mi1l20jhj09kyh0bq14qzz8vdhhyf35gzwsq43mn6rc7h0b4f")) |
348 | (patches (search-patches "antiword-CVE-2014-8123.patch")))) | |
1b90e57e RW |
349 | (build-system gnu-build-system) |
350 | (arguments | |
351 | `(#:tests? #f ; There are no tests | |
352 | #:make-flags | |
353 | (list "-f" "Makefile.Linux" | |
354 | (string-append "GLOBAL_INSTALL_DIR=" | |
355 | (assoc-ref %outputs "out") "/bin") | |
356 | (string-append "GLOBAL_RESOURCES_DIR=" | |
357 | (assoc-ref %outputs "out") "/share/antiword")) | |
358 | #:phases | |
359 | (modify-phases %standard-phases | |
360 | (delete 'configure) | |
361 | (replace 'install | |
362 | (lambda* (#:key make-flags #:allow-other-keys) | |
363 | (zero? (apply system* "make" `("global_install" ,@make-flags)))))))) | |
364 | (home-page "http://www.winfield.demon.nl/") | |
365 | (synopsis "Microsoft Word document reader") | |
366 | (description "Antiword is an application for displaying Microsoft Word | |
367 | documents. It can also convert the document to PostScript or XML. Only | |
368 | documents made by MS Word version 2 and version 6 or later are supported. The | |
369 | name comes from: \"The antidote against people who send Microsoft Word files | |
370 | to everybody, because they believe that everybody runs Windows and therefore | |
371 | runs Word\".") | |
372 | (license license:gpl2+))) | |
f17a5447 | 373 | |
d0abaf89 HG |
374 | (define-public catdoc |
375 | (package | |
376 | (name "catdoc") | |
377 | (version "0.95") | |
378 | (source (origin | |
379 | (method url-fetch) | |
380 | (uri (string-append "http://ftp.wagner.pp.ru/pub/catdoc/" | |
381 | "catdoc-" version ".tar.gz")) | |
382 | (sha256 | |
383 | (base32 | |
384 | "15h7v3bmwfk4z8r78xs5ih6vd0pskn0rj90xghvbzdjj0cc88jji")))) | |
385 | (build-system gnu-build-system) | |
386 | ;; TODO: Also build `wordview` which requires `tk` – make a separate | |
387 | ;; package for this. | |
388 | (arguments | |
389 | '(#:tests? #f ; There are no tests | |
390 | #:configure-flags '("--disable-wordview") | |
391 | #:phases | |
392 | (modify-phases %standard-phases | |
393 | (add-before 'install 'fix-install | |
394 | (lambda* (#:key outputs #:allow-other-keys) | |
395 | (let ((out (assoc-ref outputs "out"))) | |
396 | (mkdir-p (string-append out "/share/man/man1")))))))) | |
397 | (home-page "http://www.wagner.pp.ru/~vitus/software/catdoc/") | |
398 | (synopsis "MS-Word to TeX or plain text converter") | |
399 | (description "@command{catdoc} extracts text from MS-Word files, trying to | |
400 | preserve as many special printable characters as possible. It supports | |
401 | everything up to Word-97. Also supported are MS Write documents and RTF files. | |
402 | ||
403 | @command{catdoc} does not preserve complex word formatting, but it can | |
404 | translate some non-ASCII characters into TeX escape codes. It's goal is to | |
405 | extract plain text and allow you to read it and, probably, reformat with TeX, | |
406 | according to TeXnical rules. | |
407 | ||
408 | This package also provides @command{xls2csv}, which extracts data from Excel | |
409 | spreadsheets and outputs it in comma-separated-value format, and | |
410 | @command{catppt}, which extracts data from PowerPoint presentations.") | |
411 | (license license:gpl2+))) | |
412 | ||
f17a5447 AG |
413 | (define-public utfcpp |
414 | (package | |
415 | (name "utfcpp") | |
416 | (version "2.3.4") | |
417 | (source (origin | |
418 | (method url-fetch) | |
419 | (uri | |
420 | (string-append | |
0f971a04 | 421 | "mirror://sourceforge/utfcpp/utf8cpp_2x/Release%20" |
f17a5447 AG |
422 | version "/utf8_v" |
423 | (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version) | |
424 | ".zip")) | |
425 | (file-name (string-append name "-" version ".zip")) | |
426 | (sha256 | |
427 | (base32 | |
428 | "1vqhs0aipcvvdrwcs7h3jsryg6mgbmc4s34n5cm6d36q4nxwwwrk")))) | |
429 | (build-system trivial-build-system) | |
430 | (arguments | |
431 | `(#:modules ((guix build utils)) | |
432 | #:builder | |
433 | (begin | |
434 | (use-modules (guix build utils)) | |
435 | (let ((source (assoc-ref %build-inputs "source")) | |
436 | (out (assoc-ref %outputs "out")) | |
437 | (unzip (string-append (assoc-ref %build-inputs "unzip") | |
438 | "/bin/unzip"))) | |
439 | (mkdir-p out) | |
440 | (with-directory-excursion out | |
441 | (system* unzip source) | |
442 | (mkdir-p "share/doc") | |
443 | (rename-file "doc" "share/doc/utfcpp") | |
444 | (rename-file "source" "include")))))) | |
445 | (native-inputs `(("unzip" ,unzip))) | |
446 | (home-page "https://github.com/nemtrif/utfcpp") | |
447 | (synopsis "Portable C++ library for handling UTF-8") | |
448 | (description "UTF8-CPP is a C++ library for handling UTF-8 encoded text | |
449 | in a portable way.") | |
450 | (license license:boost1.0))) | |
8888fe82 | 451 | |
452 | (define-public dbacl | |
453 | (package | |
454 | (name "dbacl") | |
455 | (version "1.14") | |
456 | (source | |
457 | (origin | |
458 | (method url-fetch) | |
459 | (uri (string-append "http://www.lbreyer.com/gpl/" | |
460 | name "-" version ".tar.gz")) | |
461 | (sha256 | |
462 | (base32 | |
463 | "0224g6x71hyvy7jikfxmgcwww1r5lvk0jx36cva319cb9nmrbrq7")))) | |
464 | (build-system gnu-build-system) | |
465 | (arguments | |
466 | `(#:make-flags | |
467 | (list | |
468 | (string-append "-I" (assoc-ref %build-inputs "slang") | |
469 | "/include/slang") | |
470 | (string-append "-I" (assoc-ref %build-inputs "ncurses") | |
471 | "/include/ncurses")) | |
472 | #:phases | |
473 | (modify-phases %standard-phases | |
474 | (add-after 'unpack 'delete-sample6-and-japanese | |
475 | (lambda _ | |
476 | (substitute* "doc/Makefile.am" | |
477 | (("sample6.txt") "") | |
478 | (("japanese.txt") "")) | |
479 | (delete-file "doc/sample6.txt") | |
480 | (delete-file "doc/japanese.txt") | |
481 | (substitute* (list "src/tests/Makefile.am" | |
482 | "src/tests/Makefile.in") | |
483 | (("dbacl-jap.shin") "") | |
484 | (("dbacl-jap.sh") "")) | |
485 | #t)) | |
486 | (add-after 'unpack 'delete-test | |
487 | ;; See comments about the license. | |
488 | (lambda _ | |
489 | (delete-file "src/tests/dbacl-jap.shin"))) | |
490 | (add-after 'delete-sample6-and-japanese 'autoreconf | |
491 | (lambda _ | |
492 | (zero? (system* "autoreconf" "-vif")))) | |
493 | (add-after 'unpack 'fix-test-files | |
494 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
495 | (let* ((out (assoc-ref outputs "out")) | |
496 | (bin (string-append out "/bin"))) | |
497 | (substitute* (find-files "src/tests/" "\\.shin$") | |
498 | (("PATH=/bin:/usr/bin") | |
499 | "#PATH=/bin:/usr/bin") | |
500 | (("diff") (string-append (which "diff"))) | |
501 | (("tr") (string-append (which "tr")))) | |
502 | #t)))))) | |
503 | (inputs | |
504 | `(("ncurses" ,ncurses) | |
505 | ("perl" ,perl) | |
506 | ("readline" ,readline) | |
507 | ("slang" ,slang))) | |
508 | (native-inputs | |
509 | `(("libtool" ,libtool) | |
510 | ("autoconf" ,autoconf) | |
511 | ("automake" ,automake) | |
512 | ("pkg-config" ,pkg-config))) | |
513 | (home-page "http://www.lbreyer.com/dbacl.html") | |
514 | (synopsis "Bayesian text and email classifier") | |
515 | (description | |
516 | "dbacl is a fast Bayesian text and email classifier. It builds a variety | |
517 | of language models using maximum entropy (minimum divergence) principles, and | |
518 | these can then be used to categorize input data automatically among multiple | |
519 | categories.") | |
520 | ;; The software is licensed as GPLv3 or later, but | |
521 | ;; includes various sample texts in the doc dir: | |
522 | ;; - sample1.txt, sample3 and sampe5.txt are in the public domain, | |
523 | ;; by Mark Twain. | |
524 | ;; - sample2.txt, sample4.txt are in the public domain, by Aristotle. | |
525 | ;; - sample6.txt is a forwarded email, copyright unknown. | |
526 | ;; Guix does exclude sample6.txt. | |
527 | ;; - japanese.txt is a Japanese unoffical translation of the | |
528 | ;; GNU General Public License, (c) by the Free Software Foundation. | |
529 | ;; Guix excludes this file. | |
530 | (license (list license:gpl3+ license:public-domain)))) | |
0905048a MB |
531 | |
532 | (define-public dotconf | |
533 | (package | |
534 | (name "dotconf") | |
535 | (version "1.3") | |
536 | (source (origin | |
537 | (method url-fetch) | |
538 | (uri (string-append | |
539 | "https://github.com/williamh/dotconf/archive/v" | |
540 | version ".tar.gz")) | |
541 | (file-name (string-append name "-" version ".tar.gz")) | |
542 | (sha256 | |
543 | (base32 | |
544 | "0lsnh0yaw44psmx59hq94cj1932gscp5h8d3cnh05l0svr0cy7kz")))) | |
545 | (build-system gnu-build-system) | |
546 | (arguments | |
547 | `(#:tests? #f ; FIXME maketest.sh does not work. | |
548 | #:phases | |
549 | (modify-phases %standard-phases | |
550 | (add-before 'configure 'autoreconf | |
551 | (lambda _ | |
552 | (zero? (system* "autoreconf" "-vif"))))))) | |
553 | (native-inputs | |
554 | `(("autoconf" ,autoconf) | |
555 | ("automake" ,automake) | |
556 | ("libtool" ,libtool))) | |
557 | (home-page "https://github.com/williamh/dotconf") | |
558 | (synopsis "Configuration file parser library") | |
559 | (description | |
560 | "C library for creating and parsing configuration files.") | |
561 | (license (list license:lgpl2.1 ; Main distribution. | |
562 | license:asl1.1)))) ; src/readdir.{c,h} | |
ff3f6766 RW |
563 | |
564 | (define-public java-rsyntaxtextarea | |
565 | (package | |
566 | (name "java-rsyntaxtextarea") | |
567 | (version "2.6.1") | |
568 | (source (origin | |
569 | (method url-fetch) | |
570 | (uri (string-append "https://github.com/bobbylight/" | |
571 | "RSyntaxTextArea/archive/" | |
572 | version ".tar.gz")) | |
573 | (file-name (string-append name "-" version ".tar.gz")) | |
574 | (sha256 | |
575 | (base32 | |
576 | "0c5mqg2klj5rvf8fhycrli8rf6s37l9p7a8knw9gpp65r1c120q2")))) | |
577 | (build-system ant-build-system) | |
578 | (arguments | |
579 | `(;; FIXME: some tests fail because locale resources cannot be found. | |
580 | ;; Even when I add them to the class path, | |
581 | ;; RSyntaxTextAreaEditorKitDumbCompleteWordActionTest fails. | |
582 | #:tests? #f | |
583 | #:jar-name "rsyntaxtextarea.jar")) | |
584 | (native-inputs | |
585 | `(("java-junit" ,java-junit) | |
586 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
587 | (home-page "https://bobbylight.github.io/RSyntaxTextArea/") | |
588 | (synopsis "Syntax highlighting text component for Java Swing") | |
589 | (description "RSyntaxTextArea is a syntax highlighting, code folding text | |
590 | component for Java Swing. It extends @code{JTextComponent} so it integrates | |
591 | completely with the standard @code{javax.swing.text} package. It is fast and | |
592 | efficient, and can be used in any application that needs to edit or view | |
593 | source code.") | |
594 | (license license:bsd-3))) |