diff options
author | Bernhard Kaindl <43588962+bernhardkaindl@users.noreply.github.com> | 2021-10-04 14:00:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-04 14:00:08 +0200 |
commit | 3fff338844db7657f830879d10ae6d4941ccc5a3 (patch) | |
tree | fc09c4431b946ee5a381cb9a239c618a8795e67e /var/spack | |
parent | 225927c1c3e087e420fa232c32e171129b17f500 (diff) | |
download | spack-3fff338844db7657f830879d10ae6d4941ccc5a3.tar.gz spack-3fff338844db7657f830879d10ae6d4941ccc5a3.tar.bz2 spack-3fff338844db7657f830879d10ae6d4941ccc5a3.tar.xz spack-3fff338844db7657f830879d10ae6d4941ccc5a3.zip |
freebayes: Fix running the testsuite and add pkgconfig (#26440)
freebayes needs the tools of the vcflib it includes to run tests
Diffstat (limited to 'var/spack')
-rw-r--r-- | var/spack/repos/builtin/packages/freebayes/package.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/freebayes/package.py b/var/spack/repos/builtin/packages/freebayes/package.py index 471554e32f..6c96d19a70 100644 --- a/var/spack/repos/builtin/packages/freebayes/package.py +++ b/var/spack/repos/builtin/packages/freebayes/package.py @@ -23,6 +23,7 @@ class Freebayes(MesonPackage): # Deps for @1.3.5 and beyond depends_on('ninja', type='build', when='@1.3.5:') + depends_on('pkgconfig', type='build', when='@1.3.5:') depends_on('htslib', when='@1.3.5:') depends_on('zlib', when='@1.3.5:') depends_on('xz', when='@1.3.5:') @@ -56,3 +57,22 @@ class Freebayes(MesonPackage): @when('@:1.1.0') def install(self, spec, prefix): make('install') + + @property + def vcflib_builddir(self): + return join_path(self.build_directory, 'vcflib') + + @when('@1.3.4:') + def setup_build_environment(self, env): + if self.run_tests: + env.prepend_path('PATH', self.vcflib_builddir) + env.prepend_path('PATH', self.build_directory) + + @when('@1.3.4:') + def check(self): + mkdir(self.vcflib_builddir) + with working_dir(self.vcflib_builddir): + cmake('../../vcflib') + make() + with working_dir(self.build_directory): + ninja('test') |