ncurses: fix nvhpc, allow cmake+ncurses %nvhpc (#30162)

This commit is contained in:
Harmen Stoppels 2022-04-19 18:19:19 +02:00 committed by GitHub
parent fb5b78335b
commit 75638c1e88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 33 additions and 3 deletions

View File

@ -169,10 +169,9 @@ class Cmake(Package):
'please use %apple-clang or a newer CMake release. '
'See: https://gitlab.kitware.com/cmake/cmake/-/issues/21135')
# Seems like the vendored dependencies do not build with nvhpc, and linking with
# ncurses runs into issues.
# Vendored dependencies do not build with nvhpc; it's also more
# transparent to patch Spack's versions of CMake's dependencies.
conflicts('+ownlibs %nvhpc')
conflicts('+ncurses %nvhpc')
with when('~ownlibs'):
depends_on('curl')

View File

@ -0,0 +1,30 @@
From a2ae279d50514edca1f8d1fe74a59c4e77385567 Mon Sep 17 00:00:00 2001
From: Harmen Stoppels <harmenstoppels@gmail.com>
Date: Tue, 19 Apr 2022 13:24:48 +0200
Subject: [PATCH] MKlib_gen.sh: -P for nvhpc means "stop after preprocessing"
and outputs nothing
---
ncurses/base/MKlib_gen.sh | 6 ------
1 file changed, 6 deletions(-)
diff --git a/ncurses/base/MKlib_gen.sh b/ncurses/base/MKlib_gen.sh
index 5a3770e..f256546 100755
--- a/ncurses/base/MKlib_gen.sh
+++ b/ncurses/base/MKlib_gen.sh
@@ -77,12 +77,6 @@ PRG=`echo "$1" | $AWK '{ sub(/^[ ]*/,""); sub(/[ ].*$/, ""); print; }' || exit
FSF=`"$PRG" --version 2>/dev/null || exit 0 | fgrep "Free Software Foundation" | head -n 1`
ALL=`"$PRG" -dumpversion 2>/dev/null || exit 0`
ONE=`echo "$ALL" | sed -e 's/\..*$//'`
-if test -n "$FSF" && test -n "$ALL" && test -n "$ONE" ; then
- if test $ONE -ge 5 ; then
- echo ".. adding -P option to work around $PRG $ALL" >&2
- preprocessor="$preprocessor -P"
- fi
-fi
PID=$$
ED1=sed1_${PID}.sed
--
2.25.1

View File

@ -41,6 +41,7 @@ class Ncurses(AutotoolsPackage, GNUMirrorPackage):
patch('patch_gcc_5.txt', when='@6.0%gcc@5.0:')
patch('sed_pgi.patch', when='@:6.0')
patch('nvhpc_fix_preprocessor_flag.patch', when='@6.0:%nvhpc')
@classmethod
def determine_version(cls, exe):