summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Kosukhin <sergey.kosukhin@mpimet.mpg.de>2022-11-07 20:54:36 +0100
committerGitHub <noreply@github.com>2022-11-07 12:54:36 -0700
commit01a578851707281b8e1da736086b41e98bfbe5f4 (patch)
tree7ce004811e1b9c48199290fda36de2d2134d323a
parentcc84ab1e921754a4b3d2cf668e3e99bfc3487549 (diff)
downloadspack-01a578851707281b8e1da736086b41e98bfbe5f4.tar.gz
spack-01a578851707281b8e1da736086b41e98bfbe5f4.tar.bz2
spack-01a578851707281b8e1da736086b41e98bfbe5f4.tar.xz
spack-01a578851707281b8e1da736086b41e98bfbe5f4.zip
eckit: fix underlinking (#33739)
-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