added extra/tbb

This commit is contained in:
Kevin Mihelich 2021-12-10 05:52:39 +00:00
parent c7ffb17d53
commit fcac1f5673

40
extra/tbb/PKGBUILD Normal file
View file

@ -0,0 +1,40 @@
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Stéphane Gaudreault <stephane@archlinux.org>
# Contributor: Thomas Dziedzic < gostrc at gmail >
# Contributor: Denis Martinez <deuns.martinez AT gmail.com>
# Contributor: Bogdan Burlacu <bogdan.burlacu AT pm.me>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - explicitly link v5/v6 with libatomic
pkgname=tbb
pkgver=2021.4.0
pkgrel=1
pkgdesc='High level abstract threading library'
arch=('x86_64')
url='https://www.threadingbuildingblocks.org/'
license=('Apache')
depends=('gcc-libs' 'hwloc')
makedepends=('cmake' 'inetutils' 'ninja' 'python' 'swig')
conflicts=('intel-tbb')
provides=("intel-tbb=$pkgver")
replaces=('intel-tbb')
source=(https://github.com/oneapi-src/oneTBB/archive/v$pkgver/$pkgname-$pkgver.tar.gz)
sha512sums=('96da2bc351fd64dfa854f8e6cabc1c4e53af3d55760e99d6f83ad53779c727af333d13d6be0828ed70371cf796498d2063e9dd0e4b2f6451623bb5d28ccbf20b')
build() {
cd oneTBB-$pkgver
[[ $CARCH == "arm" || $CARCH == "armv6h" ]] && echo "target_link_libraries(tbb PUBLIC atomic)" >> src/tbb/CMakeLists.txt
cmake -GNinja -DCMAKE_INSTALL_PREFIX=/usr -DTBB4PY_BUILD=ON .
ninja all python_build
}
check() {
cd oneTBB-$pkgver
ninja test
}
package() {
cd oneTBB-$pkgver
DESTDIR="$pkgdir" ninja install
}