From 407834fffa9b9b247ecc4dee7888231079325b04 Mon Sep 17 00:00:00 2001 From: Mario Melara Date: Wed, 4 Sep 2019 08:06:35 -0700 Subject: cppflags point to ncurses headers (#12691) While debugging this package on our Cray machine, tmux was throwing an error involving the ncurses headers. Tmux would look for headers in system locations rather than where spack installed ncurses. Tested only on a Cray. --- var/spack/repos/builtin/packages/tmux/package.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/var/spack/repos/builtin/packages/tmux/package.py b/var/spack/repos/builtin/packages/tmux/package.py index 272cd5e317..b65a067d45 100644 --- a/var/spack/repos/builtin/packages/tmux/package.py +++ b/var/spack/repos/builtin/packages/tmux/package.py @@ -30,5 +30,10 @@ class Tmux(AutotoolsPackage): depends_on('libevent') depends_on('ncurses') + def flag_handler(self, name, flags): + if name == 'cppflags': + flags.append(self.spec['ncurses'].headers.include_flags) + return (None, flags, None) + def configure_args(self): return ['LIBTINFO_LIBS=-lncurses'] -- cgit v1.2.3-70-g09d2