summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authort-nojiri <68096132+t-nojiri@users.noreply.github.com>2020-08-05 02:11:52 +0900
committerGitHub <noreply@github.com>2020-08-04 12:11:52 -0500
commit8977f7377ac798a458928a574b60291e6cc5e5e6 (patch)
treeecab977558ac57fb069b1fd88418e9b9a4c4944a /var
parent9d2b60ac0c17db76c32ca30949e0649788c702cf (diff)
downloadspack-8977f7377ac798a458928a574b60291e6cc5e5e6.tar.gz
spack-8977f7377ac798a458928a574b60291e6cc5e5e6.tar.bz2
spack-8977f7377ac798a458928a574b60291e6cc5e5e6.tar.xz
spack-8977f7377ac798a458928a574b60291e6cc5e5e6.zip
abyss 2.1.4: fails to build with GCC 8 (#17614)
* abyss 2.1.4: fails to build with GCC 8 * abyss 2.1.4: fails to build with GCC 8 * abyss 2.1.4: Revise the points indicated by the review.
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/abyss/fix_BloomFilter.hpp.patch11
-rw-r--r--var/spack/repos/builtin/packages/abyss/package.py17
2 files changed, 25 insertions, 3 deletions
diff --git a/var/spack/repos/builtin/packages/abyss/fix_BloomFilter.hpp.patch b/var/spack/repos/builtin/packages/abyss/fix_BloomFilter.hpp.patch
new file mode 100644
index 0000000000..b648cb6122
--- /dev/null
+++ b/var/spack/repos/builtin/packages/abyss/fix_BloomFilter.hpp.patch
@@ -0,0 +1,11 @@
+--- spack-src/lib/bloomfilter/BloomFilter.hpp.org 2018-10-17 07:04:45.000000000 +0900
++++ spack-src/lib/bloomfilter/BloomFilter.hpp 2020-07-16 15:41:03.607766127 +0900
+@@ -230,7 +230,7 @@
+
+ void writeHeader(std::ostream& out) const {
+ FileHeader header;
+- strncpy(header.magic, "BlOOMFXX", 8);
++ memcpy(header.magic, "BlOOMFXX", 8);
+ char magic[9];
+ strncpy(magic, header.magic, 8);
+ magic[8] = '\0';
diff --git a/var/spack/repos/builtin/packages/abyss/package.py b/var/spack/repos/builtin/packages/abyss/package.py
index 339441392d..c7eddfd835 100644
--- a/var/spack/repos/builtin/packages/abyss/package.py
+++ b/var/spack/repos/builtin/packages/abyss/package.py
@@ -3,9 +3,19 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import numbers
from spack import *
+def is_multiple_32(x):
+ """multiple of 32 """
+ try:
+ return isinstance(int(x), numbers.Integral) and \
+ not isinstance(x, bool) and int(x) % 32 == 0
+ except ValueError:
+ return False
+
+
class Abyss(AutotoolsPackage):
"""ABySS is a de novo, parallel, paired-end sequence assembler
that is designed for short reads. The single-processor version
@@ -18,9 +28,8 @@ class Abyss(AutotoolsPackage):
version('2.0.2', sha256='d87b76edeac3a6fb48f24a1d63f243d8278a324c9a5eb29027b640f7089422df')
version('1.5.2', sha256='8a52387f963afb7b63db4c9b81c053ed83956ea0a3981edcad554a895adf84b1')
- variant('maxk', values=int, default=0,
- description='''set the maximum k-mer length.
- This value must be a multiple of 32''')
+ variant('maxk', default=128, values=is_multiple_32,
+ description='set the maximum k-mer length.')
depends_on('autoconf', type='build')
depends_on('automake', type='build')
@@ -48,3 +57,5 @@ class Abyss(AutotoolsPackage):
if self.spec['mpi'].name == 'mpich':
args.append('--enable-mpich')
return args
+
+ patch('fix_BloomFilter.hpp.patch', when='@2.0.0:2.1.4')