gnu: metabat: Update to 2.11.1.
* gnu/packages/bioinformatics.scm (metabat): Update to 2.11.1. [source]: Add patch to fix compilation. [arguments]: Adjust regular expressions modifying 'SConstruct'. * gnu/packages/patches/metabat-fix-compilation.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it.master
parent
897ab082b2
commit
f3f68a442c
|
@ -840,6 +840,7 @@ dist_patch_DATA = \
|
||||||
%D%/packages/patches/mesa-skip-disk-cache-test.patch \
|
%D%/packages/patches/mesa-skip-disk-cache-test.patch \
|
||||||
%D%/packages/patches/mesa-wayland-egl-symbols-check-mips.patch \
|
%D%/packages/patches/mesa-wayland-egl-symbols-check-mips.patch \
|
||||||
%D%/packages/patches/metabat-remove-compilation-date.patch \
|
%D%/packages/patches/metabat-remove-compilation-date.patch \
|
||||||
|
%D%/packages/patches/metabat-fix-compilation.patch \
|
||||||
%D%/packages/patches/mhash-keygen-test-segfault.patch \
|
%D%/packages/patches/mhash-keygen-test-segfault.patch \
|
||||||
%D%/packages/patches/mingw-w64-5.0rc2-gcc-4.9.3.patch \
|
%D%/packages/patches/mingw-w64-5.0rc2-gcc-4.9.3.patch \
|
||||||
%D%/packages/patches/mpc123-initialize-ao.patch \
|
%D%/packages/patches/mpc123-initialize-ao.patch \
|
||||||
|
|
|
@ -3467,23 +3467,20 @@ form of assemblies or reads.")
|
||||||
license:cpl1.0)))) ; Open Bloom Filter
|
license:cpl1.0)))) ; Open Bloom Filter
|
||||||
|
|
||||||
(define-public metabat
|
(define-public metabat
|
||||||
;; We package from a git commit because compilation of the released version
|
(package
|
||||||
;; fails.
|
(name "metabat")
|
||||||
(let ((commit "cbdca756993e66ae57e50a27970595dda9cbde1b"))
|
(version "2.11.1")
|
||||||
(package
|
(source
|
||||||
(name "metabat")
|
(origin
|
||||||
(version (string-append "0.32.4-1." (string-take commit 8)))
|
(method url-fetch)
|
||||||
(source
|
(uri (string-append "https://bitbucket.org/berkeleylab/metabat/get/v"
|
||||||
(origin
|
version ".tar.gz"))
|
||||||
(method git-fetch)
|
(file-name (string-append name "-" version ".tar.gz"))
|
||||||
(uri (git-reference
|
(sha256
|
||||||
(url "https://bitbucket.org/berkeleylab/metabat.git")
|
(base32
|
||||||
(commit commit)))
|
"0ll00l81aflscgggs5nfhj12cbvdiz3gg7f7n5f537a3xhx60vn9"))
|
||||||
(file-name (string-append name "-" version))
|
(patches (search-patches "metabat-remove-compilation-date.patch"
|
||||||
(sha256
|
"metabat-fix-compilation.patch"))))
|
||||||
(base32
|
|
||||||
"0byia8nsip6zvc4ha0qkxkxxyjf4x7jcvy48q2dvb0pzr989syzr"))
|
|
||||||
(patches (search-patches "metabat-remove-compilation-date.patch"))))
|
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:phases
|
`(#:phases
|
||||||
|
@ -3500,35 +3497,35 @@ form of assemblies or reads.")
|
||||||
"#include \"htslib/kseq.h\""))
|
"#include \"htslib/kseq.h\""))
|
||||||
#t))
|
#t))
|
||||||
(add-after 'unpack 'fix-scons
|
(add-after 'unpack 'fix-scons
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
(substitute* "SConstruct"
|
(substitute* "SConstruct"
|
||||||
(("^htslib_dir = 'samtools'")
|
(("^htslib_dir += 'samtools'")
|
||||||
(string-append "hitslib_dir = '"
|
(string-append "htslib_dir = '"
|
||||||
(assoc-ref inputs "htslib")
|
(assoc-ref inputs "htslib")
|
||||||
"'"))
|
"'"))
|
||||||
(("^samtools_dir = 'samtools'")
|
(("^samtools_dir = 'samtools'")
|
||||||
(string-append "samtools_dir = '"
|
(string-append "samtools_dir = '"
|
||||||
(assoc-ref inputs "htslib")
|
(assoc-ref inputs "samtools")
|
||||||
"'"))
|
"'"))
|
||||||
(("^findStaticOrShared\\('bam', hts_lib")
|
(("^findStaticOrShared\\('bam', hts_lib")
|
||||||
(string-append "findStaticOrShared('bam', '"
|
(string-append "findStaticOrShared('bam', '"
|
||||||
(assoc-ref inputs "samtools")
|
(assoc-ref inputs "samtools")
|
||||||
"/lib'"))
|
"/lib'"))
|
||||||
;; Do not distribute README.
|
;; Do not distribute README.
|
||||||
(("^env\\.Install\\(idir_prefix, 'README\\.md'\\)") ""))
|
(("^env\\.Install\\(idir_prefix, 'README\\.md'\\)") ""))
|
||||||
#t))
|
#t))
|
||||||
(delete 'configure)
|
(delete 'configure)
|
||||||
(replace 'build
|
(replace 'build
|
||||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||||
(mkdir (assoc-ref outputs "out"))
|
(mkdir (assoc-ref outputs "out"))
|
||||||
(zero? (system* "scons"
|
(zero? (system* "scons"
|
||||||
(string-append
|
(string-append
|
||||||
"PREFIX="
|
"PREFIX="
|
||||||
(assoc-ref outputs "out"))
|
(assoc-ref outputs "out"))
|
||||||
(string-append
|
(string-append
|
||||||
"BOOST_ROOT="
|
"BOOST_ROOT="
|
||||||
(assoc-ref inputs "boost"))
|
(assoc-ref inputs "boost"))
|
||||||
"install"))))
|
"install"))))
|
||||||
;; Check and install are carried out during build phase.
|
;; Check and install are carried out during build phase.
|
||||||
(delete 'check)
|
(delete 'check)
|
||||||
(delete 'install))))
|
(delete 'install))))
|
||||||
|
@ -3549,8 +3546,8 @@ sequences to deconvolute complex microbial communities, or metagenome binning,
|
||||||
enables the study of individual organisms and their interactions. MetaBAT is
|
enables the study of individual organisms and their interactions. MetaBAT is
|
||||||
an automated metagenome binning software, which integrates empirical
|
an automated metagenome binning software, which integrates empirical
|
||||||
probabilistic distances of genome abundance and tetranucleotide frequency.")
|
probabilistic distances of genome abundance and tetranucleotide frequency.")
|
||||||
(license (license:non-copyleft "file://license.txt"
|
(license (license:non-copyleft "file://license.txt"
|
||||||
"See license.txt in the distribution.")))))
|
"See license.txt in the distribution."))))
|
||||||
|
|
||||||
(define-public minced
|
(define-public minced
|
||||||
(package
|
(package
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
This patch changes metabat so that (1) it is not build statically, (2) it uses
|
||||||
|
shared libraries rather than static libraries where possible.
|
||||||
|
|
||||||
|
diff --git a/SConstruct b/SConstruct
|
||||||
|
index 69cdc0a..ac99bcb 100644
|
||||||
|
--- a/SConstruct
|
||||||
|
+++ b/SConstruct
|
||||||
|
@@ -26,8 +26,6 @@ debug = ARGUMENTS.get('DEBUG', None)
|
||||||
|
build_flags = ['-Wall', '-g', '-std=c++11', '-fopenmp']
|
||||||
|
link_flags = ['-lstdc++', '-lm', '-fopenmp']
|
||||||
|
|
||||||
|
-if platform.platform(True, True).find('Darwin') == -1:
|
||||||
|
- link_flags.extend(['-static', '-static-libgcc', '-static-libstdc++'])
|
||||||
|
|
||||||
|
if debug is None:
|
||||||
|
build_flags.extend(['-O3', '-DNDEBUG', '-Wno-unknown-pragmas', '-Wno-deprecated-declarations', '-Wno-overflow', '-Wno-unused-variable'])
|
||||||
|
@@ -110,17 +108,17 @@ def findStaticOrShared( lib, testPaths, static_source_list, link_flag_list, stat
|
||||||
|
for path in testPaths:
|
||||||
|
if not os.path.isdir(path):
|
||||||
|
continue
|
||||||
|
+ for testfile in ('%s/lib%s.so' % (path, lib), '%s/lib%s.dylib' % (path, lib)):
|
||||||
|
+ if os.path.isfile(testfile):
|
||||||
|
+ print "Found shared library %s as %s" % (lib, testfile)
|
||||||
|
+ link_flag_list.extend( ["-L%s" % (path), "-l%s" % (lib) ] )
|
||||||
|
+ return
|
||||||
|
for suffix in staticSuffixes:
|
||||||
|
testfile = '%s/lib%s%s' % (path, lib, suffix)
|
||||||
|
if os.path.isfile(testfile):
|
||||||
|
static_source_list.append(testfile)
|
||||||
|
print "Found static library %s as %s" % (lib, testfile)
|
||||||
|
return
|
||||||
|
- for testfile in ('%s/lib%s.so' % (path, lib), '%s/lib%s.dylib' % (path, lib)):
|
||||||
|
- if os.path.isfile(testfile):
|
||||||
|
- print "Found shared library %s as %s" % (lib, testfile)
|
||||||
|
- link_flag_list.extend( ["-L%s" % (path), "-l%s" % (lib) ] )
|
||||||
|
- return
|
||||||
|
print "Could not find library for %s!!! Looked in %s" % (lib, testPaths)
|
||||||
|
return
|
||||||
|
|
Reference in New Issue