1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
4 ;;; This file is part of GNU Guix.
6 ;;; GNU Guix is free software; you can redistribute it and/or modify it
7 ;;; under the terms of the GNU General Public License as published by
8 ;;; the Free Software Foundation; either version 3 of the License, or (at
9 ;;; your option) any later version.
11 ;;; GNU Guix is distributed in the hope that it will be useful, but
12 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;;; GNU General Public License for more details.
16 ;;; You should have received a copy of the GNU General Public License
17 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19 (define-module (gnu packages textutils)
20 #:use-module ((guix licenses) #:prefix license:)
21 #:use-module (guix packages)
22 #:use-module (guix download)
23 #:use-module (guix git-download)
24 #:use-module (guix build-system gnu)
25 #:use-module (gnu packages python))
30 ;; Last beta release (3.7-beta2) is from 2008; last commit from Feb 2014.
31 ;; So we use that commit instead.
32 (version "3.7.0.201402")
37 (url "https://github.com/pinard/Recode.git")
38 (commit "2d7092a9999194fc0e9449717a8048c8d8e26c18")))
40 (base32 "1wssv8z6g3ryrw33sksz4rjhlnhgvvdqszw1ggl4rcwks34n86zm"))))
41 (build-system gnu-build-system)
42 (native-inputs `(("python" ,python-2)))
48 (substitute* "tests/setup.py"
49 (("([[:space:]]*)include_dirs=.*" all space)
50 (string-append all space "library_dirs=['../src/.libs'],\n"))))
52 (home-page "https://github.com/pinard/Recode")
53 (synopsis "Text encoding converter")
54 (description "The Recode library converts files between character sets and
55 usages. It recognises or produces over 200 different character sets (or about
56 300 if combined with an iconv library) and transliterates files between almost
57 any pair. When exact transliteration are not possible, it gets rid of
58 offending characters or falls back on approximations. The recode program is a
59 handy front-end to the library.")
60 (license license:gpl2+)))
70 "https://github.com/nijel/enca/archive/" version ".tar.gz"))
72 (base32 "1xik00x0yvhswsw2isnclabhv536xk1s42cf5z54gfbpbhc7ni8l"))))
73 (build-system gnu-build-system)
74 (inputs `(("recode" ,recode)))
76 ;; Both 'test-convert-64.sh' and 'test-convert-filter.sh' manipulate a
77 ;; 'test.tmp' file, so they have to run in sequence.
78 (arguments '(#:parallel-tests? #f))
80 (home-page "https://github.com/nijel/enca")
81 (synopsis "Text encoding detection tool")
82 (description "Enca (Extremely Naive Charset Analyser) consists of libenca,
83 an encoding detection library, and enca, a command line frontend, integrating
84 libenca and several charset conversion libraries and tools.")
85 (license license:gpl2)))