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