summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornoguchi-k <55966120+noguchi-k@users.noreply.github.com>2019-12-12 03:07:21 +0900
committerAdam J. Stewart <ajstewart426@gmail.com>2019-12-11 12:07:21 -0600
commitb0a7c8487d2c017e08c2157ebf02991ad0cb5480 (patch)
tree15502aa7f0ce540583bb04a11f2e4a72ad7433aa
parentd4326038b938230d877367eb0920cf76439ae638 (diff)
downloadspack-b0a7c8487d2c017e08c2157ebf02991ad0cb5480.tar.gz
spack-b0a7c8487d2c017e08c2157ebf02991ad0cb5480.tar.bz2
spack-b0a7c8487d2c017e08c2157ebf02991ad0cb5480.tar.xz
spack-b0a7c8487d2c017e08c2157ebf02991ad0cb5480.zip
diamond: fix narrowing error. (#14064)
* diamond: fix narrowing error * diamond: fix patch * diamond: add link to the patch source
-rw-r--r--var/spack/repos/builtin/packages/diamond/fix_narrowing_error.patch18
-rw-r--r--var/spack/repos/builtin/packages/diamond/package.py4
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')