diff options
author | Harmen Stoppels <harmenstoppels@gmail.com> | 2021-04-06 09:00:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-06 09:00:22 +0200 |
commit | eb6f4c740b2532c24de39e3e0b8136bf777728a6 (patch) | |
tree | 11f4d1d60242f05c0a135ccffb12837cbcc8a8e4 | |
parent | 6e48e29c756a87ffdc121b0dc8d90357e3039629 (diff) | |
download | spack-eb6f4c740b2532c24de39e3e0b8136bf777728a6.tar.gz spack-eb6f4c740b2532c24de39e3e0b8136bf777728a6.tar.bz2 spack-eb6f4c740b2532c24de39e3e0b8136bf777728a6.tar.xz spack-eb6f4c740b2532c24de39e3e0b8136bf777728a6.zip |
Add patch for latest hwloc@:1 to locate ncurses (#22776)
* Add patch for latest hwloc@:1 to locate ncurses
This way we don't have to depend on ncurses~termlib, which may run into
issues when another package explicitly depends on ncurses+termlib
* Move termcap to the back, cause it's a system symlink on macos and isn't set by spack
-rw-r--r-- | var/spack/repos/builtin/packages/hwloc/0001-Try-linking-to-libtinfo.patch | 25 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/hwloc/package.py | 13 |
2 files changed, 36 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/hwloc/0001-Try-linking-to-libtinfo.patch b/var/spack/repos/builtin/packages/hwloc/0001-Try-linking-to-libtinfo.patch new file mode 100644 index 0000000000..59fb856118 --- /dev/null +++ b/var/spack/repos/builtin/packages/hwloc/0001-Try-linking-to-libtinfo.patch @@ -0,0 +1,25 @@ +From 0847b85eb65f7648f9104ae1e69e0c657d836031 Mon Sep 17 00:00:00 2001 +From: Harmen Stoppels <harmenstoppels@gmail.com> +Date: Mon, 5 Apr 2021 12:51:38 +0200 +Subject: [PATCH] Try linking to libtinfo + +--- + configure | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure b/configure +index b775477..fb89d30 100755 +--- a/configure ++++ b/configure +@@ -16811,7 +16811,7 @@ done + chosen_curses="" + for curses in ncurses curses + do +- for lib in "" -ltermcap -l${curses}w -l$curses ++ for lib in "" -l${curses}w -l$curses -ltinfo -ltermcap + do + { $as_echo "$as_me:${as_lineno-$LINENO}: checking termcap support using $curses and $lib" >&5 + $as_echo_n "checking termcap support using $curses and $lib... " >&6; } +-- +2.31.1 + diff --git a/var/spack/repos/builtin/packages/hwloc/package.py b/var/spack/repos/builtin/packages/hwloc/package.py index fcfb3ac64c..35abfd97c3 100644 --- a/var/spack/repos/builtin/packages/hwloc/package.py +++ b/var/spack/repos/builtin/packages/hwloc/package.py @@ -90,10 +90,19 @@ class Hwloc(AutotoolsPackage): depends_on('libxml2', when='+libxml2') depends_on('cairo', when='+cairo') depends_on('numactl', when='@:1.11.11 platform=linux') + depends_on('ncurses') + # Before 2.2 hwloc does not consider linking to libtinfo + # to detect ncurses, which is considered a bug. + # For older versions this can be fixed by depending on + # ncurses~termlib, but this could lead to insatisfiable + # constraints (e.g. llvm explicitly depends on ncurses+termlib) + # Therefore we patch the latest 1.x configure script to make + # it consider libtinfo too. # see https://github.com/open-mpi/hwloc/pull/417 - depends_on('ncurses ~termlib', when='@:2.2') - depends_on('ncurses') + patch('0001-Try-linking-to-libtinfo.patch', when='@1.11.13') + depends_on('ncurses ~termlib', when='@2.0:2.2') + depends_on('ncurses ~termlib', when='@1.0:1.11.12') # When mpi=openmpi, this introduces an unresolvable dependency. # See https://github.com/spack/spack/issues/15836 for details |