libsharp: new package (#9530)
This commit is contained in:
parent
118f616b19
commit
ef11d27f7f
1 changed files with 61 additions and 0 deletions
61
var/spack/repos/builtin/packages/libsharp/package.py
Normal file
61
var/spack/repos/builtin/packages/libsharp/package.py
Normal file
|
@ -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'))
|
Loading…
Reference in a new issue