sirius: libxc 7 forward compat (#48663)
This commit is contained in:
parent
68af5cc4c0
commit
e1e17786c5
16
var/spack/repos/builtin/packages/sirius/libxc7.patch
Normal file
16
var/spack/repos/builtin/packages/sirius/libxc7.patch
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
--- a/src/potential/xc_functional_base.hpp
|
||||||
|
+++ b/src/potential/xc_functional_base.hpp
|
||||||
|
@@ -15,6 +15,13 @@
|
||||||
|
#define __XC_FUNCTIONAL_BASE_HPP__
|
||||||
|
|
||||||
|
#include <xc.h>
|
||||||
|
+
|
||||||
|
+/* libxc >= 7 split the functional definition in a different file from xc.h */
|
||||||
|
+
|
||||||
|
+#if (XC_MAJOR_VERSION >= 7)
|
||||||
|
+#include <xc_funcs.h>
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
#include <string.h>
|
||||||
|
#include <memory>
|
||||||
|
#include <map>
|
@ -130,7 +130,7 @@ class Sirius(CMakePackage, CudaPackage, ROCmPackage):
|
|||||||
depends_on("fftw-api@3")
|
depends_on("fftw-api@3")
|
||||||
depends_on("libxc@3.0.0:")
|
depends_on("libxc@3.0.0:")
|
||||||
depends_on("libxc@4.0.0:", when="@7.2.0:")
|
depends_on("libxc@4.0.0:", when="@7.2.0:")
|
||||||
depends_on("libxc@:6", when="@:7.6.1")
|
depends_on("libxc@:7", when="@:7.5")
|
||||||
depends_on("spglib")
|
depends_on("spglib")
|
||||||
depends_on("hdf5+hl")
|
depends_on("hdf5+hl")
|
||||||
depends_on("pkgconfig", type="build")
|
depends_on("pkgconfig", type="build")
|
||||||
@ -164,6 +164,8 @@ class Sirius(CMakePackage, CudaPackage, ROCmPackage):
|
|||||||
# spla removed the openmp option in 1.6.0
|
# spla removed the openmp option in 1.6.0
|
||||||
conflicts("^spla@:1.5~openmp", when="+openmp")
|
conflicts("^spla@:1.5~openmp", when="+openmp")
|
||||||
|
|
||||||
|
patch("libxc7.patch", when="@7.6:")
|
||||||
|
|
||||||
depends_on("nlcglib", when="+nlcglib")
|
depends_on("nlcglib", when="+nlcglib")
|
||||||
depends_on("nlcglib+rocm", when="+nlcglib+rocm")
|
depends_on("nlcglib+rocm", when="+nlcglib+rocm")
|
||||||
depends_on("nlcglib+cuda", when="+nlcglib+cuda")
|
depends_on("nlcglib+cuda", when="+nlcglib+cuda")
|
||||||
|
Loading…
Reference in New Issue
Block a user