[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
05/07: gnu: glibc: Install C.UTF-8 locale.
From: |
guix-commits |
Subject: |
05/07: gnu: glibc: Install C.UTF-8 locale. |
Date: |
Sat, 9 Dec 2023 09:54:38 -0500 (EST) |
civodul pushed a commit to branch core-updates
in repository guix.
commit c76e44396ec940e2c3d99f24c89dbd6b55dffa06
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Wed Dec 6 10:52:49 2023 +0100
gnu: glibc: Install C.UTF-8 locale.
* gnu/packages/base.scm (glibc)[arguments]: Add ‘install-utf8-c-locale’
phase.
(glibc-2.35)[arguments]: Delete ‘install-utf8-c-locale’ phase.
(glibc-2.33, glibc-2.32, glibc-2.31): Inherit from ‘glibc-2.35’.
Change-Id: I7ba515184c7b7c40eaefd355639ffef8eeca66d8
---
gnu/packages/base.scm | 36 ++++++++++++++++++++++++++++++++----
1 file changed, 32 insertions(+), 4 deletions(-)
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index c5eac8a2da..1144110309 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -1023,6 +1023,26 @@ the store.")
(map (cut string-append slib "/" <>)
files))))))
+ (add-after 'install 'install-utf8-c-locale
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; Install the C.UTF-8 locale so there's always a UTF-8
+ ;; locale around.
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin"))
+ (locale (string-append out "/lib/locale/"
+ ,(package-version
+ this-package))))
+ (mkdir-p locale)
+
+ ;; FIXME: When cross-compiling, attempt to use
+ ;; 'localedef' from the same libc version.
+ (invoke ,(if (%current-target-system)
+ "true"
+ '(string-append bin "/localedef"))
+ "--no-archive" "--prefix" locale
+ "-i" "C" "-f" "UTF-8"
+ (string-append locale "/C.UTF-8")))))
+
,@(if (target-hurd?)
'((add-after 'install 'augment-libc.so
(lambda* (#:key outputs #:allow-other-keys)
@@ -1108,11 +1128,19 @@ with the Linux kernel.")
"glibc-hurd-clock_t_centiseconds.patch"
"glibc-hurd-clock_gettime_monotonic.patch"
"glibc-hurd-mach-print.patch"
- "glibc-hurd-gettyent.patch"))))))
+ "glibc-hurd-gettyent.patch"))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments glibc)
+ ((#:phases phases)
+ ;; The C.UTF-8 fails to build in glibc 2.35:
+ ;; <https://sourceware.org/bugzilla/show_bug.cgi?id=28861>.
+ ;; It is missing altogether in versions earlier than 2.35.
+ `(modify-phases ,phases
+ (delete 'install-utf8-c-locale)))))))
(define-public glibc-2.33
(package
- (inherit glibc)
+ (inherit glibc-2.35)
(name "glibc")
(version "2.33")
(source (origin
@@ -1139,7 +1167,7 @@ with the Linux kernel.")
(define-public glibc-2.32
(package
- (inherit glibc)
+ (inherit glibc-2.35)
(version "2.32")
(source (origin
(inherit (package-source glibc))
@@ -1194,7 +1222,7 @@ with the Linux kernel.")
(define-public glibc-2.31
(package
- (inherit glibc)
+ (inherit glibc-2.35)
(version "2.31")
(source (origin
(inherit (package-source glibc))
- branch core-updates updated (69d31a1580 -> 5bbddafeaa), guix-commits, 2023/12/09
- 04/07: gnu: glibc: Update to 2.38., guix-commits, 2023/12/09
- 02/07: gnu: glibc-utf8-locales: Generalize and use gexps., guix-commits, 2023/12/09
- 03/07: gnu: mpfr: Update to 4.2.1., guix-commits, 2023/12/09
- 05/07: gnu: glibc: Install C.UTF-8 locale.,
guix-commits <=
- 01/07: gnu: gcc@11: Update to 11.4.0., guix-commits, 2023/12/09
- 07/07: gnu: glibc: Improve handling of empty .a files., guix-commits, 2023/12/09
- 06/07: gnu: glibc: Ensure C.UTF-8 locale is always found., guix-commits, 2023/12/09