From 0257b2db4bb2539c103fe324435bb9e14eaa0644 Mon Sep 17 00:00:00 2001 From: jgraciahlrs Date: Mon, 5 Aug 2024 15:47:38 +0200 Subject: libxcb: Set well-known locale for build (#45502) * libxcb: Set well-known locale for build Builds might fail if no valid locale is set. See https://www.linuxfromscratch.org/blfs/view/git/x/libxcb.html * libxcb: fix style * libxcb: change locale from en_US.UTF-8 to C.UTF-8 * libxcb: fix style * Update var/spack/repos/builtin/packages/libxcb/package.py Co-authored-by: Wouter Deconinck * [@spackbot] updating style on behalf of jgraciahlrs --------- Co-authored-by: Wouter Deconinck Co-authored-by: jgraciahlrs --- var/spack/repos/builtin/packages/libxcb/package.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/var/spack/repos/builtin/packages/libxcb/package.py b/var/spack/repos/builtin/packages/libxcb/package.py index fefdebd20c..2d5959cc8c 100644 --- a/var/spack/repos/builtin/packages/libxcb/package.py +++ b/var/spack/repos/builtin/packages/libxcb/package.py @@ -60,3 +60,13 @@ class Libxcb(AutotoolsPackage, XorgPackage): def patch(self): filter_file("typedef struct xcb_auth_info_t {", "typedef struct {", "src/xcb.h") + + # libxcb fails to build with non-UTF-8 locales, see: + # https://www.linuxfromscratch.org/blfs/view/git/x/libxcb.html + # https://gitlab.freedesktop.org/xorg/lib/libxcb/-/merge_requests/53 (merged in 1.17.0) + # https://gitlab.freedesktop.org/xorg/lib/libxcb/-/merge_requests/60 + # If a newer release can be verified to build with LC_ALL=en_US.ISO-8859-1, + # then we can limit the following function, e.g. + # when("@:1.17") + def setup_build_environment(self, env): + env.set("LC_ALL", "C.UTF-8") -- cgit v1.2.3-70-g09d2