X-Original-To: alpine-aports@mail.alpinelinux.org Delivered-To: alpine-aports@mail.alpinelinux.org Received: from mail.alpinelinux.org (dallas-a1.alpinelinux.org [127.0.0.1]) by mail.alpinelinux.org (Postfix) with ESMTP id 4A917DC23A4 for ; Wed, 6 Jan 2016 19:54:25 +0000 (UTC) Received: from BLU004-OMC1S33.hotmail.com (blu004-omc1s33.hotmail.com [65.55.116.44]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.alpinelinux.org (Postfix) with ESMTPS id 0A81DDC0C86 for ; Wed, 6 Jan 2016 19:54:24 +0000 (UTC) Received: from BLU436-SMTP243 ([65.55.116.9]) by BLU004-OMC1S33.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); Wed, 6 Jan 2016 11:54:24 -0800 X-TMN: [ZhHKnqNd8On1t2xhKibCkFKhr8IjyCkp] X-Originating-Email: [storedbox@outlook.com] Message-ID: From: David Huffman To: alpine-aports@lists.alpinelinux.org CC: David Huffman Subject: [alpine-aports] [PATCH] testing/libtbb: new aport Date: Wed, 6 Jan 2016 14:54:10 -0500 X-Mailer: git-send-email 2.6.2 X-Mailinglist: alpine-aports Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-OriginalArrivalTime: 06 Jan 2016 19:54:21.0529 (UTC) FILETIME=[092A8C90:01D148BC] X-Virus-Scanned: ClamAV using ClamSMTP https://threadingbuildingblocks.org Intel=C2=AE Threading Building Blocks Provides version 4.4 update 2 --- testing/libtbb/APKBUILD | 82 ++++++++++++++++++++++++++= ++++ testing/libtbb/glibc-struct-mallinfo.patch | 43 ++++++++++++++++ 2 files changed=2C 125 insertions(+) create mode 100644 testing/libtbb/APKBUILD create mode 100644 testing/libtbb/glibc-struct-mallinfo.patch diff --git a/testing/libtbb/APKBUILD b/testing/libtbb/APKBUILD new file mode 100644 index 0000000..b12a969 --- /dev/null +++ b/testing/libtbb/APKBUILD @@ -0=2C0 +1=2C82 @@ +# Contributor: David Huffman +# Maintainer: David Huffman + +pkgname=3Dlibtbb +pkgver=3D4.4.2 +_pkgverstr=3Dtbb44_20151115oss +pkgrel=3D0 +pkgdesc=3D"Intel=C2=AE TBB=2C a widely used C++ template library for task = parallelism" +url=3D"https://threadingbuildingblocks.org" +arch=3D"x86 x86_64" +license=3D"GPL2" +subpackages=3D"$pkgname-debug $pkgname-dev $pkgname-doc" +source=3D"https://www.threadingbuildingblocks.org/sites/default/files/soft= ware_releases/source/${_pkgverstr}_src.tgz" + +_builddir=3D"$srcdir/$_pkgverstr" +prepare() { + local i + cd "$_builddir" + for i in "$startdir"/*=3B do + case $i in + *.patch) msg $i=3B patch --verbose -p1 -i $i || return 1=3B=3B + esac + done +} + +build() { + cd "$_builddir" + make || return 1 +} + +_install_libs() { + local buildtype libsuffix lib builddir + buildtype=3D"_$1" + libsuffix=3D"$2" + lib=3D"${3:-$subpkgdir}/usr/lib" + builddir=3D$(find "$_builddir/build" -maxdepth 1 -name "*$buildtype" -typ= e d) || return 1 + [ "$buildtype" !=3D "_debug" ] && buildtype=3D'' + 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=3D"$pkgdesc (debug symbols)" +=09 + _install_libs debug .2 || return 1 +} + +dev() { + pkgdesc=3D"$pkgdesc (development files)" +=09 + local prefix + prefix=3D"$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=3D"noarch" + pkgdesc=3D"$pkgdesc (documentation)" +=09 + local share doc licenses + share=3D"$subpkgdir/usr/share" + doc=3D"$share/doc" + licensesdir=3D"$share/licenses/$pkgname" + cd "$_builddir" + mkdir -p "$doc" "$licensesdir" || return 1 + mv doc/ "$doc/$pkgname-$pkgver" || return 1 + mv COPYING "$licensesdir/" || return 1 +} + +md5sums=3D"7fae6a6bbca68bbdc18e844d6721d5e4 tbb44_20151115oss_src.tgz" +sha256sums=3D"3dd5c4fc85c18f49307d3cde4ce937bda230679f7fe2906112e5c8dee4cc= 77bb tbb44_20151115oss_src.tgz" +sha512sums=3D"a5e831fdc56767bf6e823afaa85a041d0a78ef04f506ba2c088a13389381= 0d17433a4c2a7b7845526e5f34b68f78dcdb6106814ddb54da49ea7b03225067997a tbb44= _20151115oss_src.tgz" diff --git a/testing/libtbb/glibc-struct-mallinfo.patch b/testing/libtbb/gl= ibc-struct-mallinfo.patch new file mode 100644 index 0000000..64056ec --- /dev/null +++ b/testing/libtbb/glibc-struct-mallinfo.patch @@ -0=2C0 +1=2C43 @@ +From b577153a10c98f4e13405dc93ea2ab1a7b990e07 Mon Sep 17 00:00:00 2001 +From: David Huffman +Date: Wed=2C 6 Jan 2016 07:09:30 -0500 +Subject: [PATCH] hard-code glibc's definition of struct mallinfo + +--- + src/tbbmalloc/proxy.h | 20 ++++++++++++++++++++ + 1 file changed=2C 20 insertions(+) + +diff --git a/src/tbbmalloc/proxy.h b/src/tbbmalloc/proxy.h +index 781cadc..e1ea1ae 100644 +--- a/src/tbbmalloc/proxy.h ++++ b/src/tbbmalloc/proxy.h +@@ -32=2C6 +32=2C26 @@ +=20 + #include +=20 ++// The following definition was taken from /usr/include/malloc.h as provi= ded by ++// the glibc-devel-2.19-17.4.x86_64 package on openSUSE Leap 42.1=3B it i= s ++// made available under the GNU Lesser General Public License v2.1 or lat= er. ++// See . ++// ++// Copyright (C) 1996-2014 Free Software Foundation=2C Inc. ++struct mallinfo ++{ ++ int arena=3B /* non-mmapped space allocated from system */ ++ int ordblks=3B /* number of free chunks */ ++ int smblks=3B /* number of fastbin blocks */ ++ int hblks=3B /* number of mmapped regions */ ++ int hblkhd=3B /* space in mmapped regions */ ++ int usmblks=3B /* maximum total allocated space */ ++ int fsmblks=3B /* space available in freed fastbin blocks */ ++ int uordblks=3B /* total allocated space */ ++ int fordblks=3B /* total free space */ ++ int keepcost=3B /* top-most=2C releasable (via malloc_trim) space */ ++}=3B ++ + extern "C" { + void * scalable_malloc(size_t size)=3B + void * scalable_calloc(size_t nobj=2C size_t size)=3B +--=20 +2.6.2 + --=20 2.6.2 --- Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---