Make boost minimal and composable (Original PR#22303) (#28623)

* Make boost composable

Currently Boost enables a few components through variants by default,
which means that if you want to use only what you need and no more, you
have to explicitly disable these variants, leading to concretization
errors whenever a second package explicitly needs those components.

For instance if package A only needs `+component_a` it might depend on
`boost +component_a ~component_b`. And if packge B only needs
`+component_b` it might depend on `boost ~component_a +component_b`. If
package C now depends on both A and B, this leads to unsatisfiable
variants and hence a concretization error.

However, if we default to disabling all components, package A can simply
depend on `boost +component_a` and package B on `boost +component_b` and
package C will concretize to depending on `boost +component_a
+component_b`, and whatever you install, you get the bare minimum.

* Fix style

* Added composable boost dependencies for folly

* fixing akantu merge issue

* hpctoolkit boost dependencies already defined

* Fix Styles

* Fixup style once more

* Adding isort fix

* isort one more time

* Fix for package audit issue

Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
Co-authored-by: Ryan O'Malley <rd.omalley@comcast.net>
This commit is contained in:
Abhik Sarkar
2022-03-17 16:42:07 -07:00
committed by GitHub
parent f8f4aafe81
commit 0ce8b9d398
190 changed files with 1117 additions and 104 deletions

View File

@@ -6,6 +6,7 @@
import os
from spack import *
from spack.pkg.builtin.boost import Boost
class Dealii(CMakePackage, CudaPackage):
@@ -150,6 +151,11 @@ class Dealii(CMakePackage, CudaPackage):
depends_on('boost cxxstd=14', when='cxxstd=14')
depends_on('boost cxxstd=17', when='cxxstd=17')
depends_on('bzip2', when='@:8')
# TODO: replace this with an explicit list of components of Boost,
# for instance depends_on('boost +filesystem')
# See https://github.com/spack/spack/pull/22303 for reference
depends_on(Boost.with_default_variants)
depends_on('lapack')
depends_on('ninja', type='build')
depends_on('suite-sparse')