summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@gmail.com>2021-08-26 18:03:49 -0400
committerGitHub <noreply@github.com>2021-08-26 15:03:49 -0700
commitb5f812cd32c2bc61b511e5a12228fdf413781d13 (patch)
treeee59e7c8e832bc7e5973d392c96edfe13280a6ba
parentabfd8fa70b54e5b9afe0f25abc4bddb4b9164ac1 (diff)
downloadspack-b5f812cd32c2bc61b511e5a12228fdf413781d13.tar.gz
spack-b5f812cd32c2bc61b511e5a12228fdf413781d13.tar.bz2
spack-b5f812cd32c2bc61b511e5a12228fdf413781d13.tar.xz
spack-b5f812cd32c2bc61b511e5a12228fdf413781d13.zip
New package: reprimand (#25364)
-rw-r--r--var/spack/repos/builtin/packages/reprimand/include.patch32
-rw-r--r--var/spack/repos/builtin/packages/reprimand/package.py57
2 files changed, 89 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/reprimand/include.patch b/var/spack/repos/builtin/packages/reprimand/include.patch
new file mode 100644
index 0000000000..11d390d154
--- /dev/null
+++ b/var/spack/repos/builtin/packages/reprimand/include.patch
@@ -0,0 +1,32 @@
+--- a/library/EOS_Barotropic/eos_barotr_poly.cc
++++ b/library/EOS_Barotropic/eos_barotr_poly.cc
+@@ -1,6 +1,7 @@
+ #include "eos_barotr_poly.h"
+ #include "eos_barotr_poly_impl.h"
+ #include <cmath>
++#include <limits>
+ #include <stdexcept>
+
+ using namespace std;
+--- a/library/EOS_Barotropic/eos_barotr_pwpoly.cc
++++ b/library/EOS_Barotropic/eos_barotr_pwpoly.cc
+@@ -1,6 +1,7 @@
+ #include "eos_barotr_pwpoly.h"
+ #include "eos_barotr_pwpoly_impl.h"
+-#include <stdexcept>
+-#include <cmath>
++#include <cmath>
++#include <limits>
++#include <stdexcept>
+
+ using namespace std;
+--- a/tests/benchmarks/src/accuracy_con2prim_mhd.cc
++++ b/tests/benchmarks/src/accuracy_con2prim_mhd.cc
+@@ -9,6 +9,7 @@
+ #include <fstream>
+ #include <iomanip>
+ #include <string>
++#include <limits>
+ #include "con2prim_imhd.h"
+ #include "eos_thermal_file.h"
+ #include "eos_hybrid.h"
diff --git a/var/spack/repos/builtin/packages/reprimand/package.py b/var/spack/repos/builtin/packages/reprimand/package.py
new file mode 100644
index 0000000000..d57c60b3e2
--- /dev/null
+++ b/var/spack/repos/builtin/packages/reprimand/package.py
@@ -0,0 +1,57 @@
+# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+from spack import *
+
+
+class Reprimand(MesonPackage):
+ """RePrimAnd is a support library for numerical simulations of general
+ relativistic magnetohydrodynamics. If provides methods for recovering
+ primitive variables like pressure and velocity from the variables evolved
+ in quasi-conservative formulations. Further, it provides a general
+ framework for handling matter equations of state."""
+
+ homepage = "https://www.atlas.aei.uni-hannover.de/holohome/wolfgang.kastaun/doc/reprimand/latest/index.html"
+ url = "https://github.com/wokast/RePrimAnd/archive/refs/tags/v1.3.tar.gz"
+
+ maintainers = ['eschnett']
+
+ version('develop', git='https://github.com/wokast/RePrimAnd', branch='public')
+ version('1.3', sha256='8e9f05b1f065a876d1405562285a9f64d1b31c4a436d5a6bb1f023212b40314e')
+
+ # Add missing #include statments; see
+ # <https://github.com/wokast/RePrimAnd/issues/3>
+ patch('include.patch', when='@1.3')
+
+ variant('python', default=False, description='Enable Python bindings')
+ variant('shared', default=True, description='Build shared library')
+
+ depends_on('boost')
+ depends_on('gsl')
+ depends_on('hdf5')
+ depends_on('python', when='+python')
+ depends_on('py-matplotlib', when='+python')
+ depends_on('py-pybind11 @2.6.0:', when='+python')
+
+ extends('python', when='+python')
+
+ def setup_build_environment(self, env):
+ env.set('CXXFLAGS', self.compiler.cxx11_flag)
+ env.set('BOOST_ROOT', self.spec['boost'].prefix)
+
+ def meson_args(self):
+ args = [
+ '-Dbuild_documentation=false',
+ '-Dbuild_python_api={0}'.format(
+ str('+python' in self.spec).lower()),
+ ]
+ return args
+
+ @property
+ def libs(self):
+ shared = "+shared" in self.spec
+ return find_libraries(
+ "libRePrimAnd*", root=self.prefix, shared=shared, recursive=True
+ )