mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-11 05:39:41 -05:00
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
This commit is contained in:
parent
9dbba02382
commit
ed0cd12a82
1 changed files with 32 additions and 4 deletions
|
@ -1075,6 +1075,26 @@ (define (linker-script? file)
|
|||
(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)
|
||||
|
@ -1169,11 +1189,19 @@ (define-public glibc-2.35
|
|||
"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
|
||||
|
@ -1200,7 +1228,7 @@ (define-public glibc-2.33
|
|||
|
||||
(define-public glibc-2.32
|
||||
(package
|
||||
(inherit glibc)
|
||||
(inherit glibc-2.35)
|
||||
(version "2.32")
|
||||
(source (origin
|
||||
(inherit (package-source glibc))
|
||||
|
@ -1255,7 +1283,7 @@ (define-public glibc-2.32
|
|||
|
||||
(define-public glibc-2.31
|
||||
(package
|
||||
(inherit glibc)
|
||||
(inherit glibc-2.35)
|
||||
(version "2.31")
|
||||
(source (origin
|
||||
(inherit (package-source glibc))
|
||||
|
|
Loading…
Reference in a new issue