commit:     d3314f8469a981e767fe80e9baa29e6ffe3d3c31
Author:     Nicolas PARLANT <nicolas.parlant <AT> parhuet <DOT> fr>
AuthorDate: Thu Apr 24 22:07:09 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Apr 24 22:23:10 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d3314f84

media-gfx/photoqt: delete source /etc/env.d/02locale for LC_COLLATE

set LC_COLLATE=en_US.utf-8 if available for testsuite
C, C.utf-8 or POSIX don't support natural sorting here

Closes: https://bugs.gentoo.org/954370
Signed-off-by: Nicolas PARLANT <nicolas.parlant <AT> parhuet.fr>
Part-of: https://github.com/gentoo/gentoo/pull/41735
Closes: https://github.com/gentoo/gentoo/pull/41735
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-gfx/photoqt/photoqt-4.8.1.ebuild | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/media-gfx/photoqt/photoqt-4.8.1.ebuild 
b/media-gfx/photoqt/photoqt-4.8.1.ebuild
index 20eda1e68978..48eae7add6f9 100644
--- a/media-gfx/photoqt/photoqt-4.8.1.ebuild
+++ b/media-gfx/photoqt/photoqt-4.8.1.ebuild
@@ -93,12 +93,11 @@ src_configure() {
 src_test() {
        local -x QT_QPA_PLATFORM=offscreen
        # QCollator::setNumericMode is not supported w/ POSIX/C locale or w/o 
icu
-       # Unset and source LC_COLLATE from the current system locale.
+       # Set LC_COLLATE=en_US.utf8 if available.
        # Required for PQCTest::getFoldersIn()
        unset LC_COLLATE
-       source "${EPREFIX}"/etc/env.d/02locale
-       [[ -n "${LC_COLLATE}" ]] && export LC_COLLATE
-       "${BUILD_DIR}"/photoqt_test || die
+       locale -a | grep -iq "en_US.utf8" || die "locale en_US.utf8 not 
available, testsuite not launched"
+       LC_COLLATE="en_US.utf8" "${BUILD_DIR}"/photoqt_test || die
 }
 
 pkg_postinst() {

Reply via email to