summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/eckit/package.py8
1 files changed, 8 insertions, 0 deletions
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