summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaciej Barć <xgqt@gentoo.org>2024-01-21 01:42:33 +0100
committerMaciej Barć <xgqt@gentoo.org>2024-01-21 01:44:53 +0100
commit0c8b5b9879551e757487e140fd6d4bd7fb13daec (patch)
tree8cc3f8a6962c70753f1f1c2019edabc688a25c00 /app-shells
parentsys-apps/inxi: drop 3.3.28.1 (diff)
downloadgentoo-0c8b5b9879551e757487e140fd6d4bd7fb13daec.tar.gz
gentoo-0c8b5b9879551e757487e140fd6d4bd7fb13daec.tar.bz2
gentoo-0c8b5b9879551e757487e140fd6d4bd7fb13daec.zip
app-shells/pwsh: just export desired locale on musl
Closes: https://bugs.gentoo.org/922534 Signed-off-by: Maciej Barć <xgqt@gentoo.org>
Diffstat (limited to 'app-shells')
-rw-r--r--app-shells/pwsh/pwsh-7.3.9.ebuild24
-rw-r--r--app-shells/pwsh/pwsh-7.4.0.ebuild22
2 files changed, 36 insertions, 10 deletions
diff --git a/app-shells/pwsh/pwsh-7.3.9.ebuild b/app-shells/pwsh/pwsh-7.3.9.ebuild
index ca71f9702880..b4c0acc62c02 100644
--- a/app-shells/pwsh/pwsh-7.3.9.ebuild
+++ b/app-shells/pwsh/pwsh-7.3.9.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# NOTICE: Before packaging we have to run "ResGen" and "GetDependencies".
@@ -332,6 +332,28 @@ DOCS=( CHANGELOG CHANGELOG.md CODE_OF_CONDUCT.md README.md docs )
pkg_setup() {
check-reqs_pkg_setup
dotnet-pkg_pkg_setup
+
+ if [[ "${MERGE_TYPE}" != binary ]] ; then
+ if use elibc_glibc ; then
+ local locales="$(locale -a)"
+
+ if has en_US.utf8 ${locales} ; then
+ LC_ALL=en_US.utf8
+ elif has en_US.UTF-8 ${locales} ; then
+ LC_ALL=en_US.UTF-8
+ else
+ eerror "The locale en_US.utf8 or en_US.UTF-8 is not available."
+ eerror "Please generate en_US.UTF-8 before building ${CATEGORY}/${P}."
+
+ die "Could not switch to the en_US.UTF-8 locale."
+ fi
+ else
+ LC_ALL=en_US.UTF-8
+ fi
+
+ export LC_ALL
+ einfo "Successfully switched to the ${LC_ALL} locale."
+ fi
}
src_unpack() {
diff --git a/app-shells/pwsh/pwsh-7.4.0.ebuild b/app-shells/pwsh/pwsh-7.4.0.ebuild
index 5c170e355644..ff259b5a16d2 100644
--- a/app-shells/pwsh/pwsh-7.4.0.ebuild
+++ b/app-shells/pwsh/pwsh-7.4.0.ebuild
@@ -294,17 +294,21 @@ pkg_setup() {
dotnet-pkg_pkg_setup
if [[ "${MERGE_TYPE}" != binary ]] ; then
- local locales="$(locale -a)"
+ if use elibc_glibc ; then
+ local locales="$(locale -a)"
- if has en_US.utf8 ${locales} ; then
- LC_ALL=en_US.utf8
- elif has en_US.UTF-8 ${locales} ; then
- LC_ALL=en_US.UTF-8
- else
- eerror "The locale en_US.utf8 or en_US.UTF-8 is not available."
- eerror "Please generate en_US.UTF-8 before building ${CATEGORY}/${P}."
+ if has en_US.utf8 ${locales} ; then
+ LC_ALL=en_US.utf8
+ elif has en_US.UTF-8 ${locales} ; then
+ LC_ALL=en_US.UTF-8
+ else
+ eerror "The locale en_US.utf8 or en_US.UTF-8 is not available."
+ eerror "Please generate en_US.UTF-8 before building ${CATEGORY}/${P}."
- die "Could not switch to the en_US.UTF-8 locale."
+ die "Could not switch to the en_US.UTF-8 locale."
+ fi
+ else
+ LC_ALL=en_US.UTF-8
fi
export LC_ALL