summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilip Kobierski <fkobi@pm.me>2024-12-19 13:44:18 +0100
committerNowa Ammerlaan <nowa@gentoo.org>2024-12-19 16:09:47 +0100
commit4153b014b354b247217581f1f574041c2213faeb (patch)
tree1a4080a0e29a2a96f77ee6712857f18adf61e66a /dev-cpp
parentmedia-libs/libvpl: metadata: add bugs-to & changelog (diff)
downloadgentoo-4153b014b354b247217581f1f574041c2213faeb.tar.gz
gentoo-4153b014b354b247217581f1f574041c2213faeb.tar.bz2
gentoo-4153b014b354b247217581f1f574041c2213faeb.zip
dev-cpp/tbb: add 2022.0.0 and do not fortify source
- update HOMEPAGE & SRC_URI - split too long line - drop x64-macos KEYWORD - add examples TODO Bug: https://bugs.gentoo.org/922605 Signed-off-by: Filip Kobierski <fkobi@pm.me> Signed-off-by: Nowa Ammerlaan <nowa@gentoo.org>
Diffstat (limited to 'dev-cpp')
-rw-r--r--dev-cpp/tbb/Manifest1
-rw-r--r--dev-cpp/tbb/files/tbb-2022.0.0_do-not-fortify-source.patch42
-rw-r--r--dev-cpp/tbb/tbb-2022.0.0.ebuild51
3 files changed, 94 insertions, 0 deletions
diff --git a/dev-cpp/tbb/Manifest b/dev-cpp/tbb/Manifest
index 8136b81da2f8..c30b8e745105 100644
--- a/dev-cpp/tbb/Manifest
+++ b/dev-cpp/tbb/Manifest
@@ -3,3 +3,4 @@ DIST tbb-2021.12.0.tar.gz 2617255 BLAKE2B 3e1db8b1972a7225c5355def66ae40006e6e0f
DIST tbb-2021.13.0.tar.gz 2613916 BLAKE2B 0edd2d8a966dba673e50827629491924140a302430f4380e7cd9914f3592eaf6515204c7267649237970a5482cc030f0c29cbddd1476f16caf46989f70041058 SHA512 1f536b98c4eb331c3ba21e4b36362c932d7852b974ea7237b5f7bffb0e996d76f688c7ac534cb56f5866cfdffd5d3f015521b4c2ca21e584503070782ca82a2f
DIST tbb-2021.7.0.tar.gz 2571727 BLAKE2B 2977ef1a33d9bc7baa40e0e57c02e62798a09c6c66cdbe369f2702d87fd9877c3d97f8d83f71384028995ea0956f5c5630d4aaf4edbe68538e7c514d3b87085c SHA512 d314e3d88b85c96607a9eda15e3d808bf361eb562a534c59101929236e90c187883e7718e5435b5e7f01f4ee652c9765af95f5f173368b83997e4666b7403a49
DIST tbb-2021.9.0.tar.gz 2579150 BLAKE2B f6f701df1605913770222689063ff422416f86f132fb3fbc80f383b7c52762d3804e75200ca4826906b16c66f674918bcfd78b16a1dafb499ca53a9d2b6652ec SHA512 2ece7f678ad7c8968c0ad5cda9f987e4b318c6d9735169e1039beb0ff8dfca18815835875211acc6c7068913d9b0bdd4c9ded22962b0bb48f4a0ce0f7b78f31c
+DIST tbb-2022.0.0.tar.gz 2654343 BLAKE2B eac1a8065e401f1329527ccb1db0a8d30eb54ca2d9180560cd3be2263a779d250a0bda4fc3fb11fede3c63e964490420f09d664a7e39071d9b6a6cf743349f8f SHA512 c87b84964b2c323f61895a532968dfa6413a774c177cffbf6e798a07e74e8da5d449144875771df0a1b02657eeb2a7ae4d41c6c432dbf7ea50e3d5a9ea9f8cd3
diff --git a/dev-cpp/tbb/files/tbb-2022.0.0_do-not-fortify-source.patch b/dev-cpp/tbb/files/tbb-2022.0.0_do-not-fortify-source.patch
new file mode 100644
index 000000000000..d88a3a54c383
--- /dev/null
+++ b/dev-cpp/tbb/files/tbb-2022.0.0_do-not-fortify-source.patch
@@ -0,0 +1,42 @@
+From: Filip Kobierski <fkobi@pm.me>
+
+patching just GCC and Clang as we only support that
+
+Bug: https://bugs.gentoo.org/922605
+---
+ cmake/compilers/Clang.cmake | 4 ----
+ cmake/compilers/GNU.cmake | 3 ---
+ 2 files changed, 7 deletions(-)
+
+diff --git a/cmake/compilers/Clang.cmake b/cmake/compilers/Clang.cmake
+index a0297faa..a5c32d0e 100644
+--- a/cmake/compilers/Clang.cmake
++++ b/cmake/compilers/Clang.cmake
+@@ -72,10 +72,6 @@ endif()
+
+ set(TBB_COMMON_LINK_LIBS ${CMAKE_DL_LIBS})
+
+-if (NOT CMAKE_CXX_FLAGS MATCHES "_FORTIFY_SOURCE")
+- set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} $<$<NOT:$<CONFIG:Debug>>:-D_FORTIFY_SOURCE=2>)
+-endif ()
+-
+ if (MINGW)
+ list(APPEND TBB_COMMON_COMPILE_FLAGS -U__STRICT_ANSI__)
+ endif()
+diff --git a/cmake/compilers/GNU.cmake b/cmake/compilers/GNU.cmake
+index da6b408a..857d0888 100644
+--- a/cmake/compilers/GNU.cmake
++++ b/cmake/compilers/GNU.cmake
+@@ -109,9 +109,6 @@ set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -Wformat -Wformat-secur
+ if (NOT APPLE AND NOT MINGW)
+ set(TBB_LIB_LINK_FLAGS ${TBB_LIB_LINK_FLAGS} -Wl,-z,relro,-z,now,-z,noexecstack)
+ endif()
+-if (NOT CMAKE_CXX_FLAGS MATCHES "_FORTIFY_SOURCE")
+- set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} $<$<NOT:$<CONFIG:Debug>>:-D_FORTIFY_SOURCE=2> )
+-endif ()
+
+ if (TBB_FILE_TRIM AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 8)
+ set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -ffile-prefix-map=${NATIVE_TBB_PROJECT_ROOT_DIR}/= -ffile-prefix-map=${NATIVE_TBB_RELATIVE_BIN_PATH}/=)
+--
+2.45.2
+
diff --git a/dev-cpp/tbb/tbb-2022.0.0.ebuild b/dev-cpp/tbb/tbb-2022.0.0.ebuild
new file mode 100644
index 000000000000..bed10c92ab97
--- /dev/null
+++ b/dev-cpp/tbb/tbb-2022.0.0.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake-multilib flag-o-matic
+
+DESCRIPTION="High level abstract threading library"
+HOMEPAGE="https://github.com/uxlfoundation/oneTBB"
+SRC_URI="https://github.com/uxlfoundation/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.14-2.14-3.14"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="sys-apps/hwloc:="
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2021.13.0-test-atomics.patch
+ "${FILESDIR}"/${PN}-2022.0.0_do-not-fortify-source.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() {
+ # Workaround for bug #912210
+ append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
+
+ local mycmakeargs=(
+ -DTBB_TEST=$(usex test)
+ -DTBB_EXAMPLES=OFF # TODO: add this
+ -DTBB_ENABLE_IPO=OFF
+ -DTBB_STRICT=OFF
+ )
+
+ cmake-multilib_src_configure
+}