From 01a578851707281b8e1da736086b41e98bfbe5f4 Mon Sep 17 00:00:00 2001 From: Sergey Kosukhin Date: Mon, 7 Nov 2022 20:54:36 +0100 Subject: eckit: fix underlinking (#33739) --- var/spack/repos/builtin/packages/eckit/package.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/var/spack/repos/builtin/packages/eckit/package.py b/var/spack/repos/builtin/packages/eckit/package.py index 52849a831c..6a6a31c142 100644 --- a/var/spack/repos/builtin/packages/eckit/package.py +++ b/var/spack/repos/builtin/packages/eckit/package.py @@ -137,4 +137,12 @@ class Eckit(CMakePackage): # (the LAPACK backend is still built though): args.append(self.define("ENABLE_LAPACK", "linalg=lapack" in self.spec)) + if "+admin" in self.spec and "+termlib" in self.spec["ncurses"]: + # Make sure that libeckit_cmd is linked to a library that resolves 'setupterm', + # 'tputs', etc. That is either libncurses (when 'ncurses~termlib') or libtinfo (when + # 'ncurses+termlib'). CMake considers the latter only if CURSES_NEED_NCURSES is set to + # TRUE. Note that the installation of eckit does not fail without this but the building + # of a dependent package (e.g. fdb) might fail due to the undefined references. + args.append(self.define("CURSES_NEED_NCURSES", True)) + return args -- cgit v1.2.3-70-g09d2