PKGNAME=powershell
PKGSEC=shells
PKGDES="Interactive shell for automation and configuration management"
PKGDEP="dotnet-runtime-deps-10.0"
BUILDDEP="dotnet-sdk-10.0 powershell curl"

BUILDDEP__LOONGARCH64="${BUILDDEP} dotnet-sdk-10.0-source-built-artifacts"
BUILDDEP__LOONGARCH64_NOSIMD="${BUILDDEP} dotnet-sdk-10.0-source-built-artifacts"

# FIXME: /usr/bin/ld: /tmp/cc2KTrIn.ltrans0.ltrans.o: warning: relocation against `_ZTVSt9basic_iosIcSt11char_traitsIcEE@@GLIBCXX_3.4' in read-only section `.text.unlikely'
# /usr/bin/ld: /tmp/cc2KTrIn.ltrans0.ltrans.o: relocation R_X86_64_PC32 against symbol `_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE@@GLIBCXX_3.4.21' can not be used when making a shared object; recompile with -fPIC
# /usr/bin/ld: final link failed: bad value
CMAKE_AFTER=(
    '-DCMAKE_CXX_FLAGS=-fPIC'
)

# FIXME: Loongson3 has no dotnet
# FIXME: riscv64 unable to complete stage 2 build in reasonable time
# FIXME: ppc64el failed at stage 1 build, has no AOT compiler, and build system unable to determine architecture
FAIL_ARCH="@(loongson3|riscv64|ppc64el)"
