summaryrefslogtreecommitdiff
path: root/user
diff options
context:
space:
mode:
Diffstat (limited to 'user')
-rw-r--r--user/spack/APKBUILD26
-rw-r--r--user/spack/archspec-fix-cpu-family-detection.patch16
2 files changed, 34 insertions, 8 deletions
diff --git a/user/spack/APKBUILD b/user/spack/APKBUILD
index 5758f1fd1..bdc9c3122 100644
--- a/user/spack/APKBUILD
+++ b/user/spack/APKBUILD
@@ -1,9 +1,8 @@
# Contributor: Zach van Rijn <me@zv.io>
# Maintainer: Zach van Rijn <me@zv.io>
pkgname=spack
-pkgver=0.17.2 # git tag --contains releases/latest | grep ^v
-_rev=bb8fbb9b589e667f92ce7d56b3802ba44cb188ec # branch 'adelie'
-pkgrel=1
+pkgver=0.19.0_p1
+pkgrel=0
pkgdesc="A flexible package manager for supercomputers."
url="https://spack.io/"
arch="all"
@@ -12,8 +11,20 @@ options="!dbg !strip"
makedepends="python3-dev"
depends="$makedepends" # due to bootstrap design
subpackages=""
-source="https://git.adelielinux.org/adelie/$pkgname/-/archive/$_rev/$pkgname-$_rev.tar.bz2"
-builddir="$srcdir/$pkgname-$_rev"
+# https://git.adelielinux.org/adelie/docs/-/wikis/Developer-Resources/Maintaining-Spack
+source="https://git.adelielinux.org/adelie/$pkgname/-/archive/adelie-v$pkgver/$pkgname-adelie-v$pkgver.tar.bz2
+ archspec-fix-cpu-family-detection.patch
+ "
+builddir="$srcdir/$pkgname-adelie-v$pkgver"
+
+prepare()
+{
+ default_prepare
+
+ sed -i etc/spack/defaults/bootstrap.yaml \
+ -e '/github-actions/d' \
+ ;
+}
check() {
##
@@ -23,8 +34,6 @@ check() {
export SPACK_DISABLE_LOCAL_CONFIG=true
export SPACK_USER_CONFIG_PATH=$builddir/tmp
export SPACK_USER_CACHE_PATH=$builddir/tmp
- bin/spack bootstrap untrust github-actions-v0.1
- bin/spack bootstrap untrust github-actions-v0.2
bin/spack install zlib
rm -fr var/spack/cache
}
@@ -43,4 +52,5 @@ package() {
;
}
-sha512sums="2745b008c4acd9e9420e88fc366676e3a4a40bd7c7d026de1f9595355eb7f06bf13634b9aeacae048bbc1b7d3c75232065a241e2fc171adcfb3dc3f50d57daac spack-bb8fbb9b589e667f92ce7d56b3802ba44cb188ec.tar.bz2"
+sha512sums="bc0dadee54fdbd15b374d6d768ed204ee66e776d9a86ba876b3023bca2875ce1f6ca4cc6fd15334ac0c0ceddab72910317833af277984d941d06d89dc145643d spack-adelie-v0.19.0_p1.tar.bz2
+a6503238d116b74ff9c4ecd08a984df90ce02f95c3e10e907481d99917c73339db1cc49f2b473a37875b92a9a6607cac72057c0a7b3d9a57d44c89ebe0ad3915 archspec-fix-cpu-family-detection.patch"
diff --git a/user/spack/archspec-fix-cpu-family-detection.patch b/user/spack/archspec-fix-cpu-family-detection.patch
new file mode 100644
index 000000000..a3979ec95
--- /dev/null
+++ b/user/spack/archspec-fix-cpu-family-detection.patch
@@ -0,0 +1,16 @@
+See also: https://github.com/archspec/archspec/issues/102
+
+diff --git a/lib/spack/external/archspec/cpu/detect.py b/lib/spack/external/archspec/cpu/detect.py
+index a7cc4481f6..cadd593ca2 100644
+--- a/lib/spack/external/archspec/cpu/detect.py
++++ b/lib/spack/external/archspec/cpu/detect.py
+@@ -92,7 +92,8 @@ def _machine():
+
+ # If we are not on Darwin, trust what Python tells us
+ if operating_system != "Darwin":
+- return platform.machine()
++ machine = platform.machine()
++ return TARGETS[machine].family.name if machine in TARGETS else machine
+
+ # On Darwin it might happen that we are on M1, but using an interpreter
+ # built for x86_64. In that case "platform.machine() == 'x86_64'", so we