From 889e83a9b5fa88046e9d4327f4f6e66f1bdadb51 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Wed, 17 Mar 2021 11:22:21 +0100 Subject: boost: fix unicode bugs in Boost recipe (#22301) --- var/spack/repos/builtin/packages/boost/package.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py index bb45fda9a3..7aca0e8b8e 100644 --- a/var/spack/repos/builtin/packages/boost/package.py +++ b/var/spack/repos/builtin/packages/boost/package.py @@ -159,7 +159,13 @@ class Boost(Package): description='Default symbol visibility in compiled libraries ' '(1.69.0 or later)') + # Unicode support depends_on('icu4c', when='+icu') + depends_on('icu4c cxxstd=11', when='+icu cxxstd=11') + depends_on('icu4c cxxstd=14', when='+icu cxxstd=14') + depends_on('icu4c cxxstd=17', when='+icu cxxstd=17') + conflicts('cxxstd=98', when='+icu') # Requires c++11 at least + depends_on('python', when='+python') depends_on('mpi', when='+mpi') depends_on('bzip2', when='+iostreams') @@ -331,6 +337,11 @@ class Boost(Package): if '+python' in spec: options.append('--with-python=%s' % spec['python'].command.path) + if '+icu' in spec: + options.append('--with-icu') + else: + options.append('--without-icu') + with open('user-config.jam', 'w') as f: # Boost may end up using gcc even though clang+gfortran is set in # compilers.yaml. Make sure this does not happen: @@ -366,8 +377,10 @@ class Boost(Package): else: options.append('variant=release') - if '+icu_support' in spec: - options.extend(['-s', 'ICU_PATH=%s' % spec['icu'].prefix]) + if '+icu' in spec: + options.extend(['-s', 'ICU_PATH=%s' % spec['icu4c'].prefix]) + else: + options.append('--disable-icu') if '+iostreams' in spec: options.extend([ -- cgit v1.2.3-60-g2f50