summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Moxon <32072858+moxcodes@users.noreply.github.com>2018-10-16 11:24:42 -0700
committerPeter Scheibel <scheibel1@llnl.gov>2018-10-16 11:24:42 -0700
commitef11d27f7f12f3b2f424545a29a0d96bd59713a4 (patch)
tree4a16463b3f6335598a8ed41da1da6fffa07c018b
parent118f616b19afc95d260899b2e16c17ff74250014 (diff)
downloadspack-ef11d27f7f12f3b2f424545a29a0d96bd59713a4.tar.gz
spack-ef11d27f7f12f3b2f424545a29a0d96bd59713a4.tar.bz2
spack-ef11d27f7f12f3b2f424545a29a0d96bd59713a4.tar.xz
spack-ef11d27f7f12f3b2f424545a29a0d96bd59713a4.zip
libsharp: new package (#9530)
-rw-r--r--var/spack/repos/builtin/packages/libsharp/package.py61
1 files changed, 61 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/libsharp/package.py b/var/spack/repos/builtin/packages/libsharp/package.py
new file mode 100644
index 0000000000..54d7296400
--- /dev/null
+++ b/var/spack/repos/builtin/packages/libsharp/package.py
@@ -0,0 +1,61 @@
+##############################################################################
+# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/spack/spack
+# Please also see the NOTICE and LICENSE files for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+
+from spack import *
+
+
+class Libsharp(AutotoolsPackage):
+ """Libsharp is a code library for spherical harmonic transforms (SHTs) and
+ spin-weighted spherical harmonic transforms, which evolved from the libpsht
+ library."""
+
+ variant('openmp', default=True, description='Build with openmp support')
+ variant('mpi', default=True, description='Build with MPI support')
+
+ homepage = "https://github.com/Libsharp/libsharp"
+ git = "https://github.com/Libsharp/libsharp.git"
+
+ version('1.0.0', commit='cc4753ff4b0ef393f0d4ada41a175c6d1dd85d71')
+ version('2018-01-17', commit='593d4eba67d61827191c32fb94bf235cb31205e1')
+
+ depends_on('autoconf', type='build')
+ depends_on('mpi', when='+mpi')
+
+ def autoreconf(self, spec, prefix):
+ """Generate autotools configuration"""
+ bash = which('bash')
+ bash('autoconf')
+
+ def configure_args(self):
+ args = []
+ if '+openmp' not in self.spec:
+ args.append("--disable-openmp")
+ if '+mpi' not in self.spec:
+ args.append("--disable-mpi")
+ return args
+
+ def install(self, spec, prefix):
+ install_tree('auto/include', join_path(prefix, 'include'))
+ install_tree('auto/lib', join_path(prefix, 'lib'))