package : added a stub for AutotoolsPackage, examples in szip and swiftsim
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
import llnl.util.tty as tty
|
||||
|
||||
|
||||
class Swiftsim(Package):
|
||||
class Swiftsim(AutotoolsPackage):
|
||||
"""
|
||||
SPH With Inter-dependent Fine-grained Tasking (SWIFT) provides
|
||||
astrophysicists with a state of the art framework to perform
|
||||
@@ -59,19 +59,15 @@ def setup_environment(self, spack_env, run_env):
|
||||
tty.warn('This is needed to clone SWIFT repository')
|
||||
spack_env.set('GIT_SSL_NO_VERIFY', 1)
|
||||
|
||||
def install(self, spec, prefix):
|
||||
# Generate configure from configure.ac
|
||||
# and Makefile.am
|
||||
def autoreconf(self, spec, prefix):
|
||||
libtoolize()
|
||||
aclocal()
|
||||
autoconf()
|
||||
autogen = Executable('./autogen.sh')
|
||||
autogen()
|
||||
|
||||
# Configure and install
|
||||
options = ['--prefix=%s' % prefix,
|
||||
'--enable-mpi' if '+mpi' in spec else '--disable-mpi',
|
||||
'--enable-optimization']
|
||||
configure(*options)
|
||||
make()
|
||||
make("install")
|
||||
def config_args(self):
|
||||
return ['--prefix=%s' % prefix,
|
||||
'--enable-mpi' if '+mpi' in spec else '--disable-mpi',
|
||||
'--with-metis={0}'.format(self.spec['metis'].prefix),
|
||||
'--enable-optimization']
|
||||
|
@@ -24,26 +24,22 @@
|
||||
##############################################################################
|
||||
from spack import *
|
||||
|
||||
class Szip(Package):
|
||||
"""Szip is an implementation of the extended-Rice lossless compression algorithm.
|
||||
It provides lossless compression of scientific data, and is provided with HDF
|
||||
software products."""
|
||||
|
||||
class Szip(AutotoolsPackage):
|
||||
"""Szip is an implementation of the extended-Rice lossless
|
||||
compression algorithm.
|
||||
|
||||
It provides lossless compression of scientific data, and is
|
||||
provided with HDF software products.
|
||||
"""
|
||||
|
||||
homepage = "https://www.hdfgroup.org/doc_resource/SZIP/"
|
||||
url = "http://www.hdfgroup.org/ftp/lib-external/szip/2.1/src/szip-2.1.tar.gz"
|
||||
url = "http://www.hdfgroup.org/ftp/lib-external/szip/2.1/src/szip-2.1.tar.gz"
|
||||
|
||||
version('2.1', '902f831bcefb69c6b635374424acbead')
|
||||
|
||||
@Package.sanity_check('install')
|
||||
def always_raise(self):
|
||||
raise RuntimeError('Precondition not respected')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
configure('--prefix=%s' % prefix,
|
||||
'--enable-production',
|
||||
'--enable-shared',
|
||||
'--enable-static',
|
||||
'--enable-encoding')
|
||||
|
||||
make()
|
||||
make("install")
|
||||
def configure_args(self):
|
||||
return ['--enable-production',
|
||||
'--enable-shared',
|
||||
'--enable-static',
|
||||
'--enable-encoding']
|
||||
|
Reference in New Issue
Block a user