commit:     ba1147ed43b2ef34965963f0fb3dc9fac99798cf
Author:     Alfred Wingate <parona <AT> protonmail <DOT> com>
AuthorDate: Sun Feb  8 20:34:51 2026 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Feb  8 20:41:39 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ba1147ed

media-gfx/gimp: tighten C.UTF-8/C.utf-8 check

Bug: https://bugs.gentoo.org/969468
Fixes: 73412ee2b83589fc6bccf63c320cbbe4cd20e50e
Signed-off-by: Alfred Wingate <parona <AT> protonmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-gfx/gimp/gimp-3.0.8-r1.ebuild | 2 +-
 media-gfx/gimp/gimp-9999.ebuild     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/media-gfx/gimp/gimp-3.0.8-r1.ebuild 
b/media-gfx/gimp/gimp-3.0.8-r1.ebuild
index 0795b4c13e07..70b8b4411170 100644
--- a/media-gfx/gimp/gimp-3.0.8-r1.ebuild
+++ b/media-gfx/gimp/gimp-3.0.8-r1.ebuild
@@ -143,7 +143,7 @@ pkg_setup() {
                local locales="$(locale -a)"
                if ! has "en_US.utf8" ${locales} && ! has "en_US.UTF-8" 
${locales}; then
                        # portage splits and unset LC_ALL. Cannot rely on that
-                       if [[ ${LANG} != C ]] && [[ ${LANG} != POSIX ]] && ! [[ 
${LANG} =~ C. ]]; then
+                       if [[ "${LANG}" != "C" ]] && [[ "${LANG}" != "POSIX" ]] 
&& [[ "${LANG}" == "${LANG#C\.}" ]]; then
                                # Set LC_ALL to avoid locales breaking due to 
the profile setting LC_MESSAGES=C and portage itself setting LC_COLLATE=C
                                einfo "Setting LC_ALL=${LANG} based on LANG 
because en_US.UTF-8 isn't available, bug #968468"
                                export LC_ALL="${LANG}"

diff --git a/media-gfx/gimp/gimp-9999.ebuild b/media-gfx/gimp/gimp-9999.ebuild
index afb84ea38cfb..4dbb5d495823 100644
--- a/media-gfx/gimp/gimp-9999.ebuild
+++ b/media-gfx/gimp/gimp-9999.ebuild
@@ -168,7 +168,7 @@ pkg_setup() {
                local locales="$(locale -a)"
                if ! has "en_US.utf8" ${locales} && ! has "en_US.UTF-8" 
${locales}; then
                        # portage splits and unset LC_ALL. Cannot rely on that
-                       if [[ ${LANG} != C ]] && [[ ${LANG} != POSIX ]] && ! [[ 
${LANG} =~ C. ]]; then
+                       if [[ "${LANG}" != "C" ]] && [[ "${LANG}" != "POSIX" ]] 
&& [[ "${LANG}" == "${LANG#C\.}" ]]; then
                                # Set LC_ALL to avoid locales breaking due to 
the profile setting LC_MESSAGES=C and portage itself setting LC_COLLATE=C
                                einfo "Setting LC_ALL=${LANG} based on LANG 
because en_US.UTF-8 isn't available, bug #968468"
                                export LC_ALL="${LANG}"

Reply via email to