void-packages/srcpkgs/tbb/template
2017-12-07 23:29:12 +01:00

55 lines
1.4 KiB
Bash

# Template file for 'tbb'
pkgname=tbb
version=2018.2
revision=1
# version rewrite: 2017_U7 (upstream) => 2017.7 (xbps)
_ver=${version/./_U}
wrksrc="${pkgname}-${_ver}"
build_style=gnu-makefile
short_desc="Intel Threading Building Blocks"
maintainer="Andrea Brancaleoni <abc@pompel.me>"
license="Apache-2.0"
homepage="http://www.threadingbuildingblocks.org"
distfiles="https://github.com/01org/tbb/archive/${_ver}.tar.gz"
checksum=78bb9bae474736d213342f01fe1a6d00c6939d5c75b367e2e43e7bf29a6d8eca
only_for_archs="i686-musl x86_64-musl armv7l-musl aarch64-musl i686 x86_64 armv7l aarch64"
case "$XBPS_TARGET_MACHINE" in
armv7l*)
make_build_args="arch=armv7"
;;
aarch64*)
make_build_args="arch=arm64"
;;
esac
post_extract() {
sed -i 's|CPLUS = g..|CPLUS = $(CXX)|g' build/linux.gcc.inc
sed -i 's|CONLY = gcc|CONLY = $(CC)|g' build/linux.gcc.inc
# alternative might be:
# https://git.alpinelinux.org/cgit/aports/tree/testing/libtbb/glibc-struct-mallinfo.patch
case "$XBPS_TARGET_MACHINE" in
*-musl)
sed -e "s@#define MALLOC_UNIXLIKE_OVERLOAD_ENABLED __linux__@@" \
-i src/tbbmalloc/proxy.h
;;
esac
}
do_install() {
vmkdir usr/lib
vcopy build/linux_*/*.so* usr/lib
vmkdir usr/include/tbb
vcopy include/tbb/* usr/include/tbb
}
tbb-devel_package() {
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.so"
}
}