gnu: qemu: Remove dependency on Samba.
[jackhill/guix/guix.git] / gnu / packages / gettext.scm
CommitLineData
233e7676
LC
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
f190f92f 3;;;
233e7676 4;;; This file is part of GNU Guix.
f190f92f 5;;;
233e7676 6;;; GNU Guix is free software; you can redistribute it and/or modify it
f190f92f
NK
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;;;
233e7676 11;;; GNU Guix is distributed in the hope that it will be useful, but
f190f92f
NK
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
233e7676 17;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
f190f92f 18
1ffa7090 19(define-module (gnu packages gettext)
c42a4b76 20 #:use-module ((guix licenses) #:select (gpl3))
59a43334 21 #:use-module (gnu packages)
f190f92f
NK
22 #:use-module (guix packages)
23 #:use-module (guix download)
c42a4b76
AE
24 #:use-module (guix build-system gnu)
25 #:use-module (gnu packages xml))
f190f92f 26
1dba6407
LC
27;; Use that name to avoid clashes with Guile's 'gettext' procedure.
28;;
29;; We used to resort to #:renamer on the user side, but that prevented
30;; circular dependencies involving (gnu packages gettext). This is because
31;; 'resolve-interface' (as of Guile 2.0.9) iterates eagerly over the used
32;; module when there's a #:renamer, and that module may be empty at that point
33;; in case or circular dependencies.
34(define-public gnu-gettext
f190f92f
NK
35 (package
36 (name "gettext")
cf02d3a5 37 (version "0.19.1")
2c9143a1
LC
38 (source (origin
39 (method url-fetch)
40 (uri (string-append "mirror://gnu/gettext/gettext-"
41 version ".tar.gz"))
42 (sha256
43 (base32
cf02d3a5 44 "1ih104j74dw90cb18ym50qlks3k6632zsiv2c94fnpyzbgcp2x18"))))
f190f92f 45 (build-system gnu-build-system)
c42a4b76
AE
46 (inputs
47 `(("expat" ,expat)))
f190f92f 48 (arguments
2c9143a1
LC
49 `(#:phases (alist-cons-before
50 'check 'patch-tests
51 (lambda* (#:key inputs #:allow-other-keys)
0e4e4b13
LC
52 (let* ((bash (which "sh")))
53 (substitute*
54 (find-files "gettext-tools/tests"
55 "^(lang-sh|msg(exec|filter)-[0-9])")
2c9143a1
LC
56 (("#![[:blank:]]/bin/sh")
57 (format #f "#!~a" bash)))
0e4e4b13
LC
58
59 (substitute* (cons "gettext-tools/src/msginit.c"
60 (find-files "gettext-tools/gnulib-tests"
61 "posix_spawn"))
2c9143a1 62 (("/bin/sh")
0e4e4b13
LC
63 bash))
64
65 (substitute* "gettext-tools/src/project-id"
66 (("/bin/pwd")
67 "pwd"))))
68 %standard-phases)
69
70 ;; When tests fail, we want to know the details.
71 #:make-flags '("VERBOSE=yes")))
2c9143a1 72 (home-page "http://www.gnu.org/software/gettext/")
f50d2669 73 (synopsis "Tools and documentation for translation")
f190f92f 74 (description
79c311b8
LC
75 "GNU Gettext is a package providing a framework for translating the
76textual output of programs into multiple languages. It provides translators
77with the means to create message catalogs, as well as an Emacs mode to work
78with them, and a runtime library to load translated messages from the
79catalogs. Nearly all GNU packages use Gettext.")
4a44e743 80 (license gpl3))) ; some files are under GPLv2+