diff --git a/var/spack/repos/builtin/packages/augustus/package.py b/var/spack/repos/builtin/packages/augustus/package.py index b7686796b5..59893e532b 100644 --- a/var/spack/repos/builtin/packages/augustus/package.py +++ b/var/spack/repos/builtin/packages/augustus/package.py @@ -49,18 +49,28 @@ def edit(self, spec, prefix): 'bamtools'].prefix) makefile.filter('INCLUDES = *', 'INCLUDES = -I$(BAMTOOLS)/include/bamtools ') - makefile.filter('LIBS = -lbamtools -lz', - 'LIBS = $(BAMTOOLS)/lib64/' - '/libbamtools.a -lz') + if 'bamtools@2.5:' in spec: + makefile.filter('LIBS = -lbamtools -lz', + 'LIBS = $(BAMTOOLS)/lib64/' + '/libbamtools.a -lz') + if 'bamtools@:2.4' in spec: + makefile.filter('LIBS = -lbamtools -lz', + 'LIBS = $(BAMTOOLS)/lib/bamtools' + '/libbamtools.a -lz') with working_dir(join_path('auxprogs', 'bam2hints')): makefile = FileFilter('Makefile') makefile.filter('# Variable definition', 'BAMTOOLS = %s' % self.spec['bamtools'].prefix) makefile.filter('INCLUDES = /usr/include/bamtools', 'INCLUDES = $(BAMTOOLS)/include/bamtools') - makefile.filter('LIBS = -lbamtools -lz', - 'LIBS = $(BAMTOOLS)/lib64/' - '/libbamtools.a -lz') + if 'bamtools@2.5:' in spec: + makefile.filter('LIBS = -lbamtools -lz', + 'LIBS = $(BAMTOOLS)/lib64/' + '/libbamtools.a -lz') + if 'bamtools@:2.4' in spec: + makefile.filter('LIBS = -lbamtools -lz', + 'LIBS = $(BAMTOOLS)/lib/bamtools' + '/libbamtools.a -lz') def install(self, spec, prefix): install_tree('bin', join_path(self.spec.prefix, 'bin'))