From 8aa6e7bc47b527fa47300716b0f4105beca8dffc Mon Sep 17 00:00:00 2001 From: "Alex Xu (Hello71)" Date: Sun, 4 Sep 2022 21:18:52 -0400 Subject: dev-cpp/tbb-compat: new package --- dev-cpp/tbb-compat/Manifest | 1 + dev-cpp/tbb-compat/metadata.xml | 14 ++++++ dev-cpp/tbb-compat/tbb-compat-2020.3.ebuild | 72 +++++++++++++++++++++++++++++ 3 files changed, 87 insertions(+) create mode 100644 dev-cpp/tbb-compat/Manifest create mode 100644 dev-cpp/tbb-compat/metadata.xml create mode 100644 dev-cpp/tbb-compat/tbb-compat-2020.3.ebuild diff --git a/dev-cpp/tbb-compat/Manifest b/dev-cpp/tbb-compat/Manifest new file mode 100644 index 0000000..d2d3f1d --- /dev/null +++ b/dev-cpp/tbb-compat/Manifest @@ -0,0 +1 @@ +DIST tbb-2020.3.tar.gz 2639788 BLAKE2B 3e92bccdc8179fc049379ccbb8ad7f615623177abc61d813b1a601020c345137bfd7d4c4600cf5b0d587e5ebef677635c3c8124d06b05fdd3325128ed8c9f84a SHA512 04c4b5501418792827190691d03d20d4dc1fd3cbbcf459a4d40c5c2281d964e658f31f133ad3907b78e17ed04f4ff16728ed89487ed0ce2cb239f23feb34bd87 diff --git a/dev-cpp/tbb-compat/metadata.xml b/dev-cpp/tbb-compat/metadata.xml new file mode 100644 index 0000000..fc9202e --- /dev/null +++ b/dev-cpp/tbb-compat/metadata.xml @@ -0,0 +1,14 @@ + + + + + The Intel Threading Building Blocks is a library that helps you + leverage multi-core processor performance without having to be a + threading expert. It represents a higher-level, task-based + parallelism that abstracts platform details and threading mechanism + for performance and scalability. + + + intel/tbb + + diff --git a/dev-cpp/tbb-compat/tbb-compat-2020.3.ebuild b/dev-cpp/tbb-compat/tbb-compat-2020.3.ebuild new file mode 100644 index 0000000..4d63e4a --- /dev/null +++ b/dev-cpp/tbb-compat/tbb-compat-2020.3.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit multilib-minimal toolchain-funcs + +MY_PV="$(ver_cut 1)_U$(ver_cut 2)" + +DESCRIPTION="High level abstract threading library" +HOMEPAGE="https://www.threadingbuildingblocks.org" +SRC_URI="https://github.com/intel/tbb/archive/${MY_PV}.tar.gz -> tbb-${PV}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="2" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND="" +RDEPEND="!=dev-cpp/tbb-2020.3" +S="${WORKDIR}/oneTBB-${MY_PV}" + +src_prepare() { + default + + # 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 +} + +local_src_compile() { + 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 + *clang*) comp="clang" ;; + *g++*) comp="gcc" ;; + *ic*c) comp="icc" ;; + *) die "compiler $(tc-getCXX) not supported by build system" ;; + esac + + tc-export AS CC CXX + + arch=${arch} \ + CPLUS_FLAGS="${CXXFLAGS}" \ + emake -C "${S}" compiler=${comp} work_dir="${BUILD_DIR}" tbb_root="${S}" cfg=release $@ +} + +multilib_src_compile() { + local_src_compile tbb tbbmalloc +} + +multilib_src_test() { + local_src_compile test +} + +multilib_src_install() { + cd "${BUILD_DIR}_release" || die + local l + for l in $(find . -name lib\*$(get_libname \*)); do + dolib.so ${l} + local bl=$(basename ${l}) + dosym ${bl} /usr/$(get_libdir)/${bl%%.*}$(get_libname) + done +} -- cgit v1.2.3-70-g09d2