guile package: Handling the threads option. (#13730)
* guile package: Handling the threads option. Currently guile by default tries to compile its thread variant. However, the threaded version can only be compiled if bdw-gc is compiled with some threads support. Currently, the default compilation of the bdw garbage collector is compiled without any thread support resulting in a compilation error. I have changed the the default guile compilation to the non-threaded version. I have also added the appropiated options for the bdw-gc compilation in case the user prefers the threaded variant. * guile package(flake8): fixed identation issues
This commit is contained in:
parent
c8c8dca5b5
commit
15207bae43
@ -24,20 +24,29 @@ class Guile(AutotoolsPackage):
|
||||
version('2.0.11', sha256='e6786c934346fa2e38e46d8d81a622bb1c16d130153523f6129fcd79ef1fb040')
|
||||
|
||||
variant('readline', default=True, description='Use the readline library')
|
||||
variant('threads', default=True, description='Use the thread interface')
|
||||
variant(
|
||||
'threads',
|
||||
default='none',
|
||||
values=('none', 'posix', 'dgux386'),
|
||||
multi=False,
|
||||
description='Use the thread interface'
|
||||
)
|
||||
|
||||
depends_on('bdw-gc@7.0: threads=none', when='threads=none')
|
||||
depends_on('bdw-gc@7.0: threads=posix', when='threads=posix')
|
||||
depends_on('bdw-gc@7.0: threads=dgux386', when='threads=dgux386')
|
||||
depends_on('gmp@4.2:')
|
||||
depends_on('gettext')
|
||||
depends_on('libtool@1.5.6:')
|
||||
depends_on('libunistring@0.9.3:')
|
||||
depends_on('bdw-gc@7.0:')
|
||||
depends_on('libffi')
|
||||
depends_on('readline', when='+readline')
|
||||
depends_on('pkgconfig', type='build')
|
||||
|
||||
build_directory = 'spack-build'
|
||||
|
||||
conflicts('+threads', when='%intel')
|
||||
conflicts('threads=posix', when='%intel')
|
||||
conflicts('threads=dgux386', when='%intel')
|
||||
|
||||
def configure_args(self):
|
||||
spec = self.spec
|
||||
@ -49,7 +58,11 @@ def configure_args(self):
|
||||
'--with-libgmp-prefix={0}'.format(spec['gmp'].prefix),
|
||||
'--with-libintl-prefix={0}'.format(spec['gettext'].prefix),
|
||||
]
|
||||
config_args += self.with_or_without('threads')
|
||||
|
||||
if 'threads=none' in spec:
|
||||
config_args.append('--without-threads')
|
||||
else:
|
||||
config_args.append('--with-threads')
|
||||
|
||||
if '+readline' in spec:
|
||||
config_args.append('--with-libreadline-prefix={0}'.format(
|
||||
|
Loading…
Reference in New Issue
Block a user