mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-13 15:20:07 +02:00
104 lines
3.2 KiB
Bash
104 lines
3.2 KiB
Bash
SUMMARY="High level abstract threading library"
|
|
DESCRIPTION="Threading Building Blocks (TBB) is a C++ template library \
|
|
developed by Intel for parallel programming on multi-core processors. Using \
|
|
TBB, a computation is broken down into tasks that can run in parallel. The \
|
|
library manages and schedules threads to execute these tasks."
|
|
HOMEPAGE="https://www.threadingbuildingblocks.org/"
|
|
COPYRIGHT="2005-2021 Intel Corporation"
|
|
LICENSE="Apache v2"
|
|
REVISION="1"
|
|
SOURCE_URI="https://github.com/oneapi-src/oneTBB/archive/v$portVersion.tar.gz"
|
|
CHECKSUM_SHA256="e8e89c9c345415b17b30a2db3095ba9d47647611662073f7fbf54ad48b7f3c2a"
|
|
SOURCE_DIR="oneTBB-$portVersion"
|
|
PATCHES="tbb-$portVersion.patchset"
|
|
|
|
ARCHITECTURES="?all !x86_gcc2"
|
|
SECONDARY_ARCHITECTURES="?x86"
|
|
|
|
libtbbVersion="12.14"
|
|
libtbbVersionCompat="$libtbbVersion compat >= ${libtbbVersion%%.*}"
|
|
libtbbbindVersion="3.14"
|
|
libtbbbindVersionCompat="$libtbbbindVersion compat >= ${libtbbbindVersion%%.*}"
|
|
libtbbmallocVersion="2.14"
|
|
libtbbmallocVersionCompat="$libtbbmallocVersion compat >= ${libtbbmallocVersion%%.*}"
|
|
libtbbmalloc_proxyVersion="2.14"
|
|
libtbbmalloc_proxyVersionCompat="$libtbbmalloc_proxyVersion compat >= ${libtbbmalloc_proxyVersion%%.*}"
|
|
|
|
PROVIDES="
|
|
tbb$secondaryArchSuffix = $portVersion
|
|
lib:libtbb$secondaryArchSuffix = $libtbbVersionCompat
|
|
lib:libtbbbind_2_5$secondaryArchSuffix = $libtbbbindVersionCompat
|
|
lib:libtbbmalloc$secondaryArchSuffix = $libtbbmallocVersionCompat
|
|
lib:libtbbmalloc_proxy$secondaryArchSuffix = $libtbbmalloc_proxyVersionCompat
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
lib:libhwloc$secondaryArchSuffix
|
|
"
|
|
|
|
PROVIDES_devel="
|
|
tbb${secondaryArchSuffix}_devel = $portVersion
|
|
devel:libtbb$secondaryArchSuffix = $libtbbVersionCompat
|
|
devel:libtbbbind_2_5$secondaryArchSuffix = $libtbbbindVersionCompat
|
|
devel:libtbbmalloc$secondaryArchSuffix = $libtbbmallocVersionCompat
|
|
devel:libtbbmalloc_proxy$secondaryArchSuffix = $libtbbmalloc_proxyVersionCompat
|
|
"
|
|
REQUIRES_devel="
|
|
tbb$secondaryArchSuffix == $portVersion base
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
hwloc2${secondaryArchSuffix}_tools >= 2.10
|
|
devel:libhwloc$secondaryArchSuffix >= 15.7.0
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:cmake
|
|
cmd:gcc$secondaryArchSuffix
|
|
cmd:make
|
|
cmd:pkg_config$secondaryArchSuffix
|
|
"
|
|
|
|
defineDebugInfoPackage tbb$secondaryArchSuffix \
|
|
$libDir/libtbb.so.$libtbbVersion \
|
|
$libDir/libtbbbind_2_5.so.$libtbbbindVersion \
|
|
$libDir/libtbbmalloc.so.$libtbbmallocVersion \
|
|
$libDir/libtbbmalloc_proxy.so.$libtbbmalloc_proxyVersion
|
|
|
|
BUILD()
|
|
{
|
|
mkdir -p build_haiku && cd build_haiku
|
|
cmake .. \
|
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
|
$cmakeDirArgs \
|
|
-DTBB_STRICT=OFF \
|
|
-DTBB_TEST=OFF
|
|
make $jobArgs
|
|
}
|
|
|
|
|
|
INSTALL()
|
|
{
|
|
cd build_haiku
|
|
make install
|
|
|
|
prepareInstalledDevelLibs libtbb \
|
|
libtbbbind_2_5 \
|
|
libtbbmalloc \
|
|
libtbbmalloc_proxy
|
|
fixPkgconfig
|
|
|
|
# devel package
|
|
packageEntries devel \
|
|
$developDir \
|
|
$libDir/cmake
|
|
}
|
|
|
|
TEST()
|
|
{
|
|
# 98% tests passed, 2 tests failed out of 129
|
|
export LIBRARY_PATH="$sourceDir/build_haiku/gnu_13.3_cxx11_64_relwithdebinfo${LIBRARY_PATH:+:$LIBRARY_PATH}"
|
|
# Running the tests in parallel often leads to resource exhaustion. (Fedora)
|
|
ctest --test-dir build_haiku --output-on-failure --force-new-ctest-process
|
|
}
|