diff options
Diffstat (limited to 'var/spack/repos/builtin/packages/kallisto/package.py')
-rw-r--r-- | var/spack/repos/builtin/packages/kallisto/package.py | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/kallisto/package.py b/var/spack/repos/builtin/packages/kallisto/package.py index 8a47df16d3..75a4e601d1 100644 --- a/var/spack/repos/builtin/packages/kallisto/package.py +++ b/var/spack/repos/builtin/packages/kallisto/package.py @@ -17,8 +17,15 @@ class Kallisto(CMakePackage): version('0.46.2', sha256='c447ca8ddc40fcbd7d877d7c868bc8b72807aa8823a8a8d659e19bdd515baaf2') version('0.43.1', sha256='7baef1b3b67bcf81dc7c604db2ef30f5520b48d532bf28ec26331cb60ce69400') + # HDF5 support is optional beginning with version 0.46.2. + variant('hdf5', + when='@0.46.2:', + default=False, + description='Build with HDF5 support') + depends_on('zlib') - depends_on('hdf5') + depends_on('hdf5', when='@:0.43') + depends_on('hdf5', when='+hdf5') # htslib isn't built in time to be used.... parallel = False @@ -30,6 +37,19 @@ class Kallisto(CMakePackage): depends_on('libtool', type='build', when='@0.44.0:') depends_on('m4', type='build', when='@0.44.0:') + patch('link_zlib.patch', when='@:0.43') + patch('limits.patch', when='@:0.46') + patch('htslib_configure.patch', when='@0.44.0:^autoconf@2.70:') + + @run_before('cmake') + def autoreconf(self): + # Versions of autoconf greater than 2.69 need config.guess and + # config.sub in the tree. + if self.spec.satisfies('@0.44.0:^autoconf@2.70:'): + with working_dir(join_path(self.stage.source_path, 'ext', 'htslib')): + autoreconf = which('autoreconf') + autoreconf('--install') + # Including '-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON' in the cmake args # causes bits of cmake's output to end up in the autoconf-generated # configure script. @@ -41,8 +61,10 @@ class Kallisto(CMakePackage): setting. """ a = super(Kallisto, self).std_cmake_args - if (self.spec.version >= Version('0.44.0')): + if self.spec.satisfies('@0.44.0:'): args = [i for i in a if i != '-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON'] + if self.spec.satisfies('@0.46.2:'): + args.append(self.define_from_variant('USE_HDF5', 'hdf5')) else: args = a |