summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaryl W. Grunau <DarylGrunau@gmail.com>2018-12-20 16:23:38 -0700
committerAdam J. Stewart <ajstewart426@gmail.com>2018-12-20 17:23:38 -0600
commit36ab7be4067613da1a6513e5701ce98ea4fee1a2 (patch)
tree1902f6dfc40e7fe2b7427bd7d1e6688c8690046a
parente57ddda4cc339ef5fd3a68f01435684d24687ec2 (diff)
downloadspack-36ab7be4067613da1a6513e5701ce98ea4fee1a2.tar.gz
spack-36ab7be4067613da1a6513e5701ce98ea4fee1a2.tar.bz2
spack-36ab7be4067613da1a6513e5701ce98ea4fee1a2.tar.xz
spack-36ab7be4067613da1a6513e5701ce98ea4fee1a2.zip
R3D spackage (#10164)
* r3d spackage * address Adam's review comments * fix flake8: too many blank lines
-rw-r--r--var/spack/repos/builtin/packages/r3d/package.py49
1 files changed, 49 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/r3d/package.py b/var/spack/repos/builtin/packages/r3d/package.py
new file mode 100644
index 0000000000..c192efc7bd
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r3d/package.py
@@ -0,0 +1,49 @@
+# Copyright 2013-2018 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 R3d(MakefilePackage):
+ """Fast, robust polyhedral intersections, analytic integration, and
+ conservative voxelization."""
+
+ homepage = "https://github.com/devonmpowell/r3d"
+ url = "https://github.com/devonmpowell/r3d.git"
+
+ version('2018-12-19', git=url, commit='47308f68c782ed3227d3dab1eff24d41f6421f21')
+
+ variant("test", default=False, description="Build R3D regression tests")
+
+ def build(self, spec, prefix):
+
+ make_args = [
+ 'CC={0}'.format(spack_cc),
+ ]
+
+ make('libr3d.a', *make_args)
+
+ if '+test' in spec:
+ with working_dir('tests'):
+ make('all', *make_args)
+
+ def install(self, spec, prefix):
+
+ # R3D does not have an install target so create our own here.
+ mkdirp(prefix.include)
+ my_headers = find('.', '*.h', recursive=False)
+ for my_header in my_headers:
+ install(my_header, prefix.include)
+ mkdirp(prefix.lib)
+ install('libr3d.a', prefix.lib)
+
+ if '+test' in spec:
+ with working_dir('tests'):
+
+ # R3D does not have an install target so create our own here.
+ mkdirp(prefix.test)
+ install('r2d_unit_tests', prefix.test)
+ install('r3d_unit_tests', prefix.test)
+ install('rNd_unit_tests', prefix.test)