diff options
author | KoyamaSohei <koyamaso0309@gmail.com> | 2021-10-05 06:38:31 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-04 21:38:31 +0000 |
commit | c426386f4623d4a087af384ebc2276ca203f3cb9 (patch) | |
tree | 557281241cc35a1a84fa1760669839fcdc2f85a3 /var | |
parent | 5a9e5ddb3d3521ab4d0a2d480d6e79d339f8ba2a (diff) | |
download | spack-c426386f4623d4a087af384ebc2276ca203f3cb9.tar.gz spack-c426386f4623d4a087af384ebc2276ca203f3cb9.tar.bz2 spack-c426386f4623d4a087af384ebc2276ca203f3cb9.tar.xz spack-c426386f4623d4a087af384ebc2276ca203f3cb9.zip |
intel-tbb: install pkgconfig file (#23977)
* intel-tbb: install pkgconfig file
* intel-tbb: install pkgconfig file when @:2021.2.0
* intel-tbb: add blank line
* intel-tbb: fix library name to refer
* intel-tbb: fix library name to refer again
* intel-tbb: use self.prefix.lib.pkgconfig
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/intel-tbb/package.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/intel-tbb/package.py b/var/spack/repos/builtin/packages/intel-tbb/package.py index 5c8d158e02..d0a66395d2 100644 --- a/var/spack/repos/builtin/packages/intel-tbb/package.py +++ b/var/spack/repos/builtin/packages/intel-tbb/package.py @@ -298,3 +298,23 @@ class IntelTbb(CMakePackage): options.append('-DCMAKE_CXX_STANDARD=%s' % spec.variants['cxxstd'].value) return options + + @run_after('install') + def install_pkgconfig(self): + # pkg-config generation is introduced in May 5, 2021. + # It must not be overwritten by spack-generated tbb.pc. + # https://github.com/oneapi-src/oneTBB/commit/478de5b1887c928e52f029d706af6ea640a877be + if self.spec.satisfies('@:2021.2.0', strict=True): + mkdirp(self.prefix.lib.pkgconfig) + + with open(join_path(self.prefix.lib.pkgconfig, 'tbb.pc'), 'w') as f: + f.write('prefix={0}\n'.format(self.prefix)) + f.write('exec_prefix=${prefix}\n') + f.write('libdir={0}\n'.format(self.prefix.lib)) + f.write('includedir={0}\n'.format(self.prefix.include)) + f.write('\n') + f.write('Name: Threading Building Blocks\n') + f.write('Description: Intel\'s parallelism library for C++\n') + f.write('Version: {0}\n'.format(self.spec.version)) + f.write('Cflags: -I${includedir}\n') + f.write('Libs: -L${libdir} -ltbb -latomic\n') |