commit:     db75708351c07eb215d5b6635946ad4e9a4b424b
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 21 09:59:05 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Feb 21 10:00:53 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=db757083

dev-cpp/tbb: add 2021.8.0

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-cpp/tbb/Manifest                        |  1 +
 dev-cpp/tbb/files/tbb-2021.8.0-gcc-13.patch | 26 ++++++++++++++++
 dev-cpp/tbb/tbb-2021.8.0.ebuild             | 46 +++++++++++++++++++++++++++++
 3 files changed, 73 insertions(+)

diff --git a/dev-cpp/tbb/Manifest b/dev-cpp/tbb/Manifest
index 2235f67725f0..b2964240e09f 100644
--- a/dev-cpp/tbb/Manifest
+++ b/dev-cpp/tbb/Manifest
@@ -1,3 +1,4 @@
 DIST tbb-2020.3.tar.gz 2639788 BLAKE2B 
3e92bccdc8179fc049379ccbb8ad7f615623177abc61d813b1a601020c345137bfd7d4c4600cf5b0d587e5ebef677635c3c8124d06b05fdd3325128ed8c9f84a
 SHA512 
04c4b5501418792827190691d03d20d4dc1fd3cbbcf459a4d40c5c2281d964e658f31f133ad3907b78e17ed04f4ff16728ed89487ed0ce2cb239f23feb34bd87
 DIST tbb-2021.5.0.tar.gz 2463218 BLAKE2B 
2d50d312b86318ba4923afe68753b3781f9646cbdb33861f3458301a3a19b7ca3aab6959dca085294dfc743d7f552635f80fb524ec5d780a46f58ffe02e3280d
 SHA512 
0e7b71022e397a6d7abb0cea106847935ae79a1e12a6976f8d038668c6eca8775ed971202c5bd518f7e517092b67af805cc5feb04b5c3a40e9fbf972cc703a46
 DIST tbb-2021.7.0.tar.gz 2571727 BLAKE2B 
2977ef1a33d9bc7baa40e0e57c02e62798a09c6c66cdbe369f2702d87fd9877c3d97f8d83f71384028995ea0956f5c5630d4aaf4edbe68538e7c514d3b87085c
 SHA512 
d314e3d88b85c96607a9eda15e3d808bf361eb562a534c59101929236e90c187883e7718e5435b5e7f01f4ee652c9765af95f5f173368b83997e4666b7403a49
+DIST tbb-2021.8.0.tar.gz 2575336 BLAKE2B 
2c3a7f0e59d70b17550f805461a15a520c7f1b3a37a41bd51c51f9f5863b50812d2b939351e11e0f4ceb3da8a47e413abe171bcb6bfb71c0fe2f81ed373f65f2
 SHA512 
72f68730dfd89409796f9548d3c302111787712089688a7c77092ed1b3a7bf4e7444fe4b58015d2c78b7b71259852526789b2483bf1e71bea8146c4b4676e7b4

diff --git a/dev-cpp/tbb/files/tbb-2021.8.0-gcc-13.patch 
b/dev-cpp/tbb/files/tbb-2021.8.0-gcc-13.patch
new file mode 100644
index 000000000000..84a0ba3dc7a1
--- /dev/null
+++ b/dev-cpp/tbb/files/tbb-2021.8.0-gcc-13.patch
@@ -0,0 +1,26 @@
+https://github.com/oneapi-src/oneTBB/pull/1031
+
+From 363bf59bef2649b4d427788522da27c12f984a9a Mon Sep 17 00:00:00 2001
+From: Sam James <s...@gentoo.org>
+Date: Tue, 21 Feb 2023 09:36:33 +0000
+Subject: [PATCH] test: common: include <cstdlib> for abort() (fix build with
+ GCC 13)
+
+GCC 13 (as usual for new compiler releases) shuffles around some
+internal includes and so <cstdint> etc is no longer transitively included.
+
+See https://www.gnu.org/software/gcc/gcc-13/porting_to.html.
+
+Signed-off-by: Sam James <s...@gentoo.org>
+--- a/test/common/utils_assert.h
++++ b/test/common/utils_assert.h
+@@ -20,6 +20,8 @@
+ #include "config.h"
+ #include "utils_report.h"
+ 
++#include <cstdlib>
++
+ #define REPORT_FATAL_ERROR REPORT
+ 
+ namespace utils {
+

diff --git a/dev-cpp/tbb/tbb-2021.8.0.ebuild b/dev-cpp/tbb/tbb-2021.8.0.ebuild
new file mode 100644
index 000000000000..7fdc1d716762
--- /dev/null
+++ b/dev-cpp/tbb/tbb-2021.8.0.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake-multilib
+
+DESCRIPTION="High level abstract threading library"
+HOMEPAGE="https://github.com/oneapi-src/oneTBB";
+SRC_URI="https://github.com/oneapi-src/oneTBB/archive/refs/tags/v${PV}.tar.gz 
-> ${P}.tar.gz"
+S="${WORKDIR}/oneTBB-${PV}"
+
+LICENSE="Apache-2.0"
+# https://github.com/oneapi-src/oneTBB/blob/master/CMakeLists.txt#L53
+# libtbb<SONAME>-libtbbmalloc<SONAME>-libtbbbind<SONAME>
+SLOT="0/12.5-2.5-3.5"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv 
~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="!kernel_Darwin? ( sys-apps/hwloc:= )"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-2021.7.0-pthread-eagain.patch
+       "${FILESDIR}"/${PN}-2021.8.0-gcc-13.patch
+)
+
+src_prepare() {
+       # Has an #error to force compilation as C but links with C++ library, 
dies
+       # with GLIBCXX_ASSERTIONS as a result.
+       sed -i -e '/tbb_add_c_test(SUBDIR tbbmalloc NAME test_malloc_pure_c 
DEPENDENCIES TBB::tbbmalloc)/d' test/CMakeLists.txt || die
+
+       cmake_src_prepare
+}
+
+src_configure() {
+       local mycmakeargs=(
+               -DTBB_TEST=$(usex test)
+               -DTBB_ENABLE_IPO=OFF
+               -DTBB_STRICT=OFF
+       )
+
+       cmake-multilib_src_configure
+}

Reply via email to