From 9558377f0fc5485b72082152843cb52e2e366f70 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 22 Sep 2020 11:25:54 -0500 Subject: [PATCH] Bash: fix build with Xcode 12 (#18843) --- .../repos/builtin/packages/bash/package.py | 4 +++- .../packages/bash/xcode12-strsignal-conf.patch | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 var/spack/repos/builtin/packages/bash/xcode12-strsignal-conf.patch diff --git a/var/spack/repos/builtin/packages/bash/package.py b/var/spack/repos/builtin/packages/bash/package.py index 1bdd11fe5ed..c3897bb60be 100644 --- a/var/spack/repos/builtin/packages/bash/package.py +++ b/var/spack/repos/builtin/packages/bash/package.py @@ -48,6 +48,8 @@ class Bash(AutotoolsPackage, GNUMirrorPackage): patch('https://ftpmirror.gnu.org/bash/bash-{0}-patches/bash{1}-{2}'.format(ver, ver.joined, num), level=0, when='@{0}'.format(ver), sha256=checksum) + patch('xcode12-strsignal-conf.patch', when='@:5.0 %apple-clang@12:') + executables = ['^bash$'] @classmethod @@ -60,7 +62,7 @@ def configure_args(self): spec = self.spec return [ - 'LIBS=-lncursesw', + 'LIBS=' + spec['ncurses'].libs.link_flags, '--with-curses', '--enable-readline', '--with-installed-readline', diff --git a/var/spack/repos/builtin/packages/bash/xcode12-strsignal-conf.patch b/var/spack/repos/builtin/packages/bash/xcode12-strsignal-conf.patch new file mode 100644 index 00000000000..4f5f5abfa01 --- /dev/null +++ b/var/spack/repos/builtin/packages/bash/xcode12-strsignal-conf.patch @@ -0,0 +1,18 @@ +--- a/configure 2019-01-02 08:43:31.000000000 -0600 ++++ b/configure 2020-09-21 10:40:42.000000000 -0500 +@@ -14568,6 +14568,7 @@ + /* end confdefs.h. */ + #include + #include ++#include + int + main () + { +@@ -14999,6 +15000,7 @@ + /* end confdefs.h. */ + + #include ++#include + + main() + {