aboutsummaryrefslogblamecommitdiffstats
path: root/testing/libtbb/APKBUILD
blob: 4da0704e2726719a01eee14452f8bae913dc184b (plain) (tree)
1
2
3
4
5
6



                                                    

                            








































































                                                                                                                   


                                                                                                                                                                        
# Contributor: David Huffman <storedbox@outlook.com>
# Maintainer: David Huffman <storedbox@outlook.com>

pkgname=libtbb
pkgver=4.4.4
_pkgverstr=tbb44_20160413oss
pkgrel=0
pkgdesc="Intel® TBB, a widely used C++ template library for task parallelism"
url="https://threadingbuildingblocks.org"
arch="x86 x86_64"
license="GPL2"
subpackages="$pkgname-debug $pkgname-dev $pkgname-doc"
source="https://www.threadingbuildingblocks.org/sites/default/files/software_releases/source/${_pkgverstr}_src.tgz"

_builddir="$srcdir/$_pkgverstr"
prepare() {
	local i
	cd "$_builddir"
	for i in "$startdir"/*; do
		case $i in
		*.patch) msg $i; patch --verbose -p1 -i $i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	make || return 1
}

_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) || return 1
	[ "$buildtype" != "_debug" ] && buildtype=''
	mkdir -p "$lib" || return 1
	mv "$builddir/libtbb${buildtype}.so$libsuffix" \
	   "$builddir/libtbbmalloc${buildtype}.so$libsuffix" \
	   "$builddir/libtbbmalloc_proxy${buildtype}.so$libsuffix" \
	   "$lib/" || return 1
}

package() {
	_install_libs release .2 "$pkgdir" || return 1
}

debug() {
	pkgdesc="$pkgdesc (debug symbols)"
	
	_install_libs debug .2 || return 1
}

dev() {
	pkgdesc="$pkgdesc (development files)"
	
	local prefix
	prefix="$subpkgdir/usr"
	cd "$_builddir"
	mkdir -p "$prefix" || return 1
	rm include/index.html && mv include "$prefix/" || return 1
	_install_libs release && _install_libs debug || return 1
}

doc() {
	arch="noarch"
	pkgdesc="$pkgdesc (documentation)"
	
	local share doc licenses
	share="$subpkgdir/usr/share"
	doc="$share/doc"
	licensesdir="$share/licenses/$pkgname"
	cd "$_builddir"
	mkdir -p "$doc" "$licensesdir" || return 1
	mv doc/ "$doc/$pkgname-$pkgver" || return 1
	mv COPYING "$licensesdir/" || return 1
}

md5sums="95999ccff3470f6565c516e67fb37019  tbb44_20160413oss_src.tgz"
sha256sums="3fecffef5e42f9f22e51a81a1bfa89ea40cefb439d168c285c9d5f0128353644  tbb44_20160413oss_src.tgz"
sha512sums="93424dbb42da10dc2ffdcc0c04738112bc0c96bc9c8563b3aa931b1f118fcec480957447673d85f8a6ea0e9f0b233460036204ad6e4dad815203375b45679943  tbb44_20160413oss_src.tgz"