summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorlorddavidiii <maximillian.bensch@aei.mpg.de>2021-03-30 16:57:15 +0200
committerGitHub <noreply@github.com>2021-03-30 10:57:15 -0400
commit220c0d9cfcdf273a8f15daea8eae7541f1a9245f (patch)
tree5ef7065a21d1e6cc9140ad5c7e3ef91d81308d42 /var
parent1bd0964ed332039a4b19359096502c405c5a4738 (diff)
downloadspack-220c0d9cfcdf273a8f15daea8eae7541f1a9245f.tar.gz
spack-220c0d9cfcdf273a8f15daea8eae7541f1a9245f.tar.bz2
spack-220c0d9cfcdf273a8f15daea8eae7541f1a9245f.tar.xz
spack-220c0d9cfcdf273a8f15daea8eae7541f1a9245f.zip
cuda: add dev variant and ABI variant for ncurses (#22536)
* ncurses: add variant +abi5 for version 5 ABI * cuda: add variant dev, which makes cuda-gdb useable - cuda-gdb needs libncurses.so.5, which most distros doesn't have see also https://docs.nvidia.com/cuda/cuda-gdb/index.html#common-issues-oss
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/cuda/package.py5
-rw-r--r--var/spack/repos/builtin/packages/ncurses/package.py8
2 files changed, 13 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/cuda/package.py b/var/spack/repos/builtin/packages/cuda/package.py
index d09be224ef..330fea78c5 100644
--- a/var/spack/repos/builtin/packages/cuda/package.py
+++ b/var/spack/repos/builtin/packages/cuda/package.py
@@ -103,7 +103,12 @@ class Cuda(Package):
# Mojave support -- only macOS High Sierra 10.13 is supported.
conflicts('arch=darwin-mojave-x86_64')
+ variant('dev', default=False, description='Enable development dependencies, i.e to use cuda-gdb')
+
depends_on('libxml2', when='@10.1.243:')
+ # cuda-gdb needs libncurses.so.5
+ # see https://docs.nvidia.com/cuda/cuda-gdb/index.html#common-issues-oss
+ depends_on('ncurses abi=5', type='run', when='+dev')
provides('opencl@:1.2', when='@7:')
provides('opencl@:1.1', when='@:6')
diff --git a/var/spack/repos/builtin/packages/ncurses/package.py b/var/spack/repos/builtin/packages/ncurses/package.py
index bc6a97ac4a..1b359ce0e3 100644
--- a/var/spack/repos/builtin/packages/ncurses/package.py
+++ b/var/spack/repos/builtin/packages/ncurses/package.py
@@ -31,6 +31,10 @@ class Ncurses(AutotoolsPackage, GNUMirrorPackage):
variant('termlib', default=True,
description='Enables termlib features. This is an extra '
'lib and optional internal dependency.')
+ # Build ncurses with ABI compaitibility.
+ variant('abi', default='none', description='choose abi compatibility', values=('none', '5', '6'), multi=False)
+
+ conflicts('abi=6', when='@:5.9', msg='6 is not compatible with this release')
depends_on('pkgconfig', type='build')
@@ -108,6 +112,10 @@ class Ncurses(AutotoolsPackage, GNUMirrorPackage):
'--enable-tcap-names',
'--with-versioned-syms'))
+ abi = self.spec.variants['abi'].value
+ if abi != 'none':
+ opts.append('--with-abi-version=' + abi)
+
prefix = '--prefix={0}'.format(prefix)
configure = Executable('../configure')