[intel-oneapi-mkl] patch mkl install to workaround cmake issue (#42146)

This commit is contained in:
Robert Cohn 2024-01-18 14:33:00 -05:00 committed by GitHub
parent ddfec30941
commit eb625321ae
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -134,6 +134,20 @@ class IntelOneapiMkl(IntelOneApiLibraryPackage):
provides("mkl") provides("mkl")
provides("lapack", "blas") provides("lapack", "blas")
@run_after("install")
def fixup_installation(self):
# fixup missing path in mkl cmake files. This issue was new in
# 2024.0.0 and expected to be fixed in the next release.
if self.spec.satisfies("@2024.0.0"):
# cannot use spack patch because this is applied to the
# installed mkl, not sources
filter_file(
'PATH_SUFFIXES "lib"',
'PATH_SUFFIXES "lib" "../../compiler/latest/lib"',
self.component_prefix.lib.cmake.mkl.join("MKLConfig.cmake"),
backup=False,
)
@property @property
def v2_layout_versions(self): def v2_layout_versions(self):
return "@2024:" return "@2024:"