summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Karetnikov <nikita@karetnikov.org>2012-11-23 23:31:26 +0000
committerLudovic Courtès <ludo@gnu.org>2012-11-24 00:52:16 +0100
commitf190f92f9114f42f55d9dde9f71ecd1b9bc29d0d (patch)
tree70c6aa1e6c96664f65f6df6597eefe7e8263c795
parentec5288609ba4d8dbe3191379c13e821eb86b11ef (diff)
distro: Add GNU Gettext.
* distro/packages/gettext.scm, distro/packages/patches/gettext-gets-undeclared.patch: New files. * Makefile.am (MODULES): Add 'gettext.scm'. (dist_patch_DATA): Add 'gettext-gets-undeclared.patch'.
-rw-r--r--Makefile.am2
-rw-r--r--distro/packages/gettext.scm64
-rw-r--r--distro/packages/patches/gettext-gets-undeclared.patch77
3 files changed, 143 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index ae70a2684d2..08c12fbb5fa 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -52,6 +52,7 @@ MODULES = \
52 distro/packages/flex.scm \ 52 distro/packages/flex.scm \
53 distro/packages/gawk.scm \ 53 distro/packages/gawk.scm \
54 distro/packages/gdbm.scm \ 54 distro/packages/gdbm.scm \
55 distro/packages/gettext.scm \
55 distro/packages/gnupg.scm \ 56 distro/packages/gnupg.scm \
56 distro/packages/gnutls.scm \ 57 distro/packages/gnutls.scm \
57 distro/packages/gperf.scm \ 58 distro/packages/gperf.scm \
@@ -87,6 +88,7 @@ dist_patch_DATA = \
87 distro/packages/patches/binutils-ld-new-dtags.patch \ 88 distro/packages/patches/binutils-ld-new-dtags.patch \
88 distro/packages/patches/diffutils-gets-undeclared.patch \ 89 distro/packages/patches/diffutils-gets-undeclared.patch \
89 distro/packages/patches/flex-bison-tests.patch \ 90 distro/packages/patches/flex-bison-tests.patch \
91 distro/packages/patches/gettext-gets-undeclared.patch \
90 distro/packages/patches/glibc-no-ld-so-cache.patch \ 92 distro/packages/patches/glibc-no-ld-so-cache.patch \
91 distro/packages/patches/guile-1.8-cpp-4.5.patch \ 93 distro/packages/patches/guile-1.8-cpp-4.5.patch \
92 distro/packages/patches/guile-default-utf8.patch \ 94 distro/packages/patches/guile-default-utf8.patch \
diff --git a/distro/packages/gettext.scm b/distro/packages/gettext.scm
new file mode 100644
index 00000000000..ebc25218ab4
--- /dev/null
+++ b/distro/packages/gettext.scm
@@ -0,0 +1,64 @@
1;;; Guix --- Nix package management from Guile. -*- coding: utf-8 -*-
2;;; Copyright (C) 2012 Nikita Karetnikov <nikita@karetnikov.org>
3;;;
4;;; This file is part of Guix.
5;;;
6;;; 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;;; 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 Guix. If not, see <http://www.gnu.org/licenses/>.
18
19(define-module (distro packages gettext)
20 #:use-module (distro)
21 #:use-module (guix packages)
22 #:use-module (guix download)
23 #:use-module (guix build-system gnu))
24
25(define-public gettext
26 (package
27 (name "gettext")
28 (version "0.18.1.1")
29 (source
30 (origin
31 (method url-fetch)
32 (uri (string-append "mirror://gnu/gettext/gettext-"
33 version ".tar.gz"))
34 (sha256
35 (base32
36 "1sa3ch12qxa4h3ya6hkz119yclcccmincl9j20dhrdx5mykp3b4k"))))
37 (build-system gnu-build-system)
38 (arguments
39 `(#:patches (list (assoc-ref %build-inputs "patch/gets"))))
40 (inputs
41 `(("patch/gets"
42 ,(search-patch "gettext-gets-undeclared.patch"))))
43 (home-page
44 "http://www.gnu.org/software/gettext/")
45 (synopsis
46 "GNU gettext, a well integrated set of translation tools and documentation")
47 (description
48 "Usually, programs are written and documented in English, and use
49English at execution time for interacting with users. Using a common
50language is quite handy for communication between developers,
51maintainers and users from all countries. On the other hand, most
52people are less comfortable with English than with their own native
53language, and would rather be using their mother tongue for day to
54day's work, as far as possible. Many would simply love seeing their
55computer screen showing a lot less of English, and far more of their
56own language.
57
58GNU `gettext' is an important step for the GNU Translation Project, as
59bit is an asset on which we may build many other steps. This package
60offers to programmers, translators, and even users, a well integrated
61set of tools and documentation. Specifically, the GNU `gettext'
62utilities are a set of tools that provides a framework to help other
63GNU packages produce multi-lingual messages.")
64 (license "GPLv3"))) ; some files are under GPLv2+
diff --git a/distro/packages/patches/gettext-gets-undeclared.patch b/distro/packages/patches/gettext-gets-undeclared.patch
new file mode 100644
index 00000000000..072a8d94ab0
--- /dev/null
+++ b/distro/packages/patches/gettext-gets-undeclared.patch
@@ -0,0 +1,77 @@
1This patch is needed to allow builds with newer versions of
2the GNU libc (2.16+).
3
4The upstream fix was:
5
6 commit 66712c23388e93e5c518ebc8515140fa0c807348
7 Author: Eric Blake <eblake@redhat.com>
8 Date: Thu Mar 29 13:30:41 2012 -0600
9
10 stdio: don't assume gets any more
11
12 Gnulib intentionally does not have a gets module, and now that C11
13 and glibc have dropped it, we should be more proactive about warning
14 any user on a platform that still has a declaration of this dangerous
15 interface.
16
17 * m4/stdio_h.m4 (gl_STDIO_H, gl_STDIO_H_DEFAULTS): Drop gets
18 support.
19 * modules/stdio (Makefile.am): Likewise.
20 * lib/stdio-read.c (gets): Likewise.
21 * tests/test-stdio-c++.cc: Likewise.
22 * m4/warn-on-use.m4 (gl_WARN_ON_USE_PREPARE): Fix comment.
23 * lib/stdio.in.h (gets): Make warning occur in more places.
24 * doc/posix-functions/gets.texi (gets): Update documentation.
25 Reported by Christer Solskogen.
26
27 Signed-off-by: Eric Blake <eblake@redhat.com>
28
29This patch just gets rid of the offending part.
30
31--- gettext-0.18.1.1/gettext-tools/libgettextpo/stdio.in.h-orig 2012-11-24 01:13:14.000000000 +0400
32+++ gettext-0.18.1.1/gettext-tools/libgettextpo/stdio.in.h 2012-11-24 01:13:46.000000000 +0400
33@@ -137,12 +137,6 @@
34 "use gnulib module fflush for portable POSIX compliance");
35 #endif
36
37-/* It is very rare that the developer ever has full control of stdin,
38- so any use of gets warrants an unconditional warning. Assume it is
39- always declared, since it is required by C89. */
40-#undef gets
41-_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
42-
43 #if @GNULIB_FOPEN@
44 # if @REPLACE_FOPEN@
45 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
46
47--- gettext-0.18.1.1/gettext-runtime/gnulib-lib/stdio.in.h-orig 2012-11-24 00:26:49.000000000 +0400
48+++ gettext-0.18.1.1/gettext-runtime/gnulib-lib/stdio.in.h 2012-11-24 00:45:54.000000000 +0400
49@@ -137,12 +137,6 @@
50 "use gnulib module fflush for portable POSIX compliance");
51 #endif
52
53-/* It is very rare that the developer ever has full control of stdin,
54- so any use of gets warrants an unconditional warning. Assume it is
55- always declared, since it is required by C89. */
56-#undef gets
57-_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
58-
59 #if @GNULIB_FOPEN@
60 # if @REPLACE_FOPEN@
61 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
62
63--- gettext-0.18.1.1/gettext-tools/gnulib-lib/stdio.in.h-orig 2012-11-24 01:00:26.000000000 +0400
64+++ gettext-0.18.1.1/gettext-tools/gnulib-lib/stdio.in.h 2012-11-24 01:00:53.000000000 +0400
65@@ -137,12 +137,6 @@
66 "use gnulib module fflush for portable POSIX compliance");
67 #endif
68
69-/* It is very rare that the developer ever has full control of stdin,
70- so any use of gets warrants an unconditional warning. Assume it is
71- always declared, since it is required by C89. */
72-#undef gets
73-_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
74-
75 #if @GNULIB_FOPEN@
76 # if @REPLACE_FOPEN@
77 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)