diff options
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/cfitsio/package.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/cfitsio/package.py b/var/spack/repos/builtin/packages/cfitsio/package.py index 6853c33119..8c2ae95e8e 100644 --- a/var/spack/repos/builtin/packages/cfitsio/package.py +++ b/var/spack/repos/builtin/packages/cfitsio/package.py @@ -32,8 +32,31 @@ class Cfitsio(AutotoolsPackage): homepage = 'http://heasarc.gsfc.nasa.gov/fitsio/' + version('3.410', '8a4a66fcdd816aae41768baa0b025552') version('3.370', 'abebd2d02ba5b0503c633581e3bfa116') + variant('bzip2', default=True, description='Enable bzip2 support') + variant('shared', default=True, description='Build shared libraries') + + depends_on('bzip2', when='+bzip2') + def url_for_version(self, version): url = 'ftp://heasarc.gsfc.nasa.gov/software/fitsio/c/cfitsio{0}.tar.gz' return url.format(version.joined) + + def configure_args(self): + spec = self.spec + extra_args = [] + if '+bzip2' in spec: + extra_args.append('--with-bzip2=%s' % spec['bzip2'].prefix), + return extra_args + + @property + def build_targets(self): + targets = ['all'] + + # Build shared if variant is set. + if '+shared' in self.spec: + targets += ['shared'] + + return targets |