summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/liggghts/package.py
diff options
context:
space:
mode:
Diffstat (limited to 'var/spack/repos/builtin/packages/liggghts/package.py')
-rw-r--r--var/spack/repos/builtin/packages/liggghts/package.py20
1 files changed, 14 insertions, 6 deletions
diff --git a/var/spack/repos/builtin/packages/liggghts/package.py b/var/spack/repos/builtin/packages/liggghts/package.py
index d9487bea45..dac43ff365 100644
--- a/var/spack/repos/builtin/packages/liggghts/package.py
+++ b/var/spack/repos/builtin/packages/liggghts/package.py
@@ -16,6 +16,8 @@ class Liggghts(MakefilePackage):
url = "https://github.com/CFDEMproject/LIGGGHTS-PUBLIC/archive/3.8.0.tar.gz"
git = "ssh://git@github.com/CFDEMproject/LIGGGHTS-PUBLIC.git"
+ maintainers("SofiaXu")
+
version("3.8.0", sha256="9cb2e6596f584463ac2f80e3ff7b9588b7e3638c44324635b6329df87b90ab03")
variant("mpi", default=True, description="Enable MPI support")
@@ -28,7 +30,13 @@ class Liggghts(MakefilePackage):
depends_on("mpi", when="+mpi")
depends_on("jpeg", when="+jpeg")
depends_on("zlib-api", when="+gzip")
-
+ # patch for makefile test code
+ patch("makefile.patch")
+ # patch for clang and oneapi
+ patch("makefile-llvm-based-compiler.patch", when="%clang")
+ patch("makefile-llvm-based-compiler.patch", when="%oneapi")
+ # C++17 support
+ patch("cpp-17.patch")
build_directory = "src"
build_targets = ["auto"]
@@ -55,9 +63,9 @@ class Liggghts(MakefilePackage):
if "+mpi" in spec:
mpi = spec["mpi"]
- makefile.filter(r"^#(MPICXX_USER=).*", r"\1{0}".format(mpi.mpicxx))
- makefile.filter(r"^#(MPI_INC_USER=).*", r"\1{0}".format(mpi.prefix.include))
- makefile.filter(r"^#(MPI_LIB_USER=).*", r"\1{0}".format(mpi.prefix.lib))
+ makefile.filter(r"^#(MPICXX_USR=).*", r"\1{0}".format(mpi.mpicxx))
+ makefile.filter(r"^#(MPI_INC_USR=).*", r"\1{0}".format(mpi.prefix.include))
+ makefile.filter(r"^#(MPI_LIB_USR=).*", r"\1{0}".format(mpi.prefix.lib))
else:
makefile.filter(r"^(USE_MPI = ).*", r'\1"OFF"')
# Set path to C++ compiler.
@@ -70,8 +78,8 @@ class Liggghts(MakefilePackage):
if "+jpeg" in spec:
jpeg = spec["jpeg"]
makefile.filter(r"^(USE_JPG = ).*", r'\1"ON"')
- makefile.filter(r"^#(JPG_INC_USER=-I).*", r"\1{0}".format(jpeg.prefix.include))
- makefile.filter(r"^#(JPG_LIB_USER=-L).*", r"\1{0}".format(jpeg.prefix.lib))
+ makefile.filter(r"^#(JPG_INC_USR=-I).*", r"\1{0}".format(jpeg.prefix.include))
+ makefile.filter(r"^#(JPG_LIB_USR=-L).*", r"\1{0}".format(jpeg.prefix.lib))
if "+gzip" in spec:
makefile.filter(r"^(USE_GZIP = ).*", r'\1"ON"')