aboutsummaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorAnna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>2022-11-25 16:30:29 +0500
committerAnna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>2022-11-25 16:37:01 +0500
commit20ac305c615fa9f437476ce1c42db6171b6fc48b (patch)
tree1ae15246a8aa063494d34c55a935aa6bdbea8c8f /eclass
parentdotnet-utils.eclass: depend on virtual (diff)
downloadguru-20ac305c615fa9f437476ce1c42db6171b6fc48b.tar.gz
guru-20ac305c615fa9f437476ce1c42db6171b6fc48b.tar.bz2
guru-20ac305c615fa9f437476ce1c42db6171b6fc48b.zip
dotnet-utils.eclass: match use-flags instead of ${ARCH}
Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/dotnet-utils.eclass34
1 files changed, 15 insertions, 19 deletions
diff --git a/eclass/dotnet-utils.eclass b/eclass/dotnet-utils.eclass
index 9e15fb08c..ea7c6591e 100644
--- a/eclass/dotnet-utils.eclass
+++ b/eclass/dotnet-utils.eclass
@@ -97,7 +97,7 @@ nuget_uris() {
for nuget in ${nugets}; do
local name version url
- [[ $nuget =~ $regex ]] || die "Could not parse name and version from nuget: $nuget"
+ [[ ${nuget} =~ ${regex} ]] || die "Could not parse name and version from nuget: $nuget"
name="${BASH_REMATCH[1]}"
version="${BASH_REMATCH[2]}"
url="https://api.nuget.org/v3-flatcontainer/${name}/${version}/${name}.${version}.nupkg"
@@ -109,24 +109,20 @@ nuget_uris() {
# @DESCRIPTION:
# Sets up DOTNET_RUNTIME and DOTNET_EXECUTABLE variables for later use in edotnet.
dotnet-utils_pkg_setup() {
- case "${ARCH}" in
- *amd64)
- DOTNET_RUNTIME="linux-x64"
- ;;
- *arm)
- DOTNET_RUNTIME="linux-arm"
- ;;
- *arm64)
- DOTNET_RUNTIME="linux-arm64"
- ;;
- *)
- die "Unsupported arch: ${ARCH}"
- ;;
- esac
-
- for _dotnet in dotnet-{${DOTNET_SLOT},bin-${DOTNET_SLOT}}; do
- if type $_dotnet 1> /dev/null 2>&1; then
- DOTNET_EXECUTABLE=$_dotnet
+ if use amd64; then
+ DOTNET_RUNTIME="linux-x64"
+ elif use arm; then
+ DOTNET_RUNTIME="linux-arm"
+ elif use arm64; then
+ DOTNET_RUNTIME="linux-arm64"
+ else
+ die "Unsupported arch: ${ARCH}"
+ fi
+
+ local _dotnet
+ for _dotnet in dotnet{,-bin}-${DOTNET_SLOT}; do
+ if type ${_dotnet} 1> /dev/null 2>&1; then
+ DOTNET_EXECUTABLE=${_dotnet}
break
fi
done