summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Xu (Hello71) <alex_y_xu@yahoo.ca>2022-09-04 21:18:52 -0400
committerAlex Xu (Hello71) <alex_y_xu@yahoo.ca>2022-09-04 21:18:52 -0400
commit8aa6e7bc47b527fa47300716b0f4105beca8dffc (patch)
tree74a716b30af2d4280c00bf914c3ecaa0278b72d2
parent85e8f469223a21a53666e19cdb6a84f214397a0d (diff)
downloadgentoo-overlay-8aa6e7bc47b527fa47300716b0f4105beca8dffc.tar.xz
gentoo-overlay-8aa6e7bc47b527fa47300716b0f4105beca8dffc.zip
dev-cpp/tbb-compat: new package
-rw-r--r--dev-cpp/tbb-compat/Manifest1
-rw-r--r--dev-cpp/tbb-compat/metadata.xml14
-rw-r--r--dev-cpp/tbb-compat/tbb-compat-2020.3.ebuild72
3 files changed, 87 insertions, 0 deletions
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 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <longdescription lang="en">
+ 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.
+ </longdescription>
+ <upstream>
+ <remote-id type="github">intel/tbb</remote-id>
+ </upstream>
+</pkgmetadata>
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
+}