updates to matio package (#2243)
* updates to matio package - update to a AutoTools package - add variants for hdf5 and zlib - add latest version * fix flake8 error
This commit is contained in:
parent
f01b9797d7
commit
472ad39db3
1 changed files with 17 additions and 6 deletions
|
@ -25,15 +25,26 @@
|
||||||
from spack import *
|
from spack import *
|
||||||
|
|
||||||
|
|
||||||
class Matio(Package):
|
class Matio(AutotoolsPackage):
|
||||||
"""matio is an C library for reading and writing Matlab MAT files"""
|
"""matio is an C library for reading and writing Matlab MAT files"""
|
||||||
homepage = "http://sourceforge.net/projects/matio/"
|
homepage = "http://sourceforge.net/projects/matio/"
|
||||||
url = "http://downloads.sourceforge.net/project/matio/matio/1.5.2/matio-1.5.2.tar.gz"
|
url = "http://downloads.sourceforge.net/project/matio/matio/1.5.9/matio-1.5.9.tar.gz"
|
||||||
|
|
||||||
|
version('1.5.9', 'aab5b4219a3c0262afe7eeb7bdd2f463')
|
||||||
version('1.5.2', '85b007b99916c63791f28398f6a4c6f1')
|
version('1.5.2', '85b007b99916c63791f28398f6a4c6f1')
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
variant("zlib", default=True,
|
||||||
configure('--prefix=%s' % prefix)
|
description='support for compressed mat files')
|
||||||
|
variant("hdf5", default=True,
|
||||||
|
description='support for version 7.3 mat files via hdf5')
|
||||||
|
|
||||||
make()
|
depends_on("zlib", when="+zlib")
|
||||||
make("install")
|
depends_on("hdf5", when="+hdf5")
|
||||||
|
|
||||||
|
def configure_args(self):
|
||||||
|
args = []
|
||||||
|
if '+zlib' in self.spec:
|
||||||
|
args.append("--with-zlib=%s" % self.spec['zlib'].prefix)
|
||||||
|
if '+hdf5' in self.spec:
|
||||||
|
args.append("--with-hdf5=%s" % self.spec['hdf5'].prefix)
|
||||||
|
return args
|
||||||
|
|
Loading…
Reference in a new issue