Commit eba9480d authored by Leo's avatar Leo
Browse files

testing/libtbb: upgrade to 2020.2

parent 5d0072d5
# Contributor: David Huffman <storedbox@outlook.com>
# Maintainer: David Huffman <storedbox@outlook.com>
pkgname=libtbb
pkgver=4.4.4
_pkgverstr=tbb44_20160413oss
pkgrel=1
pkgver=2020.2
pkgrel=0
pkgdesc="Intel® TBB, a widely used C++ template library for task parallelism"
url="https://github.com/oneapi-src/oneTBB"
arch="x86 x86_64"
license="GPL-2.0-only"
subpackages="$pkgname-debug $pkgname-dev $pkgname-doc"
source="https://www.threadingbuildingblocks.org/sites/default/files/software_releases/source/${_pkgverstr}_src.tgz"
builddir="$srcdir/$_pkgverstr"
makedepends="linux-headers cmake"
subpackages="$pkgname-dev"
source="tbb-$pkgver.tar.gz::https://github.com/oneapi-src/oneTBB/archive/v$pkgver.tar.gz
musl.patch
tbb.pc
tbbmalloc.pc
tbbmalloc_proxy.pc
"
builddir="$srcdir/oneTBB-$pkgver"
prepare() {
default_prepare
sed -i 's|CPLUS = g..|CPLUS = $(CXX)|g' build/linux.gcc.inc
sed -i 's|CONLY = gcc|CONLY = $(CC)|g' build/linux.gcc.inc
sed -e "s@#define MALLOC_UNIXLIKE_OVERLOAD_ENABLED __linux__@@" \
-i src/tbbmalloc/proxy.h
sed -i "s|@@VERSION@@|$pkgver|" -i "$srcdir"/*.pc
}
build() {
make
}
_install_libs() {
local buildtype libsuffix lib builddir
buildtype="_$1"
libsuffix="$2"
lib="${3:-$subpkgdir}/usr/lib"
builddir=$(find "$builddir/build" -maxdepth 1 -name "*$buildtype" -type d)
[ "$buildtype" != "_debug" ] && buildtype=''
mkdir -p "$lib"
mv "$builddir/libtbb$buildtype.so$libsuffix" \
"$builddir/libtbbmalloc$buildtype.so$libsuffix" \
"$builddir/libtbbmalloc_proxy$buildtype.so$libsuffix" \
"$lib/"
}
package() {
_install_libs release .2 "$pkgdir"
}
mkdir -p "$pkgdir"/usr/lib
mkdir -p "$pkgdir"/usr/include
debug() {
pkgdesc="$pkgdesc (debug symbols)"
_install_libs debug .2
}
dev() {
pkgdesc="$pkgdesc (development files)"
local prefix
prefix="$subpkgdir/usr"
cd "$builddir"
mkdir -p "$prefix"
rm include/index.html && mv include "$prefix/"
_install_libs release && _install_libs debug
}
mv build/linux_*/*.so* "$pkgdir"/usr/lib
mv include/tbb "$pkgdir"/usr/include
doc() {
arch="noarch"
pkgdesc="$pkgdesc (documentation)"
cmake \
-DINSTALL_DIR="$pkgdir"/usr/lib/cmake/TBB \
-DSYSTEM_NAME=Linux \
-DLIB_REL_PATH=../.. \
-DINC_REL_PATH=../../../include \
-P cmake/tbb_config_installer.cmake
local share doc licenses
share="$subpkgdir/usr/share"
doc="$share/doc"
licensesdir="$share/licenses/$pkgname"
cd "$builddir"
mkdir -p "$doc" "$licensesdir"
mv doc/ "$doc/$pkgname-$pkgver"
mv COPYING "$licensesdir/"
install -Dm0644 "$srcdir"/*.pc -t "$pkgdir"/usr/lib/pkgconfig
}
sha512sums="93424dbb42da10dc2ffdcc0c04738112bc0c96bc9c8563b3aa931b1f118fcec480957447673d85f8a6ea0e9f0b233460036204ad6e4dad815203375b45679943 tbb44_20160413oss_src.tgz"
sha512sums="b9a5d0e814ebd2e69690585bcfb5a545c06f030e193154bef161ac59066044109f8a0305a9ba535c447739da3380c351067db19c38de4bf96ec742b044f39885 tbb-2020.2.tar.gz
c5f2d284e63fa3e9a835df45692355946fa3cd2f31ffb775ef8eff18780d28203115e799d70d547526c3a5c2b2290cb032e1eaa6160e188598abe62d89d2480e musl.patch
b7849e84c5f4d868ad19dc4a2433492facd1f75fe6e5cb0afc334e8f07bb4657d318ee1bc53f7890bfb8a87c7233bba85b61aba2aec9ea3dc24652a4bdec4dde tbb.pc
25b0bfe2067f287064f81dc434ac70336ad42fdd7fa91cded2e467f3939000480e1012675dc4e435a1712cf9b968cb565f213dfffb3f69ad46929aec237b9a02 tbbmalloc.pc
5952862755736fb85982281b3953183ed9d4657497a7f6bae1ef66bd1e2265882773764f07e46679b2aa750f80f47cc2a019024822ab5fa272b718c539ef3462 tbbmalloc_proxy.pc"
--- a/src/tbbmalloc/proxy.cpp.orig 2018-10-17 14:05:31.311723013 +0200
+++ b/src/tbbmalloc/proxy.cpp 2018-10-17 14:06:32.972726194 +0200
@@ -28,6 +28,7 @@
// of aligned_alloc as required by new C++ standard, this makes it hard to
// redefine aligned_alloc here. However, running on systems with new libc
// version, it still needs it to be redefined, thus tricking system headers
+#if defined(__GLIBC__)
#if defined(__GLIBC_PREREQ) && !__GLIBC_PREREQ(2, 16) && _GLIBCXX_HAVE_ALIGNED_ALLOC
// tell <cstdlib> that there is no aligned_alloc
#undef _GLIBCXX_HAVE_ALIGNED_ALLOC
@@ -37,6 +38,7 @@
#include <cstdlib>
#undef aligned_alloc
#endif // defined(__GLIBC_PREREQ)&&!__GLIBC_PREREQ(2, 16)&&_GLIBCXX_HAVE_ALIGNED_ALLOC
+#endif // defined(__GLIBC__)
#endif // __linux__ && !__ANDROID__
#include "proxy.h"
Name: Threading Building Blocks
Description: The Threading Building Blocks library abstracts low-level threading details
URL: http://www.threadingbuildingblocks.org/
Version: @@VERSION@@
Libs: -ltbb
Name: Threading Building Blocks Scalable Allocator
Description: Implementation of Scalable Memory Allocator of Threading Building Blocks
URL: http://www.threadingbuildingblocks.org/
Version: @@VERSION@@
Libs: -ltbbmalloc
Name: Threading Building Blocks Scallable Malloc Proxy
Description: Implementation of proxy that redirects memory allocation calls to TBB Scalable Memory Allocator
URL: http://www.threadingbuildingblocks.org/
Version: @@VERSION@@
Libs: -ltbbmalloc_proxy -ltbbmalloc
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment