diff options
-rw-r--r-- | var/spack/repos/builtin/packages/diamond/fix_narrowing_error.patch | 18 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/diamond/package.py | 4 |
2 files changed, 22 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/diamond/fix_narrowing_error.patch b/var/spack/repos/builtin/packages/diamond/fix_narrowing_error.patch new file mode 100644 index 0000000000..597f245918 --- /dev/null +++ b/var/spack/repos/builtin/packages/diamond/fix_narrowing_error.patch @@ -0,0 +1,18 @@ +--- diamond-0.9.25/src/basic/score_matrix.cpp.org 2019-12-10 15:16:46.549126025 +0900 ++++ diamond-0.9.25/src/basic/score_matrix.cpp 2019-12-10 15:17:08.721466092 +0900 +@@ -36,7 +36,7 @@ + + const double INT2_MAX = std::numeric_limits<double>::max(); + +-const char DNA_scores[5 * 5] = { ++const signed char DNA_scores[5 * 5] = { + 2, -3, -3, -3, -3, + -3,2,-3,-3,-3, + -3,-3,2,-3,-3, +@@ -317,4 +317,4 @@ + constants[3] = lambda; + constants[4] = K; + constants_ = constants; +-} +\ No newline at end of file ++} diff --git a/var/spack/repos/builtin/packages/diamond/package.py b/var/spack/repos/builtin/packages/diamond/package.py index 2d52d22e23..7ca6c0d880 100644 --- a/var/spack/repos/builtin/packages/diamond/package.py +++ b/var/spack/repos/builtin/packages/diamond/package.py @@ -24,3 +24,7 @@ class Diamond(CMakePackage): version('0.8.26', sha256='00d2be32dad76511a767ab8e917962c0ecc572bc808080be60dec028df45439f') depends_on('zlib') + + # fix error [-Wc++11-narrowing] + # Ref: https://github.com/bbuchfink/diamond/commit/155e076d662b0e9268e2b00bef6d33d90aede7ff + patch('fix_narrowing_error.patch') |