From 3fff338844db7657f830879d10ae6d4941ccc5a3 Mon Sep 17 00:00:00 2001 From: Bernhard Kaindl <43588962+bernhardkaindl@users.noreply.github.com> Date: Mon, 4 Oct 2021 14:00:08 +0200 Subject: freebayes: Fix running the testsuite and add pkgconfig (#26440) freebayes needs the tools of the vcflib it includes to run tests --- .../repos/builtin/packages/freebayes/package.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'var') 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') -- cgit v1.2.3-70-g09d2