summaryrefslogtreecommitdiff
path: root/dev-cpp/tbb
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-cpp/tbb
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-cpp/tbb')
-rw-r--r--dev-cpp/tbb/Manifest17
-rw-r--r--dev-cpp/tbb/files/tbb-2017.20161128-build.patch193
-rw-r--r--dev-cpp/tbb/files/tbb-2017.20161128-underlinking.patch15
-rw-r--r--dev-cpp/tbb/files/tbb-4.0.297-underlinking.patch20
-rw-r--r--dev-cpp/tbb/files/tbb-4.3.20150611-build.patch196
-rw-r--r--dev-cpp/tbb/files/tbb-4.4.20160803-build.patch193
-rw-r--r--dev-cpp/tbb/files/tbb-4.4.20160803-underlinking.patch15
-rw-r--r--dev-cpp/tbb/metadata.xml18
-rw-r--r--dev-cpp/tbb/tbb-2017.20161128.ebuild144
-rw-r--r--dev-cpp/tbb/tbb-2017.20170226.ebuild144
-rw-r--r--dev-cpp/tbb/tbb-4.3.20150611.ebuild131
-rw-r--r--dev-cpp/tbb/tbb-4.4.20160803.ebuild145
12 files changed, 1231 insertions, 0 deletions
diff --git a/dev-cpp/tbb/Manifest b/dev-cpp/tbb/Manifest
new file mode 100644
index 000000000000..c6ca2b505239
--- /dev/null
+++ b/dev-cpp/tbb/Manifest
@@ -0,0 +1,17 @@
+AUX tbb-2017.20161128-build.patch 5103 SHA256 439ae29b4353bb3f963510fc4d89605702d365faf1e121d50b40a43fdae2a390 SHA512 875dc2aa87562e0701840e08a3414dfea4a22eed999682395a6e568d351c6f7243b435b4664e80004b761c1721ecabf09f1732d4df7d10e0843338762a8ebbac WHIRLPOOL 726fe1a23db715fd86c8c700d4a1a0936a2f868c3aead73b70401a54b862262703ae38f6134e3476b1ede06ba8ceaed7550e1279a4c02cceeaf78bfd7f562ff0
+AUX tbb-2017.20161128-underlinking.patch 389 SHA256 17fa3528ad54755c75bb7269b03769a07451cea621c9ee2393118f6c2de2f6d8 SHA512 bfd3b9d5221a89a120e115447a9aa653e93a208422c68c8cc74a672f42037fd1af3dc755480d746570f2c5dbeb173650d9b4acfb38aaec5d3c3feea6c2232af1 WHIRLPOOL fe0fb571ba8cea14680452869c08a7ea08609aa9c2cbb1fbb9f23760a9fa1899a3661e955b15a064d36549a6c45f250eea29e78436f2e560e727f4b93844cf3d
+AUX tbb-4.0.297-underlinking.patch 475 SHA256 489473e0f30a53d13bd508d3d720df2e6db24b1348470febd162d0834bf6a3de SHA512 26103f87299e56e08d404e0cdda47f3b2be89e770ea12e84ee7f681050364e674aca1ba8326b81db0a73c2f53e973b89b97af3f36c7e762d4699767481b64486 WHIRLPOOL 10e6e3f886dc1a8638f1788254e38f7f92ebbd9deab645e215e9abecfe871e8918de490dc0612de276829e75571db82bd04fe1a8606a50e5f2a6b938821a25fe
+AUX tbb-4.3.20150611-build.patch 5291 SHA256 048cb0531e39f4cfe7044a48fe1760dd4d78f8da2e0c7a71478e9306ef9b147a SHA512 1648810b9ea89a904eaf2d15168dbf51abefb8ad337aad561f4b93691163ffb9bab52ade91ed71abc2305a60294c33254603ea60f4255fcccf92a2906d4c09a6 WHIRLPOOL d99b55ae96ebbbbc8a5a73668d797dabcc59bd0c662336bac26af9c1871f206e8b182bff3d8a48252476c613c0b73026e49db1f7b9f7975a66564253f0fbd9ea
+AUX tbb-4.4.20160803-build.patch 5101 SHA256 e881f3ddbac23afe39b12e32bf4589e000eb0988d6d8ca4197af45ca225ae2bf SHA512 472df5a7cf1a4640f6e945146363351efe3ae26e499757571ddefcb6e5fef1c43a299ede9874f221674388b94f2bbe2bf88449d503da21adab7d030ec6792dce WHIRLPOOL 590993f7a0cb1876f3e9042f16c20f83c0ba3a1406a50431a04db846e68cad21d0f1784dfd912699b4c4fcc5f9604567e58dbb35abf5ed6bbb9eb3d7f1144188
+AUX tbb-4.4.20160803-underlinking.patch 389 SHA256 17fa3528ad54755c75bb7269b03769a07451cea621c9ee2393118f6c2de2f6d8 SHA512 bfd3b9d5221a89a120e115447a9aa653e93a208422c68c8cc74a672f42037fd1af3dc755480d746570f2c5dbeb173650d9b4acfb38aaec5d3c3feea6c2232af1 WHIRLPOOL fe0fb571ba8cea14680452869c08a7ea08609aa9c2cbb1fbb9f23760a9fa1899a3661e955b15a064d36549a6c45f250eea29e78436f2e560e727f4b93844cf3d
+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
+EBUILD tbb-2017.20161128.ebuild 3299 SHA256 18082433a84093dce0b5b64efaf2cc3e960738cdd4fcb17bf84a4b7cf6a26e8c SHA512 7744c1f7c80d995f251c0a487ddd2917f4f18f84ad281ea77e84098678e14e80ad1c234c99d85af61077c317b2c3c03c5630beddb5dba3cb0d5144c0d23568ef WHIRLPOOL 42b5680f7775f0159cf4fd84985962c609747db14b0296898fc50a48650bfc3e4bff9ffc92d6709d9cf6ae2993ab5087367a6d4e4e1d5a5400a5f5956b404a1f
+EBUILD tbb-2017.20170226.ebuild 3291 SHA256 59e2b1b6e306adef9b1af98bd6be1cd11bb90b168d38718b79e199b985a92aac SHA512 10b737b34e47055fed9d400031b773cc9fee18b00f6f2af4617d7cea625b4ac9464534706ea72d71042be1293efe7b126d38562131c0c19209c881c01b8fda75 WHIRLPOOL 3741259dcdbd1ef10b52a25df340007ffd0af237597127d644003749a1549627aa4f2df94656a9bb2248a4e3d64667caf79aafad590ea0dc3f4c79562c361586
+EBUILD tbb-4.3.20150611.ebuild 3142 SHA256 351a4640b30e0c6052037bd6dbeb58f1a7ac30e9f240b67dfb68349c30cc056c SHA512 9f35df30d1641eca5adbf57cc99757cb80a25ed15dbf5aa9b8aff1163ccd5e67fb7ec0c47b1283f613d82b05e69da5cf7243a9d9dc55bd8be1bed7a1f0cf5bde WHIRLPOOL a3e26ae3130814aa6a047849c2275fa432ef49b768963b94e90652092f269dc981d6c92c317b536ed5fe7750cd47c8f9d75e5aa9150aa5cefed88a656e7406fc
+EBUILD tbb-4.4.20160803.ebuild 3359 SHA256 1a9607d0442817b58e1952a2ff56170ee2e2f74eeda02ab3e4a6bb2b6b8df5ad SHA512 481bcf13630975ed8c5c5c08f3dc952fda80d6f40f61b7153414a6e9f06ab97dbcd22a8ba90e67dcf18ed5b6851e639498026b8db2f027e0913462cc52fa2918 WHIRLPOOL a40bb5fc09ac0ca59d7d83379ef4c611c3a868727abc7a2112bbac867d6c28da2a00e9bf2fbd68c28b0e85b000f36dc6b4eddee8dd6ccccfde2cee605531c68f
+MISC ChangeLog 4561 SHA256 48b2b3080ad49508fb74f5641fb1a5c6eed3ee9a126e8acd973af8fa01231f92 SHA512 2124acbde2eaffa923a2c6b7ed97f4cd59fe0e5e6e6694e4f5bc2c58fb80787ed4078fa65440cbc25e2cfd7f61d07c768b6472743095e52bff3c884b23349d65 WHIRLPOOL d60aae799a3c7e0be9e69debcad47e44a1f3a69c4da745a8f46e5a17309f4798ad19c1c353cd14608be09bce7cf4b2dad925247970c8ddef2f0347be59093ea5
+MISC ChangeLog-2015 9605 SHA256 983718319f403f3a8c2491adc27c5305969abca0d2b0f865448065dce5b6f3ca SHA512 c44c4345ef7e3dc26db537f04b5d95d3ad2e17eda30a2c6ea94eac9d4213680724cd5dc094eb57c9c55796d7731cdafd0c88ed36bf0e54a26e9fc53f451c1054 WHIRLPOOL 2f5f594d55e6e8db91348950f2db010e6174421bab1df1ad1f2b3bbbdab751c6066260103406c24dbea4f5dc8f9f779fe7369f8f37418a0122ad640adec53b51
+MISC metadata.xml 687 SHA256 2e2faab2d4a6eae28c184b9248b9c949e27b55eabb66a2e6123fcf55c6244cbc SHA512 bfdebc9e52c9c46424854b519e8ff60f7b473e33189235a50e1110af1f8264c2ad2b4f71110be1147387491fc078ec6c9e451347b47f69d0f2b15e60ad2e9a0b WHIRLPOOL a79822acb6f6328eb21e9c90bc5eef092d98fa892decb5ba8058b407bd0e094ff6bc4aa087c92c407191180980706ea8c13bed010ca51fe3237f7efb09152c1a
diff --git a/dev-cpp/tbb/files/tbb-2017.20161128-build.patch b/dev-cpp/tbb/files/tbb-2017.20161128-build.patch
new file mode 100644
index 000000000000..0806d6a522b7
--- /dev/null
+++ b/dev-cpp/tbb/files/tbb-2017.20161128-build.patch
@@ -0,0 +1,193 @@
+diff --git a/build/FreeBSD.gcc.inc b/build/FreeBSD.gcc.inc
+index e93f8f4..2b43c51 100644
+--- a/build/FreeBSD.gcc.inc
++++ b/build/FreeBSD.gcc.inc
+@@ -28,8 +28,8 @@ WARNING_KEY = -Wall
+ DYLIB_KEY = -shared
+ WARNING_SUPPRESS = -Wno-parentheses
+
+-CPLUS = g++
+-CONLY = gcc
++CPLUS = $(CXX)
++CONLY = $(CC)
+ LIB_LINK_FLAGS = -shared
+ LIBS = -lpthread
+ C_FLAGS = $(CPLUS_FLAGS)
+@@ -42,7 +42,7 @@ ifneq (,$(shell gcc -dumpversion | egrep "^([6-9])"))
+ endif
+
+ ifeq ($(cfg), release)
+- CPLUS_FLAGS = -g -O2 -DUSE_PTHREAD
++ CPLUS_FLAGS = -g -DUSE_PTHREAD
+ endif
+ ifeq ($(cfg), debug)
+ CPLUS_FLAGS = -DTBB_USE_DEBUG -g -O0 -DUSE_PTHREAD
+@@ -59,22 +59,12 @@ ifeq (ia64,$(arch))
+ CPLUS_FLAGS += $(PIC_KEY)
+ endif
+
+-ifeq (intel64,$(arch))
+- CPLUS_FLAGS += -m64
+- LIB_LINK_FLAGS += -m64
+-endif
+-
+-ifeq (ia32,$(arch))
+- CPLUS_FLAGS += -m32
+- LIB_LINK_FLAGS += -m32
+-endif
+-
+ #------------------------------------------------------------------------------
+ # Setting assembler data.
+ #------------------------------------------------------------------------------
+ ASSEMBLY_SOURCE=$(arch)-gas
+ ifeq (ia64,$(arch))
+- ASM=as
++ ASM=$(AS)
+ TBB_ASM.OBJ = atomic_support.o lock_byte.o log2.o pause.o
+ MALLOC_ASM.OBJ = atomic_support.o lock_byte.o pause.o
+ endif
+diff --git a/build/linux.clang.inc b/build/linux.clang.inc
+index 237caae..8d6914e 100644
+--- a/build/linux.clang.inc
++++ b/build/linux.clang.inc
+@@ -31,15 +31,15 @@ DYLIB_KEY = -shared
+ EXPORT_KEY = -Wl,--version-script,
+ LIBDL = -ldl
+
+-CPLUS = clang++
+-CONLY = clang
++CPLUS := $(CXX)
++CONLY := $(CC)
+ LIB_LINK_FLAGS = $(DYLIB_KEY) -Wl,-soname=$(BUILDING_LIBRARY)
+ LIBS += -lpthread -lrt
+ LINK_FLAGS = -Wl,-rpath-link=. -rdynamic
+ C_FLAGS = $(CPLUS_FLAGS)
+
+ ifeq ($(cfg), release)
+- CPLUS_FLAGS = $(ITT_NOTIFY) -g -O2 -DUSE_PTHREAD
++ CPLUS_FLAGS = $(ITT_NOTIFY) -g -DUSE_PTHREAD
+ endif
+ ifeq ($(cfg), debug)
+ CPLUS_FLAGS = -DTBB_USE_DEBUG $(ITT_NOTIFY) -g -O0 -DUSE_PTHREAD
+@@ -60,24 +60,10 @@ MALLOC_ASM.OBJ=
+
+ ifeq (intel64,$(arch))
+ ITT_NOTIFY = -DDO_ITT_NOTIFY
+- CPLUS_FLAGS += -m64
+- LIB_LINK_FLAGS += -m64
+ endif
+
+ ifeq (ia32,$(arch))
+ ITT_NOTIFY = -DDO_ITT_NOTIFY
+- CPLUS_FLAGS += -m32 -march=pentium4
+- LIB_LINK_FLAGS += -m32
+-endif
+-
+-ifeq (ppc64,$(arch))
+- CPLUS_FLAGS += -m64
+- LIB_LINK_FLAGS += -m64
+-endif
+-
+-ifeq (ppc32,$(arch))
+- CPLUS_FLAGS += -m32
+- LIB_LINK_FLAGS += -m32
+ endif
+
+ ifeq (bg,$(arch))
+@@ -89,12 +75,6 @@ endif
+ # Setting assembler data.
+ #------------------------------------------------------------------------------
+ ASM = as
+-ifeq (intel64,$(arch))
+- ASM_FLAGS += --64
+-endif
+-ifeq (ia32,$(arch))
+- ASM_FLAGS += --32
+-endif
+ ifeq ($(cfg),debug)
+ ASM_FLAGS += -g
+ endif
+diff --git a/build/linux.gcc.inc b/build/linux.gcc.inc
+index b7ed0c5..a8e8f85 100644
+--- a/build/linux.gcc.inc
++++ b/build/linux.gcc.inc
+@@ -32,12 +32,12 @@ DYLIB_KEY = -shared
+ EXPORT_KEY = -Wl,--version-script,
+ LIBDL = -ldl
+
+-CPLUS = g++
+-CONLY = gcc
++CPLUS := $(CXX)
++CONLY := $(CC)
+ LIB_LINK_FLAGS = $(DYLIB_KEY) -Wl,-soname=$(BUILDING_LIBRARY)
+ LIBS += -lpthread -lrt
+ LINK_FLAGS = -Wl,-rpath-link=. -rdynamic
+-C_FLAGS = $(CPLUS_FLAGS)
++C_FLAGS := $(CPLUS_FLAGS)
+
+ # gcc 4.2 and higher support OpenMP
+ ifneq (,$(shell gcc -dumpversion | egrep "^(4\.[2-9]|[5-9])"))
+@@ -68,7 +68,7 @@ ifneq (,$(shell gcc -dumpversion | egrep "^([6-9])"))
+ endif
+
+ ifeq ($(cfg), release)
+- CPLUS_FLAGS = $(ITT_NOTIFY) -g -O2 -DUSE_PTHREAD
++ CPLUS_FLAGS = $(ITT_NOTIFY) -g -DUSE_PTHREAD
+ endif
+ ifeq ($(cfg), debug)
+ CPLUS_FLAGS = -DTBB_USE_DEBUG $(ITT_NOTIFY) -g -O0 -DUSE_PTHREAD
+@@ -84,24 +84,12 @@ endif
+
+ ifeq (intel64,$(arch))
+ ITT_NOTIFY = -DDO_ITT_NOTIFY
+- CPLUS_FLAGS += -m64 $(RTM_KEY)
+- LIB_LINK_FLAGS += -m64
++ CPLUS_FLAGS += $(RTM_KEY)
+ endif
+
+ ifeq (ia32,$(arch))
+ ITT_NOTIFY = -DDO_ITT_NOTIFY
+- CPLUS_FLAGS += -m32 -march=pentium4 $(RTM_KEY)
+- LIB_LINK_FLAGS += -m32
+-endif
+-
+-ifeq (ppc64,$(arch))
+- CPLUS_FLAGS += -m64
+- LIB_LINK_FLAGS += -m64
+-endif
+-
+-ifeq (ppc32,$(arch))
+- CPLUS_FLAGS += -m32
+- LIB_LINK_FLAGS += -m32
++ CPLUS_FLAGS += $(RTM_KEY)
+ endif
+
+ ifeq (bg,$(arch))
+@@ -109,12 +97,6 @@ ifeq (bg,$(arch))
+ CONLY = $(firstword $(notdir $(shell which powerpc{64,32,}-bg{z..a}-linux-gcc 2>/dev/null)))
+ endif
+
+-# for some gcc versions on Solaris, -m64 may imply V9, but perhaps not everywhere (TODO: verify)
+-ifeq (sparc,$(arch))
+- CPLUS_FLAGS += -mcpu=v9 -m64
+- LIB_LINK_FLAGS += -mcpu=v9 -m64
+-endif
+-
+ # automatically generate "IT" instructions when compiling for Thumb ISA
+ ifeq (armv7,$(arch))
+ CPLUS_FLAGS += -Wa,-mimplicit-it=thumb
+@@ -123,13 +105,7 @@ endif
+ #------------------------------------------------------------------------------
+ # Setting assembler data.
+ #------------------------------------------------------------------------------
+-ASM = as
+-ifeq (intel64,$(arch))
+- ASM_FLAGS += --64
+-endif
+-ifeq (ia32,$(arch))
+- ASM_FLAGS += --32
+-endif
++ASM := $(AS)
+ ifeq ($(cfg),debug)
+ ASM_FLAGS += -g
+ endif
diff --git a/dev-cpp/tbb/files/tbb-2017.20161128-underlinking.patch b/dev-cpp/tbb/files/tbb-2017.20161128-underlinking.patch
new file mode 100644
index 000000000000..5935017a325e
--- /dev/null
+++ b/dev-cpp/tbb/files/tbb-2017.20161128-underlinking.patch
@@ -0,0 +1,15 @@
+https://bugs.gentoo.org/show_bug.cgi?id=418447
+
+--- a/build/Makefile.test
++++ b/build/Makefile.test
+@@ -44,8 +44,8 @@
+ USE_PROXY_FLAG = $(DEFINE_KEY)HARNESS_USE_PROXY
+ CPLUS_FLAGS += $(USE_PROXY_FLAG)
+ LINK_TBB.LIB = $(PROXY.LIB)
+- LIBS += $(LIBDL)
+-endif
++endif
++LIBS += $(LIBDL)
+
+ TEST_SUFFIXES=secondary compiler_builtins pic
+ include $(tbb_root)/build/common_rules.inc
diff --git a/dev-cpp/tbb/files/tbb-4.0.297-underlinking.patch b/dev-cpp/tbb/files/tbb-4.0.297-underlinking.patch
new file mode 100644
index 000000000000..099bb39d2143
--- /dev/null
+++ b/dev-cpp/tbb/files/tbb-4.0.297-underlinking.patch
@@ -0,0 +1,20 @@
+From: Julian Ospald <hasufell@gentoo.org>
+Date: Thu May 31 21:37:47 UTC 2012
+Subject: build system
+
+fix underlinking in test phase
+wrt https://bugs.gentoo.org/show_bug.cgi?id=418447
+
+--- build/Makefile.test
++++ build/Makefile.test
+@@ -48,8 +48,8 @@
+ USE_PROXY_FLAG = $(DEFINE_KEY)HARNESS_USE_PROXY
+ CPLUS_FLAGS += $(USE_PROXY_FLAG)
+ LINK_TBB.LIB = $(PROXY.LIB)
+- LIBS += $(LIBDL)
+-endif
++endif
++LIBS += $(LIBDL)
+
+ include $(tbb_root)/build/common_rules.inc
+
diff --git a/dev-cpp/tbb/files/tbb-4.3.20150611-build.patch b/dev-cpp/tbb/files/tbb-4.3.20150611-build.patch
new file mode 100644
index 000000000000..42a8bae4640a
--- /dev/null
+++ b/dev-cpp/tbb/files/tbb-4.3.20150611-build.patch
@@ -0,0 +1,196 @@
+ build/FreeBSD.gcc.inc | 18 ++++--------------
+ build/linux.clang.inc | 26 +++-----------------------
+ build/linux.gcc.inc | 38 +++++++-------------------------------
+ 3 files changed, 14 insertions(+), 68 deletions(-)
+
+diff --git a/build/FreeBSD.gcc.inc b/build/FreeBSD.gcc.inc
+index 20f0027..8bbdeba 100644
+--- a/build/FreeBSD.gcc.inc
++++ b/build/FreeBSD.gcc.inc
+@@ -28,14 +28,14 @@ WARNING_KEY = -Wall
+ DYLIB_KEY = -shared
+ WARNING_SUPPRESS = -Wno-parentheses
+
+-CPLUS = g++
+-CONLY = gcc
++CPLUS = $(CXX)
++CONLY = $(CC)
+ LIB_LINK_FLAGS = -shared
+ LIBS = -lpthread
+ C_FLAGS = $(CPLUS_FLAGS)
+
+ ifeq ($(cfg), release)
+- CPLUS_FLAGS = -g -O2 -DUSE_PTHREAD
++ CPLUS_FLAGS = -g -DUSE_PTHREAD
+ endif
+ ifeq ($(cfg), debug)
+ CPLUS_FLAGS = -DTBB_USE_DEBUG -g -O0 -DUSE_PTHREAD
+@@ -52,22 +52,12 @@ ifeq (ia64,$(arch))
+ CPLUS_FLAGS += $(PIC_KEY)
+ endif
+
+-ifeq (intel64,$(arch))
+- CPLUS_FLAGS += -m64
+- LIB_LINK_FLAGS += -m64
+-endif
+-
+-ifeq (ia32,$(arch))
+- CPLUS_FLAGS += -m32
+- LIB_LINK_FLAGS += -m32
+-endif
+-
+ #------------------------------------------------------------------------------
+ # Setting assembler data.
+ #------------------------------------------------------------------------------
+ ASSEMBLY_SOURCE=$(arch)-gas
+ ifeq (ia64,$(arch))
+- ASM=as
++ ASM=$(AS)
+ TBB_ASM.OBJ = atomic_support.o lock_byte.o log2.o pause.o
+ MALLOC_ASM.OBJ = atomic_support.o lock_byte.o pause.o
+ endif
+diff --git a/build/linux.clang.inc b/build/linux.clang.inc
+index de9aee5..3a366f1 100644
+--- a/build/linux.clang.inc
++++ b/build/linux.clang.inc
+@@ -31,15 +31,15 @@ DYLIB_KEY = -shared
+ EXPORT_KEY = -Wl,--version-script,
+ LIBDL = -ldl
+
+-CPLUS = clang++
+-CONLY = clang
++CPLUS := $(CXX)
++CONLY := $(CC)
+ LIB_LINK_FLAGS = $(DYLIB_KEY) -Wl,-soname=$(BUILDING_LIBRARY)
+ LIBS += -lpthread -lrt
+ LINK_FLAGS = -Wl,-rpath-link=. -rdynamic
+ C_FLAGS = $(CPLUS_FLAGS)
+
+ ifeq ($(cfg), release)
+- CPLUS_FLAGS = $(ITT_NOTIFY) -g -O2 -DUSE_PTHREAD
++ CPLUS_FLAGS = $(ITT_NOTIFY) -g -DUSE_PTHREAD
+ endif
+ ifeq ($(cfg), debug)
+ CPLUS_FLAGS = -DTBB_USE_DEBUG $(ITT_NOTIFY) -g -O0 -DUSE_PTHREAD
+@@ -61,24 +61,10 @@ MALLOC_ASM.OBJ=
+
+ ifeq (intel64,$(arch))
+ ITT_NOTIFY = -DDO_ITT_NOTIFY
+- CPLUS_FLAGS += -m64
+- LIB_LINK_FLAGS += -m64
+ endif
+
+ ifeq (ia32,$(arch))
+ ITT_NOTIFY = -DDO_ITT_NOTIFY
+- CPLUS_FLAGS += -m32 -march=pentium4
+- LIB_LINK_FLAGS += -m32
+-endif
+-
+-ifeq (ppc64,$(arch))
+- CPLUS_FLAGS += -m64
+- LIB_LINK_FLAGS += -m64
+-endif
+-
+-ifeq (ppc32,$(arch))
+- CPLUS_FLAGS += -m32
+- LIB_LINK_FLAGS += -m32
+ endif
+
+ ifeq (bg,$(arch))
+@@ -90,12 +76,6 @@ endif
+ # Setting assembler data.
+ #------------------------------------------------------------------------------
+ ASM = as
+-ifeq (intel64,$(arch))
+- ASM_FLAGS += --64
+-endif
+-ifeq (ia32,$(arch))
+- ASM_FLAGS += --32
+-endif
+ ifeq ($(cfg),debug)
+ ASM_FLAGS += -g
+ endif
+diff --git a/build/linux.gcc.inc b/build/linux.gcc.inc
+index 4b7122b..e8ba711 100644
+--- a/build/linux.gcc.inc
++++ b/build/linux.gcc.inc
+@@ -32,12 +32,12 @@ DYLIB_KEY = -shared
+ EXPORT_KEY = -Wl,--version-script,
+ LIBDL = -ldl
+
+-CPLUS = g++
+-CONLY = gcc
++CPLUS := $(CXX)
++CONLY := $(CC)
+ LIB_LINK_FLAGS = $(DYLIB_KEY) -Wl,-soname=$(BUILDING_LIBRARY)
+ LIBS += -lpthread -lrt
+ LINK_FLAGS = -Wl,-rpath-link=. -rdynamic
+-C_FLAGS = $(CPLUS_FLAGS)
++C_FLAGS := $(CPLUS_FLAGS)
+ # gcc 4.4 and higher support -std=c++0x
+ ifneq (,$(shell gcc -dumpversion | egrep "^(4\.[4-9]|[5-9])"))
+ CPP11_FLAGS = -std=c++0x -D_TBB_CPP0X
+@@ -54,7 +54,7 @@ ifneq (,$(shell gcc -dumpversion | egrep "^4\.[8-9]"))
+ endif
+
+ ifeq ($(cfg), release)
+- CPLUS_FLAGS = $(ITT_NOTIFY) -g -O2 -DUSE_PTHREAD
++ CPLUS_FLAGS = $(ITT_NOTIFY) -g -DUSE_PTHREAD
+ endif
+ ifeq ($(cfg), debug)
+ CPLUS_FLAGS = -DTBB_USE_DEBUG $(ITT_NOTIFY) -g -O0 -DUSE_PTHREAD
+@@ -74,24 +74,12 @@ endif
+
+ ifeq (intel64,$(arch))
+ ITT_NOTIFY = -DDO_ITT_NOTIFY
+- CPLUS_FLAGS += -m64 $(RTM_KEY)
+- LIB_LINK_FLAGS += -m64
++ CPLUS_FLAGS += $(RTM_KEY)
+ endif
+
+ ifeq (ia32,$(arch))
+ ITT_NOTIFY = -DDO_ITT_NOTIFY
+- CPLUS_FLAGS += -m32 -march=pentium4 $(RTM_KEY)
+- LIB_LINK_FLAGS += -m32
+-endif
+-
+-ifeq (ppc64,$(arch))
+- CPLUS_FLAGS += -m64
+- LIB_LINK_FLAGS += -m64
+-endif
+-
+-ifeq (ppc32,$(arch))
+- CPLUS_FLAGS += -m32
+- LIB_LINK_FLAGS += -m32
++ CPLUS_FLAGS += $(RTM_KEY)
+ endif
+
+ ifeq (bg,$(arch))
+@@ -99,12 +87,6 @@ ifeq (bg,$(arch))
+ CONLY = $(firstword $(notdir $(shell which powerpc{64,32,}-bg{z..a}-linux-gcc 2>/dev/null)))
+ endif
+
+-# for some gcc versions on Solaris, -m64 may imply V9, but perhaps not everywhere (TODO: verify)
+-ifeq (sparc,$(arch))
+- CPLUS_FLAGS += -mcpu=v9 -m64
+- LIB_LINK_FLAGS += -mcpu=v9 -m64
+-endif
+-
+ # automatically generate "IT" instructions when compiling for Thumb ISA
+ ifeq (armv7,$(arch))
+ CPLUS_FLAGS += -Wa,-mimplicit-it=thumb
+@@ -113,13 +95,7 @@ endif
+ #------------------------------------------------------------------------------
+ # Setting assembler data.
+ #------------------------------------------------------------------------------
+-ASM = as
+-ifeq (intel64,$(arch))
+- ASM_FLAGS += --64
+-endif
+-ifeq (ia32,$(arch))
+- ASM_FLAGS += --32
+-endif
++ASM := $(AS)
+ ifeq ($(cfg),debug)
+ ASM_FLAGS += -g
+ endif
diff --git a/dev-cpp/tbb/files/tbb-4.4.20160803-build.patch b/dev-cpp/tbb/files/tbb-4.4.20160803-build.patch
new file mode 100644
index 000000000000..9c66c132fffa
--- /dev/null
+++ b/dev-cpp/tbb/files/tbb-4.4.20160803-build.patch
@@ -0,0 +1,193 @@
+diff --git a/build/FreeBSD.gcc.inc b/build/FreeBSD.gcc.inc
+index dc22ca3..65dfb6e 100644
+--- a/build/FreeBSD.gcc.inc
++++ b/build/FreeBSD.gcc.inc
+@@ -28,8 +28,8 @@ WARNING_KEY = -Wall
+ DYLIB_KEY = -shared
+ WARNING_SUPPRESS = -Wno-parentheses
+
+-CPLUS = g++
+-CONLY = gcc
++CPLUS = $(CXX)
++CONLY = $(CC)
+ LIB_LINK_FLAGS = -shared
+ LIBS = -lpthread
+ C_FLAGS = $(CPLUS_FLAGS)
+@@ -42,7 +42,7 @@ ifneq (,$(shell gcc -dumpversion | egrep "^([6-9])"))
+ endif
+
+ ifeq ($(cfg), release)
+- CPLUS_FLAGS = -g -O2 -DUSE_PTHREAD
++ CPLUS_FLAGS = -g -DUSE_PTHREAD
+ endif
+ ifeq ($(cfg), debug)
+ CPLUS_FLAGS = -DTBB_USE_DEBUG -g -O0 -DUSE_PTHREAD
+@@ -59,22 +59,12 @@ ifeq (ia64,$(arch))
+ CPLUS_FLAGS += $(PIC_KEY)
+ endif
+
+-ifeq (intel64,$(arch))
+- CPLUS_FLAGS += -m64
+- LIB_LINK_FLAGS += -m64
+-endif
+-
+-ifeq (ia32,$(arch))
+- CPLUS_FLAGS += -m32
+- LIB_LINK_FLAGS += -m32
+-endif
+-
+ #------------------------------------------------------------------------------
+ # Setting assembler data.
+ #------------------------------------------------------------------------------
+ ASSEMBLY_SOURCE=$(arch)-gas
+ ifeq (ia64,$(arch))
+- ASM=as
++ ASM=$(AS)
+ TBB_ASM.OBJ = atomic_support.o lock_byte.o log2.o pause.o
+ MALLOC_ASM.OBJ = atomic_support.o lock_byte.o pause.o
+ endif
+diff --git a/build/linux.clang.inc b/build/linux.clang.inc
+index fc8d7de..21ad5d4 100644
+--- a/build/linux.clang.inc
++++ b/build/linux.clang.inc
+@@ -31,15 +31,15 @@ DYLIB_KEY = -shared
+ EXPORT_KEY = -Wl,--version-script,
+ LIBDL = -ldl
+
+-CPLUS = clang++
+-CONLY = clang
++CPLUS := $(CXX)
++CONLY := $(CC)
+ LIB_LINK_FLAGS = $(DYLIB_KEY) -Wl,-soname=$(BUILDING_LIBRARY)
+ LIBS += -lpthread -lrt
+ LINK_FLAGS = -Wl,-rpath-link=. -rdynamic
+ C_FLAGS = $(CPLUS_FLAGS)
+
+ ifeq ($(cfg), release)
+- CPLUS_FLAGS = $(ITT_NOTIFY) -g -O2 -DUSE_PTHREAD
++ CPLUS_FLAGS = $(ITT_NOTIFY) -g -DUSE_PTHREAD
+ endif
+ ifeq ($(cfg), debug)
+ CPLUS_FLAGS = -DTBB_USE_DEBUG $(ITT_NOTIFY) -g -O0 -DUSE_PTHREAD
+@@ -55,24 +55,10 @@ MALLOC_ASM.OBJ=
+
+ ifeq (intel64,$(arch))
+ ITT_NOTIFY = -DDO_ITT_NOTIFY
+- CPLUS_FLAGS += -m64
+- LIB_LINK_FLAGS += -m64
+ endif
+
+ ifeq (ia32,$(arch))
+ ITT_NOTIFY = -DDO_ITT_NOTIFY
+- CPLUS_FLAGS += -m32 -march=pentium4
+- LIB_LINK_FLAGS += -m32
+-endif
+-
+-ifeq (ppc64,$(arch))
+- CPLUS_FLAGS += -m64
+- LIB_LINK_FLAGS += -m64
+-endif
+-
+-ifeq (ppc32,$(arch))
+- CPLUS_FLAGS += -m32
+- LIB_LINK_FLAGS += -m32
+ endif
+
+ ifeq (bg,$(arch))
+@@ -84,12 +70,6 @@ endif
+ # Setting assembler data.
+ #------------------------------------------------------------------------------
+ ASM = as
+-ifeq (intel64,$(arch))
+- ASM_FLAGS += --64
+-endif
+-ifeq (ia32,$(arch))
+- ASM_FLAGS += --32
+-endif
+ ifeq ($(cfg),debug)
+ ASM_FLAGS += -g
+ endif
+diff --git a/build/linux.gcc.inc b/build/linux.gcc.inc
+index f9b483d..1e69789 100644
+--- a/build/linux.gcc.inc
++++ b/build/linux.gcc.inc
+@@ -32,12 +32,12 @@ DYLIB_KEY = -shared
+ EXPORT_KEY = -Wl,--version-script,
+ LIBDL = -ldl
+
+-CPLUS = g++
+-CONLY = gcc
++CPLUS := $(CXX)
++CONLY := $(CC)
+ LIB_LINK_FLAGS = $(DYLIB_KEY) -Wl,-soname=$(BUILDING_LIBRARY)
+ LIBS += -lpthread -lrt
+ LINK_FLAGS = -Wl,-rpath-link=. -rdynamic
+-C_FLAGS = $(CPLUS_FLAGS)
++C_FLAGS := $(CPLUS_FLAGS)
+
+ # gcc 4.2 and higher support OpenMP
+ ifneq (,$(shell gcc -dumpversion | egrep "^(4\.[2-9]|[5-9])"))
+@@ -57,7 +57,7 @@ ifneq (,$(shell gcc -dumpversion | egrep "^([6-9])"))
+ endif
+
+ ifeq ($(cfg), release)
+- CPLUS_FLAGS = $(ITT_NOTIFY) -g -O2 -DUSE_PTHREAD
++ CPLUS_FLAGS = $(ITT_NOTIFY) -g -DUSE_PTHREAD
+ endif
+ ifeq ($(cfg), debug)
+ CPLUS_FLAGS = -DTBB_USE_DEBUG $(ITT_NOTIFY) -g -O0 -DUSE_PTHREAD
+@@ -73,24 +73,12 @@ endif
+
+ ifeq (intel64,$(arch))
+ ITT_NOTIFY = -DDO_ITT_NOTIFY
+- CPLUS_FLAGS += -m64 $(RTM_KEY)
+- LIB_LINK_FLAGS += -m64
++ CPLUS_FLAGS += $(RTM_KEY)
+ endif
+
+ ifeq (ia32,$(arch))
+ ITT_NOTIFY = -DDO_ITT_NOTIFY
+- CPLUS_FLAGS += -m32 -march=pentium4 $(RTM_KEY)
+- LIB_LINK_FLAGS += -m32
+-endif
+-
+-ifeq (ppc64,$(arch))
+- CPLUS_FLAGS += -m64
+- LIB_LINK_FLAGS += -m64
+-endif
+-
+-ifeq (ppc32,$(arch))
+- CPLUS_FLAGS += -m32
+- LIB_LINK_FLAGS += -m32
++ CPLUS_FLAGS += $(RTM_KEY)
+ endif
+
+ ifeq (bg,$(arch))
+@@ -98,12 +86,6 @@ ifeq (bg,$(arch))
+ CONLY = $(firstword $(notdir $(shell which powerpc{64,32,}-bg{z..a}-linux-gcc 2>/dev/null)))
+ endif
+
+-# for some gcc versions on Solaris, -m64 may imply V9, but perhaps not everywhere (TODO: verify)
+-ifeq (sparc,$(arch))
+- CPLUS_FLAGS += -mcpu=v9 -m64
+- LIB_LINK_FLAGS += -mcpu=v9 -m64
+-endif
+-
+ # automatically generate "IT" instructions when compiling for Thumb ISA
+ ifeq (armv7,$(arch))
+ CPLUS_FLAGS += -Wa,-mimplicit-it=thumb
+@@ -112,13 +94,7 @@ endif
+ #------------------------------------------------------------------------------
+ # Setting assembler data.
+ #------------------------------------------------------------------------------
+-ASM = as
+-ifeq (intel64,$(arch))
+- ASM_FLAGS += --64
+-endif
+-ifeq (ia32,$(arch))
+- ASM_FLAGS += --32
+-endif
++ASM := $(AS)
+ ifeq ($(cfg),debug)
+ ASM_FLAGS += -g
+ endif
diff --git a/dev-cpp/tbb/files/tbb-4.4.20160803-underlinking.patch b/dev-cpp/tbb/files/tbb-4.4.20160803-underlinking.patch
new file mode 100644
index 000000000000..5935017a325e
--- /dev/null
+++ b/dev-cpp/tbb/files/tbb-4.4.20160803-underlinking.patch
@@ -0,0 +1,15 @@
+https://bugs.gentoo.org/show_bug.cgi?id=418447
+
+--- a/build/Makefile.test
++++ b/build/Makefile.test
+@@ -44,8 +44,8 @@
+ USE_PROXY_FLAG = $(DEFINE_KEY)HARNESS_USE_PROXY
+ CPLUS_FLAGS += $(USE_PROXY_FLAG)
+ LINK_TBB.LIB = $(PROXY.LIB)
+- LIBS += $(LIBDL)
+-endif
++endif
++LIBS += $(LIBDL)
+
+ TEST_SUFFIXES=secondary compiler_builtins pic
+ include $(tbb_root)/build/common_rules.inc
diff --git a/dev-cpp/tbb/metadata.xml b/dev-cpp/tbb/metadata.xml
new file mode 100644
index 000000000000..1d44ed7098fc
--- /dev/null
+++ b/dev-cpp/tbb/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci@gentoo.org</email>
+ <name>Gentoo Science Project</name>
+ </maintainer>
+ <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">01org/tbb</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-cpp/tbb/tbb-2017.20161128.ebuild b/dev-cpp/tbb/tbb-2017.20161128.ebuild
new file mode 100644
index 000000000000..f88fe9559185
--- /dev/null
+++ b/dev-cpp/tbb/tbb-2017.20161128.ebuild
@@ -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="$(get_version_component_range 2)"
+MYP="${PN}${PV1}_${PV2}oss"
+
+DESCRIPTION="High level abstract threading library"
+HOMEPAGE="http://www.threadingbuildingblocks.org/"
+SRC_URI="http://threadingbuildingblocks.org/sites/default/files/software_releases/source/${MYP}_src.tgz"
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm ~hppa ppc ppc64 x86 ~amd64-fbsd ~amd64-linux ~x86-linux"
+IUSE="debug doc examples"
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+S="${WORKDIR}/${MYP}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-underlinking.patch
+ "${FILESDIR}"/${P}-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
+}
diff --git a/dev-cpp/tbb/tbb-2017.20170226.ebuild b/dev-cpp/tbb/tbb-2017.20170226.ebuild
new file mode 100644
index 000000000000..f13c39fff0a4
--- /dev/null
+++ b/dev-cpp/tbb/tbb-2017.20170226.ebuild
@@ -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 ~arm64 ~hppa ~ia64 ~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
+}
diff --git a/dev-cpp/tbb/tbb-4.3.20150611.ebuild b/dev-cpp/tbb/tbb-4.3.20150611.ebuild
new file mode 100644
index 000000000000..6e59a338c11a
--- /dev/null
+++ b/dev-cpp/tbb/tbb-4.3.20150611.ebuild
@@ -0,0 +1,131 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils flag-o-matic multilib-minimal toolchain-funcs versionator
+
+PV1="$(get_version_component_range 1)"
+PV2="$(get_version_component_range 2)"
+PV3="$(get_version_component_range 3)"
+MYP="${PN}${PV1}${PV2}_${PV3}oss"
+
+DESCRIPTION="High level abstract threading library"
+HOMEPAGE="http://www.threadingbuildingblocks.org/"
+SRC_URI="http://threadingbuildingblocks.org/sites/default/files/software_releases/source/${MYP}_src.tgz"
+LICENSE="GPL-2-with-exceptions"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~hppa ppc ppc64 x86 ~amd64-fbsd ~amd64-linux ~x86-linux"
+IUSE="debug doc examples"
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+S="${WORKDIR}/${MYP}"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${PN}-4.0.297-underlinking.patch \
+ "${FILESDIR}"/${P}-build.patch
+
+ 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 ;;
+ 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() {
+ cd "${BUILD_DIR}_release" || 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
+
+ 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
+}
diff --git a/dev-cpp/tbb/tbb-4.4.20160803.ebuild b/dev-cpp/tbb/tbb-4.4.20160803.ebuild
new file mode 100644
index 000000000000..c05b5cccc889
--- /dev/null
+++ b/dev-cpp/tbb/tbb-4.4.20160803.ebuild
@@ -0,0 +1,145 @@
+# 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="$(get_version_component_range 2)"
+PV3="$(get_version_component_range 3)"
+MYP="${PN}${PV1}${PV2}_${PV3}oss"
+
+DESCRIPTION="High level abstract threading library"
+HOMEPAGE="http://www.threadingbuildingblocks.org/"
+SRC_URI="http://threadingbuildingblocks.org/sites/default/files/software_releases/source/${MYP}_src.tgz"
+LICENSE="GPL-2-with-exceptions"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux"
+IUSE="debug doc examples"
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+S="${WORKDIR}/${MYP}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-underlinking.patch
+ "${FILESDIR}"/${P}-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
+}