Skip to content

Commit c627e5a

Browse files
mwkrenteladamjstewart
authored andcommitted
intel-tbb: fix and cleanup patch version ranges (#14053)
Recent commit e9ee9ea (#13989) fixed testing version ranges inside patch when clauses. Previously, it was necessary to write all revs individually for packages with multiple length version numbers (2019 and 2019.1). This fixes the build for the old 2017.* versions.
1 parent 0592c58 commit c627e5a

1 file changed

Lines changed: 11 additions & 16 deletions

File tree

  • var/spack/repos/builtin/packages/intel-tbb

var/spack/repos/builtin/packages/intel-tbb/package.py

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -81,26 +81,21 @@ class IntelTbb(Package):
8181
variant('tm', default=True,
8282
description='Enable use of transactional memory on x86')
8383

84-
# Build and install CMake config files if we're new enough.
85-
depends_on('cmake@3.0.0:', type='build', when='@2017.0:')
84+
# Testing version ranges inside when clauses was fixed in e9ee9eaf.
85+
# See: #8957 and #13989.
8686

87-
# Note: see issues #11371 and #8957 to understand why 2019.x patches are
88-
# specified one at a time. In a nutshell, it is currently impossible
89-
# to patch `2019.1` without patching `2019`. When #8957 is fixed, this
90-
# can be simplified.
87+
# Build and install CMake config files if we're new enough.
88+
# CMake support started in 2017.7.
89+
depends_on('cmake@3.0.0:', type='build', when='@2017.7:')
9190

9291
# Patch for pedantic warnings (#10836). This was fixed in the TBB
93-
# source tree in 2019.6. One patch file for 2019.1 and after...
94-
patch("gcc_generic-pedantic-2019.patch", level=1,
95-
when='@2019.1,2019.2,2019.3,2019.4,2019.5')
96-
# ...another patch file for 2019 and before
97-
patch("gcc_generic-pedantic-4.4.patch", level=1, when='@:2019.0')
92+
# source tree in 2019.6.
93+
patch("gcc_generic-pedantic-2019.patch", level=1, when='@2019.1:2019.5')
94+
patch("gcc_generic-pedantic-4.4.patch", level=1, when='@:2019.0')
9895

9996
# Patch cmakeConfig.cmake.in to find the libraries where we install them.
100-
# Can't use '@2019.5:' because 2019.5 <= 2019 <= 2019.99. wtf!?
101-
patch("tbb_cmakeConfig-2019.5.patch", level=0,
102-
when='@2019.5,2019.6,2019.7,2019.8')
103-
patch("tbb_cmakeConfig.patch", level=0, when='@2017.0:2019.4')
97+
patch("tbb_cmakeConfig-2019.5.patch", level=0, when='@2019.5:')
98+
patch("tbb_cmakeConfig.patch", level=0, when='@2017.7:2019.4')
10499

105100
# Some very old systems don't support transactional memory.
106101
patch("disable-tm.patch", when='~tm')
@@ -197,7 +192,7 @@ def install(self, spec, prefix):
197192
for f in fs:
198193
install(f, prefix.lib)
199194

200-
if self.spec.satisfies('@2017.0:'):
195+
if spec.satisfies('@2017.8,2018.1:', strict=True):
201196
# Generate and install the CMake Config file.
202197
cmake_args = ('-DTBB_ROOT={0}'.format(prefix),
203198
'-DTBB_OS={0}'.format(platform.system()),

0 commit comments

Comments
 (0)