e4d4acc615d11fd8f04a477f7e339b9b109449bf
[jackhill/guix/guix.git] / distro / packages / gettext.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;;
4 ;;; This file is part of GNU Guix.
5 ;;;
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.
10 ;;;
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.
15 ;;;
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/>.
18
19 (define-module (distro packages gettext)
20 #:use-module (guix licenses)
21 #:use-module (distro)
22 #:use-module (guix packages)
23 #:use-module (guix download)
24 #:use-module (guix build-system gnu))
25
26 (define-public gettext
27 (package
28 (name "gettext")
29 (version "0.18.1.1")
30 (source
31 (origin
32 (method url-fetch)
33 (uri (string-append "mirror://gnu/gettext/gettext-"
34 version ".tar.gz"))
35 (sha256
36 (base32
37 "1sa3ch12qxa4h3ya6hkz119yclcccmincl9j20dhrdx5mykp3b4k"))))
38 (build-system gnu-build-system)
39 (arguments
40 `(#:patches (list (assoc-ref %build-inputs "patch/gets"))
41 #:phases (alist-cons-before
42 'check 'patch-tests
43 (lambda* (#:key inputs #:allow-other-keys)
44 (let ((bash (assoc-ref inputs "bash")))
45 (substitute* (find-files "gettext-tools/tests"
46 "^msgexec-[0-9]")
47 (("#![[:blank:]]/bin/sh")
48 (format #f "#!~a/bin/sh" bash)))
49 (substitute* (find-files "gettext-tools/gnulib-tests"
50 "posix_spawn")
51 (("/bin/sh")
52 (format #f "~a/bin/bash" bash)))))
53 %standard-phases)))
54 (inputs
55 `(("patch/gets"
56 ,(search-patch "gettext-gets-undeclared.patch"))))
57 (home-page
58 "http://www.gnu.org/software/gettext/")
59 (synopsis
60 "GNU gettext, a well integrated set of translation tools and documentation")
61 (description
62 "Usually, programs are written and documented in English, and use
63 English at execution time for interacting with users. Using a common
64 language is quite handy for communication between developers,
65 maintainers and users from all countries. On the other hand, most
66 people are less comfortable with English than with their own native
67 language, and would rather be using their mother tongue for day to
68 day's work, as far as possible. Many would simply love seeing their
69 computer screen showing a lot less of English, and far more of their
70 own language.
71
72 GNU `gettext' is an important step for the GNU Translation Project, as
73 bit is an asset on which we may build many other steps. This package
74 offers to programmers, translators, and even users, a well integrated
75 set of tools and documentation. Specifically, the GNU `gettext'
76 utilities are a set of tools that provides a framework to help other
77 GNU packages produce multi-lingual messages.")
78 (license gpl3))) ; some files are under GPLv2+