forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dev-cpp/tbb: version bump to 2017.20170226
Package-Manager: Portage-2.3.3, Repoman-2.3.2
- Loading branch information
Showing
2 changed files
with
145 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
DIST tbb-2017.20170226.tar.gz 2856407 SHA256 780baf0ad520f23b54dd20dc97bf5aae4bc562019e0a70f53bfc4c1afec6e545 SHA512 d07eeca53138432a4ac20145169907f5271e234bedfb53e0eabbed2b6fafaecdc0a2ad7bdbead205993f822e7c415233cce9afd7575d366c17a117d5cc971a65 WHIRLPOOL 18095aa7fec6a6766f9d8456c34a346bc51c2525263f03ae00f6a37899cafea0b83d67fd199372983561543f197f797b50f99966ea24591114958ff115e80b6f | ||
DIST tbb2017_20161128oss_src.tgz 2965854 SHA256 c009166233c8ea0e34530a1c5f870b79314316d19e6876b37a7e7c854080a540 SHA512 3c48ce196d2d3557e86cea7ede9dea456bbaeb29dbed34210f99c6f380406403a6056ccfa3d5befe6b29c4f8a9ee58ca6da545249cf4ec4ec85b463e04e4518c WHIRLPOOL d1ce8d07ac002c617afa7c0aa1d5cad41928a6eefd064a744b4efdd0192dd310ad8cb32b949858a7c2c44211477deffc05dbd65e8101184d4cae26744143b922 | ||
DIST tbb43_20150611oss_src.tgz 2757631 SHA256 221f85fe64e11c9638e43b3c57d5750c26683905fc90827c0bcfefdb286e79c9 SHA512 83d5d827706b774ef5cd6df8082e5d7f48683388684423bb40565dfc25892fc2e57c382f719b78087d83e51edb3f7f7215f33d8b5039b55c32788d80efa6e0b8 WHIRLPOOL 8e98162b2307c759fb26923d76ab784dea81e166c8bf5323869d234da59641c333e5ae30b4a224bccbf20d4f5f6b75c658589f519a165ea3ad7658322f148c72 | ||
DIST tbb44_20160803oss_src.tgz 2874050 SHA256 23fb69a16b5daccef8e1ffe194d1dd5c6b1d225c0de87e54bc30c958aa244fb0 SHA512 01b1dcdaffa96c3d503e44d7b236b1115f419c122dab0f40de4c9dc90db315a1f3755cc91adf9df91d5d31d8927df115230db94cf175edac09ae438b46374a92 WHIRLPOOL 2b93bfabc0eadb1a10ad34f1a475322a04554bd8b5e4ac90505ec285f7727a537249a045f7a464fb3c266f9ece6c83fa259a099cc052da16cdd6c05cd9a1fb42 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,144 @@ | ||
# Copyright 1999-2017 Gentoo Foundation | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=6 | ||
|
||
inherit eutils flag-o-matic multilib-minimal toolchain-funcs versionator | ||
|
||
PV1="$(get_version_component_range 1)" | ||
PV2=5 | ||
MY_PV="${PV1}_U${PV2}" | ||
|
||
DESCRIPTION="High level abstract threading library" | ||
HOMEPAGE="http://www.threadingbuildingblocks.org/" | ||
SRC_URI="https://github.com/01org/${PN}/archive/${MY_PV}.tar.gz -> ${P}.tar.gz" | ||
LICENSE="Apache-2.0" | ||
SLOT="0" | ||
KEYWORDS="~alpha ~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux" | ||
IUSE="debug doc examples" | ||
|
||
DEPEND="" | ||
RDEPEND="${DEPEND}" | ||
S="${WORKDIR}/${PN}-${MY_PV}" | ||
|
||
PATCHES=( | ||
"${FILESDIR}"/${PN}-2017.20161128-underlinking.patch | ||
"${FILESDIR}"/${PN}-2017.20161128-build.patch | ||
) | ||
|
||
src_prepare() { | ||
default | ||
|
||
find include -name \*.html -delete || die | ||
|
||
# Give it a soname on FreeBSD | ||
echo 'LIB_LINK_FLAGS += -Wl,-soname=$(BUILDING_LIBRARY)' >> build/FreeBSD.gcc.inc | ||
# Set proper versionning on FreeBSD | ||
sed -i -e '/.DLL =/s/$/.1/' build/FreeBSD.inc || die | ||
|
||
use debug || sed -i -e '/_debug/d' Makefile | ||
} | ||
|
||
multilib_src_configure() { | ||
# pc files are for debian and fedora compatibility | ||
# some deps use them | ||
cat <<-EOF > ${PN}.pc.template | ||
prefix=${EPREFIX}/usr | ||
libdir=\${prefix}/$(get_libdir) | ||
includedir=\${prefix}/include | ||
Name: ${PN} | ||
Description: ${DESCRIPTION} | ||
Version: ${PV} | ||
URL: ${HOMEPAGE} | ||
Cflags: -I\${includedir} | ||
EOF | ||
cp ${PN}.pc.template ${PN}.pc || die | ||
cat <<-EOF >> ${PN}.pc | ||
Libs: -L\${libdir} -ltbb | ||
Libs.private: -lm -lrt | ||
EOF | ||
cp ${PN}.pc.template ${PN}malloc.pc || die | ||
cat <<-EOF >> ${PN}malloc.pc | ||
Libs: -L\${libdir} -ltbbmalloc | ||
Libs.private: -lm -lrt | ||
EOF | ||
cp ${PN}.pc.template ${PN}malloc_proxy.pc || die | ||
cat <<-EOF >> ${PN}malloc_proxy.pc | ||
Libs: -L\${libdir} -ltbbmalloc_proxy | ||
Libs.private: -lrt | ||
Requires: tbbmalloc | ||
EOF | ||
} | ||
|
||
local_src_compile() { | ||
cd "${S}" | ||
|
||
local comp arch | ||
|
||
case ${MULTILIB_ABI_FLAG} in | ||
abi_x86_64) arch=x86_64 ;; | ||
abi_x86_32) arch=ia32 ;; | ||
abi_ppc_64) arch=ppc64 ;; | ||
abi_ppc_32) arch=ppc32 ;; | ||
esac | ||
|
||
case "$(tc-getCXX)" in | ||
*g++*) comp="gcc" ;; | ||
*ic*c) comp="icc" ;; | ||
*clang*) comp="clang" ;; | ||
*) die "compiler $(tc-getCXX) not supported by build system" ;; | ||
esac | ||
|
||
CXX="$(tc-getCXX)" \ | ||
CC="$(tc-getCC)" \ | ||
AS="$(tc-getAS)" \ | ||
arch=${arch} \ | ||
CPLUS_FLAGS="${CXXFLAGS}" \ | ||
emake compiler=${comp} work_dir="${BUILD_DIR}" tbb_root="${S}" $@ | ||
} | ||
|
||
multilib_src_compile() { | ||
local_src_compile tbb tbbmalloc | ||
} | ||
|
||
multilib_src_test() { | ||
CXXFLAGS="${CXXFLAGS} -fabi-version=4" \ | ||
local_src_compile -j1 test | ||
} | ||
|
||
multilib_src_install() { | ||
local bt | ||
local buildtypes | ||
if use debug ; then | ||
buildtypes="release debug" | ||
else | ||
buildtypes="release" | ||
fi | ||
for bt in ${buildtypes}; do | ||
cd "${BUILD_DIR}_${bt}" || die | ||
local l | ||
for l in $(find . -name lib\*.so.\*); do | ||
dolib.so ${l} | ||
local bl=$(basename ${l}) | ||
dosym ${bl} /usr/$(get_libdir)/${bl%.*} | ||
done | ||
done | ||
|
||
cd "${BUILD_DIR}" || die | ||
insinto /usr/$(get_libdir)/pkgconfig | ||
doins *.pc | ||
} | ||
|
||
multilib_src_install_all() { | ||
doheader -r include/* | ||
|
||
dodoc README CHANGES doc/Release_Notes.txt | ||
use doc && dohtml -r doc/html/* | ||
|
||
if use examples ; then | ||
insinto /usr/share/doc/${PF}/examples/build | ||
doins build/*.inc | ||
insinto /usr/share/doc/${PF}/examples | ||
doins -r examples | ||
fi | ||
} |