From 99043adf46d3e27fb10939c1365552844596345d Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Tue, 19 Jan 2021 11:38:06 +0200 Subject: gnu: freebayes: Don't include vcflib sources. * gnu/packages/bioinformatics.scm (freebayes)[native-inputs]: Remove vcflib-source, intervaltree-source. Move vcflib ... [inputs]: ... to here. [arguments]: Adjust 'patch-source and 'unpack-submodule-sources for changes in vendored code. * gnu/packages/patches/freebayes-devendor-deps.patch: Update patch. --- gnu/packages/bioinformatics.scm | 30 +++++++++--------------------- 1 file changed, 9 insertions(+), 21 deletions(-) (limited to 'gnu/packages/bioinformatics.scm') diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index 95352f948b..70166501d7 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -15138,6 +15138,7 @@ (define-public freebayes ("htslib" ,htslib) ("smithwaterman" ,smithwaterman) ("tabixpp" ,tabixpp) + ("vcflib" ,vcflib) ("zlib" ,zlib))) (native-inputs `(("bash-tap" ,bash-tap) @@ -15148,11 +15149,6 @@ (define-public freebayes ("pkg-config" ,pkg-config) ("samtools" ,samtools) ("simde" ,simde) - ;; We need some binaries from vcflib, but we also need to link against a - ;; subset of the library. Vendor the parts we need until we have a shared library. - ("vcflib" ,vcflib) - ("vcflib-src" ,(package-source vcflib)) - ("intervaltree-src" ,(package-source intervaltree)) ;; This submodule is needed to run the tests. ("test-simple-bash-src" ,(origin @@ -15179,25 +15175,17 @@ (define-public freebayes (substitute* "meson.build" ;; Some inputs aren't actually needed. ((".*bamtools/src.*") "") - ((".*multichoose.*") "") - (("'vcflib/filevercmp'") "")) + ((".*multichoose.*") "")) + (substitute* '("src/BedReader.cpp" + "src/BedReader.h") + (("../intervaltree/IntervalTree.h") "IntervalTree.h")) #t))) (add-after 'unpack 'unpack-submodule-sources (lambda* (#:key inputs #:allow-other-keys) - (let ((unpack (lambda (source target) - (unless (directory-exists? target) - (mkdir-p target)) - (with-directory-excursion target - (if (file-is-directory? (assoc-ref inputs source)) - (copy-recursively (assoc-ref inputs source) ".") - (invoke "tar" "xvf" - (assoc-ref inputs source) - "--strip-components=1")))))) - (and - (unpack "vcflib-src" "vcflib") - (unpack "intervaltree-src" "vcflib/intervaltree") - (unpack "test-simple-bash-src" "test/test-simple-bash")) - #t))) + (mkdir-p "test/test-simple-bash") + (copy-recursively (assoc-ref inputs "test-simple-bash-src") + "test/test-simple-bash") + #t)) ;; The slow tests take longer than the specified timeout. ,@(if (any (cute string=? <> (%current-system)) '("armhf-linux" "aarch64-linux")) -- cgit v1.2.3