1 # Copyright 1999-2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit cmake-multilib flag-o-matic
8 DESCRIPTION="High level abstract threading library"
9 HOMEPAGE="https://github.com/oneapi-src/oneTBB"
10 SRC_URI="https://github.com/oneapi-src/oneTBB/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
11 S="${WORKDIR}/oneTBB-${PV}"
14 # https://github.com/oneapi-src/oneTBB/blob/master/CMakeLists.txt#L53
15 # libtbb<SONAME>-libtbbmalloc<SONAME>-libtbbbind<SONAME>
17 KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~ppc ppc64 ~riscv ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos"
19 RESTRICT="!test? ( test )"
21 RDEPEND="!kernel_Darwin? ( sys-apps/hwloc:= )"
23 BDEPEND="virtual/pkgconfig"
26 "${FILESDIR}"/${PN}-2021.8.0-gcc-13.patch
27 "${FILESDIR}"/${PN}-2021.13.0-test-atomics.patch
31 # Has an #error to force compilation as C but links with C++ library, dies
32 # with GLIBCXX_ASSERTIONS as a result.
33 sed -i -e '/tbb_add_c_test(SUBDIR tbbmalloc NAME test_malloc_pure_c DEPENDENCIES TBB::tbbmalloc)/d' test/CMakeLists.txt || die
39 # Workaround for bug #912210
40 append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
43 -DTBB_TEST=$(usex test)
48 cmake-multilib_src_configure