[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
07/08: packages: When possible, use a UTF-8 locale in patch-and-repack.
From: |
Ludovic Courtès |
Subject: |
07/08: packages: When possible, use a UTF-8 locale in patch-and-repack. |
Date: |
Thu, 26 Feb 2015 23:09:53 +0000 |
civodul pushed a commit to branch core-updates
in repository guix.
commit 9cca706c2e76bddb3c04ca2ab310cd1262596232
Author: Ludovic Courtès <address@hidden>
Date: Fri Feb 27 00:03:17 2015 +0100
packages: When possible, use a UTF-8 locale in patch-and-repack.
* guix/packages.scm (%standard-patch-inputs): Add "locales".
(patch-and-repack)[builder]: Add 'locales' variable. When it is true,
call 'setenv' and 'setlocale'.
---
guix/packages.scm | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/guix/packages.scm b/guix/packages.scm
index 5b686a1..b72a6dd 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -335,7 +335,8 @@ corresponds to the arguments expected by
`set-path-environment-variable'."
("bzip2" ,(ref '(gnu packages compression) 'bzip2))
("gzip" ,(ref '(gnu packages compression) 'gzip))
("lzip" ,(ref '(gnu packages compression) 'lzip))
- ("patch" ,(ref '(gnu packages base) 'patch)))))
+ ("patch" ,(ref '(gnu packages base) 'patch))
+ ("locales" ,(ref '(gnu packages base) 'glibc-utf8-locales)))))
(define (default-guile)
"Return the default Guile package used to run the build code of
@@ -411,7 +412,8 @@ IMPORTED-MODULES specify modules to use/import for use by
SNIPPET."
(srfi srfi-1)
(guix build utils))
- (let ((out (assoc-ref %outputs "out"))
+ (let ((locales (assoc-ref %build-inputs "locales"))
+ (out (assoc-ref %outputs "out"))
(xz (assoc-ref %build-inputs "xz"))
(decomp (assoc-ref %build-inputs ,decompression-type))
(source (assoc-ref %build-inputs "source"))
@@ -433,6 +435,12 @@ IMPORTED-MODULES specify modules to use/import for use by
SNIPPET."
(lambda (name)
(not (member name '("." "..")))))))
+ (when locales
+ ;; First of all, install a UTF-8 locale so that UTF-8 file names
+ ;; are correctly interpreted. During bootstrap, LOCALES is #f.
+ (setenv "LOCPATH" (string-append locales "/lib/locale"))
+ (setlocale LC_ALL "en_US.UTF-8"))
+
(setenv "PATH" (string-append xz "/bin" ":"
decomp "/bin"))
- branch core-updates updated (a068dba -> f307947), Ludovic Courtès, 2015/02/26
- 01/08: Merge branch 'master' into core-updates, Ludovic Courtès, 2015/02/26
- 05/08: build-system/gnu: Add 'install-locale' phase., Ludovic Courtès, 2015/02/26
- 06/08: gnu: Add glibc-utf8-locales to the implicit inputs., Ludovic Courtès, 2015/02/26
- 08/08: ld-wrapper: Add '-rpath' for arguments such as 'libfoo.so.5.3'., Ludovic Courtès, 2015/02/26
- 02/08: build-system/gnu: Add support for zip archives., Ludovic Courtès, 2015/02/26
- 03/08: utils: Add 'modify-phases'., Ludovic Courtès, 2015/02/26
- 07/08: packages: When possible, use a UTF-8 locale in patch-and-repack.,
Ludovic Courtès <=
- 04/08: build-system: Use 'modify-phases'., Ludovic Courtès, 2015/02/26