aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/commencement.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-04-21 22:53:09 +0200
committerLudovic Courtès <ludo@gnu.org>2015-04-21 22:53:09 +0200
commit6162b95d21a7b75fe3753c22c7755c5d12a8302f (patch)
treefc94f9d545053b006581ce4901ec3cb588468ab5 /gnu/packages/commencement.scm
parentef593a103da92410192581be7a757e5654fae327 (diff)
downloadguix-6162b95d21a7b75fe3753c22c7755c5d12a8302f.tar
guix-6162b95d21a7b75fe3753c22c7755c5d12a8302f.tar.gz
gnu: glibc: Add dependency on Gettext, to install the message catalogs.
This fixes a bug whereby the libc.mo files were not installed, and thus translations of libc's messages were not available. * gnu/packages/commencement.scm (gettext-boot0): New variable. (glibc-final)[native-inputs]: New field. * gnu/packages/base.scm (glibc)[native-inputs]: Add GNU-GETTEXT.
Diffstat (limited to 'gnu/packages/commencement.scm')
-rw-r--r--gnu/packages/commencement.scm41
1 files changed, 41 insertions, 0 deletions
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 4342dc56d1..9918c21fd1 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -31,6 +31,7 @@
#:use-module (gnu packages gawk)
#:use-module (gnu packages bison)
#:use-module (gnu packages guile)
+ #:use-module (gnu packages gettext)
#:use-module (gnu packages multiprecision)
#:use-module (gnu packages compression)
#:use-module (gnu packages perl)
@@ -418,6 +419,42 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
'("gcc" "libc")))
(current-source-location)))))
+(define gettext-boot0
+ ;; A minimal gettext used during bootstrap.
+ (let ((gettext-minimal (package
+ (inherit gnu-gettext)
+ (name "gettext-boot0")
+ (inputs '()) ;zero dependencies
+ (arguments
+ (substitute-keyword-arguments
+ `(#:configure-flags '("--disable-threads")
+ #:tests? #f
+ ,@(package-arguments gnu-gettext))
+ ((#:phases phases)
+ `(modify-phases ,phases
+ ;; Build only the tools.
+ (add-after 'unpack 'chdir
+ (lambda _
+ (chdir "gettext-tools")))
+
+ ;; Some test programs require pthreads,
+ ;; which we don't have.
+ (add-before 'configure 'no-test-programs
+ (lambda _
+ (substitute* "tests/Makefile.in"
+ (("^PROGRAMS =.*$")
+ "PROGRAMS =\n"))
+ #t))
+
+ ;; Don't try to link against libexpat.
+ (delete 'link-expat)
+ (delete 'patch-tests))))))))
+ (package-with-bootstrap-guile
+ (package-with-explicit-inputs gettext-minimal
+ %boot1-inputs
+ (current-source-location)
+ #:guile %bootstrap-guile))))
+
(define-public glibc-final
;; The final glibc, which embeds the statically-linked Bash built above.
(package (inherit glibc-final-with-bootstrap-bash)
@@ -427,6 +464,10 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
"static-bash"
(package-inputs glibc-final-with-bootstrap-bash))))
+ ;; This time we need 'msgfmt' to install all the libc.mo files.
+ (native-inputs `(,@(package-native-inputs glibc-final-with-bootstrap-bash)
+ ("gettext" ,gettext-boot0)))
+
;; The final libc only refers to itself, but the 'debug' output contains
;; references to GCC-BOOT0 and to the Linux headers. XXX: Would be great
;; if 'allowed-references' were per-output.