Add patch to allow ncurses to be built with PGI (#3135)

This commit is contained in:
Adam J. Stewart 2017-02-17 13:39:05 -06:00 committed by Todd Gamblin
parent 163bdfde93
commit 4f60011121
2 changed files with 30 additions and 22 deletions

View file

@ -25,14 +25,12 @@
from spack import * from spack import *
class Ncurses(Package): class Ncurses(AutotoolsPackage):
"""The ncurses (new curses) library is a free software emulation of """The ncurses (new curses) library is a free software emulation of
curses in System V Release 4.0, and more. It uses terminfo format, curses in System V Release 4.0, and more. It uses terminfo format,
supports pads and color and multiple highlights and forms supports pads and color and multiple highlights and forms
characters and function-key mapping, and has all the other characters and function-key mapping, and has all the other
SYSV-curses enhancements over BSD curses. SYSV-curses enhancements over BSD curses."""
"""
homepage = "http://invisible-island.net/ncurses/ncurses.html" homepage = "http://invisible-island.net/ncurses/ncurses.html"
url = "http://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.0.tar.gz" url = "http://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.0.tar.gz"
@ -40,20 +38,19 @@ class Ncurses(Package):
version('6.0', 'ee13d052e1ead260d7c28071f46eefb1') version('6.0', 'ee13d052e1ead260d7c28071f46eefb1')
version('5.9', '8cb9c412e5f2d96bc6f459aa8c6282a1') version('5.9', '8cb9c412e5f2d96bc6f459aa8c6282a1')
patch('patch_gcc_5.txt', when='%gcc@5.0:') patch('patch_gcc_5.txt', when='@6.0%gcc@5.0:')
patch('sed_pgi.patch', when='@:6.0')
def install(self, spec, prefix): def configure_args(self):
opts = [ return [
"--prefix=%s" % prefix, 'CFLAGS={0}'.format(self.compiler.pic_flag),
"--with-shared", 'CXXFLAGS={0}'.format(self.compiler.pic_flag),
"--with-cxx-shared", '--with-shared',
"--enable-widec", '--with-cxx-shared',
"--enable-overwrite", '--enable-widec',
"--disable-lib-suffixes", '--enable-overwrite',
"--without-ada", '--disable-lib-suffixes',
"--enable-pc-files", '--without-ada',
"--with-pkg-config-libdir={0}/lib/pkgconfig".format(prefix) '--enable-pc-files',
'--with-pkg-config-libdir={0}/lib/pkgconfig'.format(self.prefix)
] ]
configure(*opts)
make()
make("install")

View file

@ -0,0 +1,11 @@
--- a/ncurses/tty/MKexpanded.sh 2017-02-12 09:09:33.828954282 -0600
+++ b/ncurses/tty/MKexpanded.sh 2017-02-12 09:11:03.430673306 -0600
@@ -125,7 +125,7 @@
EOF
$preprocessor $TMP 2>/dev/null | \
- sed -e '1,/^IGNORE$/d' -e 's/^@/#/' -e 's/^#if_/#if /'
+ sed -e '1,/^IGNORE$/d' -e 's/^@/#/' -e 's/^#[ ]*if_/#if /'
cat <<EOF
#else /* ! NCURSES_EXPANDED */