dev-python/agate: Bump to 1.13.0
[gentoo/gentoo.git] / dev-cpp / tbb / tbb-2021.9.0.ebuild
blob40e9314966f168defc01b2adcd1e16826f7e096e
1 # Copyright 1999-2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 EAPI=8
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}"
13 LICENSE="Apache-2.0"
14 # https://github.com/oneapi-src/oneTBB/blob/master/CMakeLists.txt#L53
15 # libtbb<SONAME>-libtbbmalloc<SONAME>-libtbbbind<SONAME>
16 SLOT="0/12.5-2.5-3.5"
17 KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~ppc ppc64 ~riscv ~sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos"
18 IUSE="test"
19 RESTRICT="!test? ( test )"
21 RDEPEND="!kernel_Darwin? ( sys-apps/hwloc:= )"
22 DEPEND="${RDEPEND}"
23 BDEPEND="virtual/pkgconfig"
25 PATCHES=(
26         "${FILESDIR}"/${PN}-2021.8.0-gcc-13.patch
27         "${FILESDIR}"/${PN}-2021.13.0-test-atomics.patch
30 src_prepare() {
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
35         cmake_src_prepare
38 src_configure() {
39         # Workaround for bug #912210
40         append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
42         local mycmakeargs=(
43                 -DTBB_TEST=$(usex test)
44                 -DTBB_ENABLE_IPO=OFF
45                 -DTBB_STRICT=OFF
46         )
48         cmake-multilib_src_configure