diff options
author | Erik Schnetter <schnetter@gmail.com> | 2017-01-20 13:28:07 -0500 |
---|---|---|
committer | becker33 <becker33@llnl.gov> | 2017-01-20 10:28:07 -0800 |
commit | adac3ebbf9fd764f27b7f63b85b3250226a08c0f (patch) | |
tree | 706c84d9b923cbade9611bc38064232df348c1dd | |
parent | 4e390e66892ebf72621ad14ea1a0699daf854083 (diff) | |
download | spack-adac3ebbf9fd764f27b7f63b85b3250226a08c0f.tar.gz spack-adac3ebbf9fd764f27b7f63b85b3250226a08c0f.tar.bz2 spack-adac3ebbf9fd764f27b7f63b85b3250226a08c0f.tar.xz spack-adac3ebbf9fd764f27b7f63b85b3250226a08c0f.zip |
cfitsio: Allow building as shared libraries (#2887)
* cfitsio: Allow building as shared libraries
- Allow building as shared libraries
- Also add optional bzip2 variant
- Also update to newest version
This requires the recent correction to “fix_darwin_install_name”.
* cfitsio: Simplify code, default to +shared
-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 |