diff mbox series

[bug#67824,core-updates,v2,6/9] gnu: glibc-utf8-locales: Add the C.UTF-8 locale.

Message ID 7f7ca40f6236f1456cdc5604549a60f8070d6514.1702916397.git.ludo@gnu.org
State New
Headers show
Series Run builds in C.UTF-8 locale | expand

Commit Message

Ludovic Courtès Dec. 18, 2023, 4:30 p.m. UTC
* gnu/packages/base.scm (%default-utf8-locales): Add "C".
(make-glibc-utf8-locales): Delete "C" from LOCALES for glibc versions
lower than or equal to 2.35.

Change-Id: I6a6faa68dc18bf0f87c372109a17f476d3561278
---
 gnu/packages/base.scm | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index d31c0b0772..eab9ff411d 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -1396,7 +1396,8 @@  (define-public (make-glibc-locales glibc)
 (define %default-utf8-locales
   ;; These are the locales commonly used for tests---e.g., in Guile's i18n
   ;; tests.
-  '("de_DE" "el_GR" "en_US" "fr_FR" "tr_TR"))
+  '("C" "de_DE" "el_GR" "en_US" "fr_FR" "tr_TR"))
+
 (define*-public (make-glibc-utf8-locales glibc #:key
                                          (locales %default-utf8-locales)
                                          (name "glibc-utf8-locales"))
@@ -1444,7 +1445,14 @@  (define*-public (make-glibc-utf8-locales glibc #:key
                              (symlink (string-append locale ".utf8")
                                       (string-append localedir "/"
                                                      locale ".UTF-8")))
-                           '#$locales)))))
+
+                           ;; The C.UTF-8 locale was introduced in 2.35 but it
+                           ;; fails to build there:
+                           ;; <https://sourceware.org/bugzilla/show_bug.cgi?id=28861>.
+                           '#$(if (version>? (package-version this-package)
+                                             "2.35")
+                                  locales
+                                  (delete "C" locales)))))))
     (native-inputs (list glibc gzip))
     (synopsis (if default-locales?
                   (P_ "Small sample of UTF-8 locales")