From 51fbd315e9869868c5c10891442e0aba2229ea09 Mon Sep 17 00:00:00 2001 From: George Hartzell Date: Mon, 31 Dec 2018 14:12:51 -0800 Subject: [PATCH] fastx-toolkit builds with newer gcc's (#10228) There's a missing break in a switch statement that newer gcc's dislike. Our #4696 simply disallowed newer gcc's. This fixes the problem instead. It's been [PR'ed upstream](https://github.com/agordon/fastx_toolkit/pull/22). Tested with gcc@5.5.0 and gcc@8.2.0 on CentOS. --- .../repos/builtin/packages/fastx-toolkit/package.py | 3 ++- .../repos/builtin/packages/fastx-toolkit/pr-22.patch | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 var/spack/repos/builtin/packages/fastx-toolkit/pr-22.patch diff --git a/var/spack/repos/builtin/packages/fastx-toolkit/package.py b/var/spack/repos/builtin/packages/fastx-toolkit/package.py index c1e74163d0..789006ea8b 100644 --- a/var/spack/repos/builtin/packages/fastx-toolkit/package.py +++ b/var/spack/repos/builtin/packages/fastx-toolkit/package.py @@ -17,4 +17,5 @@ class FastxToolkit(AutotoolsPackage): depends_on('libgtextutils') - conflicts('%gcc@7.1.0:') + # patch implicit fallthrough + patch("pr-22.patch") diff --git a/var/spack/repos/builtin/packages/fastx-toolkit/pr-22.patch b/var/spack/repos/builtin/packages/fastx-toolkit/pr-22.patch new file mode 100644 index 0000000000..75111f6986 --- /dev/null +++ b/var/spack/repos/builtin/packages/fastx-toolkit/pr-22.patch @@ -0,0 +1,11 @@ +diff -ur fastx_toolkit-0.0.14.orig/src/fasta_formatter/fasta_formatter.cpp fastx_toolkit-0.0.14/src/fasta_formatter/fasta_formatter.cpp +--- fastx_toolkit-0.0.14.orig/src/fasta_formatter/fasta_formatter.cpp 2014-01-05 13:10:49.000000000 -0800 ++++ fastx_toolkit-0.0.14/src/fasta_formatter/fasta_formatter.cpp 2018-12-31 09:58:21.923778569 -0800 +@@ -103,6 +103,7 @@ + switch(opt) { + case 'h': + usage(); ++ break; + + case 'i': + input_filename = optarg;