summary refs log tree commit diff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2023-12-14 11:07:31 +0100
committerLudovic Courtès <ludo@gnu.org>2024-08-31 10:42:49 +0200
commit6a554dbc0d6b7850e7e4a22645908ed72662d862 (patch)
tree1e230236461c44ab0e40c74dbc55c0da3a4ade20
parentb089f95f144d2b75ebfb603b6f508915db10c601 (diff)
downloadguix-6a554dbc0d6b7850e7e4a22645908ed72662d862.tar.gz
gnu: glibc-utf8-locales: Add the C.UTF-8 locale.
* 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
-rw-r--r--gnu/packages/base.scm12
1 files changed, 10 insertions, 2 deletions
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 1140aa7491..098a6070dd 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -1454,7 +1454,8 @@ to the @code{share/locale} sub-directory of this package.")
 (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"))
@@ -1502,7 +1503,14 @@ to the @code{share/locale} sub-directory of this package.")
                              (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")