Gentoo Archives: gentoo-commits

From: Mike Gilbert <floppym@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Thu, 03 Dec 2015 16:44:14
Message-Id: 1449161024.f946bebc3feb73e7e2e406c70482abf76404954e.floppym@gentoo
1 commit: f946bebc3feb73e7e2e406c70482abf76404954e
2 Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
3 AuthorDate: Mon Nov 30 16:58:36 2015 +0000
4 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
5 CommitDate: Thu Dec 3 16:43:44 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f946bebc
7
8 python-utils-r1.eclass: Change python_export_utf8_locale to deal with LC_ALL=C
9
10 Paludis sets LC_ALL=C to ensure a 'sane' build environment.
11 We only want to override LC_CTYPE, so we break LC_ALL into separate
12 LC_* overrides and set LC_ALL to blank.
13
14 eclass/python-utils-r1.eclass | 22 +++++++++++++++-------
15 1 file changed, 15 insertions(+), 7 deletions(-)
16
17 diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
18 index b163fd8..024e093 100644
19 --- a/eclass/python-utils-r1.eclass
20 +++ b/eclass/python-utils-r1.eclass
21 @@ -1189,19 +1189,27 @@ python_export_utf8_locale() {
22 type locale >/dev/null || return 0
23
24 if [[ $(locale charmap) != UTF-8 ]]; then
25 - if [[ -n ${LC_ALL} ]]; then
26 - ewarn "LC_ALL is set to a locale with a charmap other than UTF-8."
27 - ewarn "This may trigger build failures in some python packages."
28 - return 1
29 - fi
30 -
31 # Try English first, then everything else.
32 local lang locales="en_US.UTF-8 $(locale -a)"
33
34 for lang in ${locales}; do
35 - if [[ $(LC_CTYPE=${lang} locale charmap 2>/dev/null) == UTF-8 ]]; then
36 + if [[ $(LC_ALL=${lang} locale charmap 2>/dev/null) == UTF-8 ]]; then
37 if _python_check_locale_sanity "${lang}"; then
38 export LC_CTYPE=${lang}
39 + if [[ -n ${LC_ALL} ]]; then
40 + export LC_NUMERIC=${LC_ALL}
41 + export LC_TIME=${LC_ALL}
42 + export LC_COLLATE=${LC_ALL}
43 + export LC_MONETARY=${LC_ALL}
44 + export LC_MESSAGES=${LC_ALL}
45 + export LC_PAPER=${LC_ALL}
46 + export LC_NAME=${LC_ALL}
47 + export LC_ADDRESS=${LC_ALL}
48 + export LC_TELEPHONE=${LC_ALL}
49 + export LC_MEASUREMENT=${LC_ALL}
50 + export LC_IDENTIFICATION=${LC_ALL}
51 + export LC_ALL=
52 + fi
53 return 0
54 fi
55 fi