bowtie2: add constraints for the simde dependency (#24226)

This commit is contained in:
snehring 2021-06-17 02:52:27 -05:00 committed by GitHub
parent c8f58c5f1d
commit 7831d6be75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,7 +25,8 @@ class Bowtie2(MakefilePackage):
depends_on('perl', type='run')
depends_on('python', type='run')
depends_on('zlib', when='@2.3.1:')
depends_on('simde', type='link')
depends_on('simde', when='@2.4.0: target=aarch64:', type='link')
depends_on('simde', when='@2.4.0: target=ppc64le:', type='link')
patch('bowtie2-2.2.5.patch', when='@2.2.5', level=0)
patch('bowtie2-2.3.1.patch', when='@2.3.1', level=0)
@ -52,11 +53,13 @@ def edit(self, spec, prefix):
files = ['bowtie2-build', 'bowtie2-inspect']
filter_file(match, substitute, *files, **kwargs)
match = '-Ithird_party/simde'
simdepath = spec['simde'].prefix.include
substitute = "-I{simdepath}".format(simdepath=simdepath)
files = ['Makefile']
filter_file(match, substitute, *files, **kwargs)
if (self.spec.satisfies('@2.4.0:2.4.2 target=aarch64:') or
self.spec.satisfies('@2.4.0:2.4.2 target=ppc64le:')):
match = '-Ithird_party/simde'
simdepath = spec['simde'].prefix.include
substitute = "-I{simdepath}".format(simdepath=simdepath)
files = ['Makefile']
filter_file(match, substitute, *files, **kwargs)
@property
def build_targets(self):