Gentoo Archives: gentoo-commits

From: Matthias Maier <tamiko@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-cpp/tbb/files/, dev-cpp/tbb/
Date: Fri, 31 Mar 2017 02:16:59
Message-Id: 1490926546.0451d48fdba160cc23c46611d1cf4decf10946e3.tamiko@gentoo
1 commit: 0451d48fdba160cc23c46611d1cf4decf10946e3
2 Author: Matthias Maier <tamiko <AT> gentoo <DOT> org>
3 AuthorDate: Fri Mar 31 02:06:23 2017 +0000
4 Commit: Matthias Maier <tamiko <AT> gentoo <DOT> org>
5 CommitDate: Fri Mar 31 02:15:46 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0451d48f
7
8 dev-cpp/tbb: version bump to 4.4.20160803, bug #596130
9
10 Package-Manager: Portage-2.3.3, Repoman-2.3.2
11
12 dev-cpp/tbb/Manifest | 1 +
13 dev-cpp/tbb/files/tbb-4.4.20160803-build.patch | 193 +++++++++++++++++++++
14 .../tbb/files/tbb-4.4.20160803-underlinking.patch | 15 ++
15 dev-cpp/tbb/tbb-4.4.20160803.ebuild | 145 ++++++++++++++++
16 4 files changed, 354 insertions(+)
17
18 diff --git a/dev-cpp/tbb/Manifest b/dev-cpp/tbb/Manifest
19 index 71f464d6d4d..a7b1897ff55 100644
20 --- a/dev-cpp/tbb/Manifest
21 +++ b/dev-cpp/tbb/Manifest
22 @@ -1,2 +1,3 @@
23 DIST tbb2017_20161128oss_src.tgz 2965854 SHA256 c009166233c8ea0e34530a1c5f870b79314316d19e6876b37a7e7c854080a540 SHA512 3c48ce196d2d3557e86cea7ede9dea456bbaeb29dbed34210f99c6f380406403a6056ccfa3d5befe6b29c4f8a9ee58ca6da545249cf4ec4ec85b463e04e4518c WHIRLPOOL d1ce8d07ac002c617afa7c0aa1d5cad41928a6eefd064a744b4efdd0192dd310ad8cb32b949858a7c2c44211477deffc05dbd65e8101184d4cae26744143b922
24 DIST tbb43_20150611oss_src.tgz 2757631 SHA256 221f85fe64e11c9638e43b3c57d5750c26683905fc90827c0bcfefdb286e79c9 SHA512 83d5d827706b774ef5cd6df8082e5d7f48683388684423bb40565dfc25892fc2e57c382f719b78087d83e51edb3f7f7215f33d8b5039b55c32788d80efa6e0b8 WHIRLPOOL 8e98162b2307c759fb26923d76ab784dea81e166c8bf5323869d234da59641c333e5ae30b4a224bccbf20d4f5f6b75c658589f519a165ea3ad7658322f148c72
25 +DIST tbb44_20160803oss_src.tgz 2874050 SHA256 23fb69a16b5daccef8e1ffe194d1dd5c6b1d225c0de87e54bc30c958aa244fb0 SHA512 01b1dcdaffa96c3d503e44d7b236b1115f419c122dab0f40de4c9dc90db315a1f3755cc91adf9df91d5d31d8927df115230db94cf175edac09ae438b46374a92 WHIRLPOOL 2b93bfabc0eadb1a10ad34f1a475322a04554bd8b5e4ac90505ec285f7727a537249a045f7a464fb3c266f9ece6c83fa259a099cc052da16cdd6c05cd9a1fb42
26
27 diff --git a/dev-cpp/tbb/files/tbb-4.4.20160803-build.patch b/dev-cpp/tbb/files/tbb-4.4.20160803-build.patch
28 new file mode 100644
29 index 00000000000..9c66c132fff
30 --- /dev/null
31 +++ b/dev-cpp/tbb/files/tbb-4.4.20160803-build.patch
32 @@ -0,0 +1,193 @@
33 +diff --git a/build/FreeBSD.gcc.inc b/build/FreeBSD.gcc.inc
34 +index dc22ca3..65dfb6e 100644
35 +--- a/build/FreeBSD.gcc.inc
36 ++++ b/build/FreeBSD.gcc.inc
37 +@@ -28,8 +28,8 @@ WARNING_KEY = -Wall
38 + DYLIB_KEY = -shared
39 + WARNING_SUPPRESS = -Wno-parentheses
40 +
41 +-CPLUS = g++
42 +-CONLY = gcc
43 ++CPLUS = $(CXX)
44 ++CONLY = $(CC)
45 + LIB_LINK_FLAGS = -shared
46 + LIBS = -lpthread
47 + C_FLAGS = $(CPLUS_FLAGS)
48 +@@ -42,7 +42,7 @@ ifneq (,$(shell gcc -dumpversion | egrep "^([6-9])"))
49 + endif
50 +
51 + ifeq ($(cfg), release)
52 +- CPLUS_FLAGS = -g -O2 -DUSE_PTHREAD
53 ++ CPLUS_FLAGS = -g -DUSE_PTHREAD
54 + endif
55 + ifeq ($(cfg), debug)
56 + CPLUS_FLAGS = -DTBB_USE_DEBUG -g -O0 -DUSE_PTHREAD
57 +@@ -59,22 +59,12 @@ ifeq (ia64,$(arch))
58 + CPLUS_FLAGS += $(PIC_KEY)
59 + endif
60 +
61 +-ifeq (intel64,$(arch))
62 +- CPLUS_FLAGS += -m64
63 +- LIB_LINK_FLAGS += -m64
64 +-endif
65 +-
66 +-ifeq (ia32,$(arch))
67 +- CPLUS_FLAGS += -m32
68 +- LIB_LINK_FLAGS += -m32
69 +-endif
70 +-
71 + #------------------------------------------------------------------------------
72 + # Setting assembler data.
73 + #------------------------------------------------------------------------------
74 + ASSEMBLY_SOURCE=$(arch)-gas
75 + ifeq (ia64,$(arch))
76 +- ASM=as
77 ++ ASM=$(AS)
78 + TBB_ASM.OBJ = atomic_support.o lock_byte.o log2.o pause.o
79 + MALLOC_ASM.OBJ = atomic_support.o lock_byte.o pause.o
80 + endif
81 +diff --git a/build/linux.clang.inc b/build/linux.clang.inc
82 +index fc8d7de..21ad5d4 100644
83 +--- a/build/linux.clang.inc
84 ++++ b/build/linux.clang.inc
85 +@@ -31,15 +31,15 @@ DYLIB_KEY = -shared
86 + EXPORT_KEY = -Wl,--version-script,
87 + LIBDL = -ldl
88 +
89 +-CPLUS = clang++
90 +-CONLY = clang
91 ++CPLUS := $(CXX)
92 ++CONLY := $(CC)
93 + LIB_LINK_FLAGS = $(DYLIB_KEY) -Wl,-soname=$(BUILDING_LIBRARY)
94 + LIBS += -lpthread -lrt
95 + LINK_FLAGS = -Wl,-rpath-link=. -rdynamic
96 + C_FLAGS = $(CPLUS_FLAGS)
97 +
98 + ifeq ($(cfg), release)
99 +- CPLUS_FLAGS = $(ITT_NOTIFY) -g -O2 -DUSE_PTHREAD
100 ++ CPLUS_FLAGS = $(ITT_NOTIFY) -g -DUSE_PTHREAD
101 + endif
102 + ifeq ($(cfg), debug)
103 + CPLUS_FLAGS = -DTBB_USE_DEBUG $(ITT_NOTIFY) -g -O0 -DUSE_PTHREAD
104 +@@ -55,24 +55,10 @@ MALLOC_ASM.OBJ=
105 +
106 + ifeq (intel64,$(arch))
107 + ITT_NOTIFY = -DDO_ITT_NOTIFY
108 +- CPLUS_FLAGS += -m64
109 +- LIB_LINK_FLAGS += -m64
110 + endif
111 +
112 + ifeq (ia32,$(arch))
113 + ITT_NOTIFY = -DDO_ITT_NOTIFY
114 +- CPLUS_FLAGS += -m32 -march=pentium4
115 +- LIB_LINK_FLAGS += -m32
116 +-endif
117 +-
118 +-ifeq (ppc64,$(arch))
119 +- CPLUS_FLAGS += -m64
120 +- LIB_LINK_FLAGS += -m64
121 +-endif
122 +-
123 +-ifeq (ppc32,$(arch))
124 +- CPLUS_FLAGS += -m32
125 +- LIB_LINK_FLAGS += -m32
126 + endif
127 +
128 + ifeq (bg,$(arch))
129 +@@ -84,12 +70,6 @@ endif
130 + # Setting assembler data.
131 + #------------------------------------------------------------------------------
132 + ASM = as
133 +-ifeq (intel64,$(arch))
134 +- ASM_FLAGS += --64
135 +-endif
136 +-ifeq (ia32,$(arch))
137 +- ASM_FLAGS += --32
138 +-endif
139 + ifeq ($(cfg),debug)
140 + ASM_FLAGS += -g
141 + endif
142 +diff --git a/build/linux.gcc.inc b/build/linux.gcc.inc
143 +index f9b483d..1e69789 100644
144 +--- a/build/linux.gcc.inc
145 ++++ b/build/linux.gcc.inc
146 +@@ -32,12 +32,12 @@ DYLIB_KEY = -shared
147 + EXPORT_KEY = -Wl,--version-script,
148 + LIBDL = -ldl
149 +
150 +-CPLUS = g++
151 +-CONLY = gcc
152 ++CPLUS := $(CXX)
153 ++CONLY := $(CC)
154 + LIB_LINK_FLAGS = $(DYLIB_KEY) -Wl,-soname=$(BUILDING_LIBRARY)
155 + LIBS += -lpthread -lrt
156 + LINK_FLAGS = -Wl,-rpath-link=. -rdynamic
157 +-C_FLAGS = $(CPLUS_FLAGS)
158 ++C_FLAGS := $(CPLUS_FLAGS)
159 +
160 + # gcc 4.2 and higher support OpenMP
161 + ifneq (,$(shell gcc -dumpversion | egrep "^(4\.[2-9]|[5-9])"))
162 +@@ -57,7 +57,7 @@ ifneq (,$(shell gcc -dumpversion | egrep "^([6-9])"))
163 + endif
164 +
165 + ifeq ($(cfg), release)
166 +- CPLUS_FLAGS = $(ITT_NOTIFY) -g -O2 -DUSE_PTHREAD
167 ++ CPLUS_FLAGS = $(ITT_NOTIFY) -g -DUSE_PTHREAD
168 + endif
169 + ifeq ($(cfg), debug)
170 + CPLUS_FLAGS = -DTBB_USE_DEBUG $(ITT_NOTIFY) -g -O0 -DUSE_PTHREAD
171 +@@ -73,24 +73,12 @@ endif
172 +
173 + ifeq (intel64,$(arch))
174 + ITT_NOTIFY = -DDO_ITT_NOTIFY
175 +- CPLUS_FLAGS += -m64 $(RTM_KEY)
176 +- LIB_LINK_FLAGS += -m64
177 ++ CPLUS_FLAGS += $(RTM_KEY)
178 + endif
179 +
180 + ifeq (ia32,$(arch))
181 + ITT_NOTIFY = -DDO_ITT_NOTIFY
182 +- CPLUS_FLAGS += -m32 -march=pentium4 $(RTM_KEY)
183 +- LIB_LINK_FLAGS += -m32
184 +-endif
185 +-
186 +-ifeq (ppc64,$(arch))
187 +- CPLUS_FLAGS += -m64
188 +- LIB_LINK_FLAGS += -m64
189 +-endif
190 +-
191 +-ifeq (ppc32,$(arch))
192 +- CPLUS_FLAGS += -m32
193 +- LIB_LINK_FLAGS += -m32
194 ++ CPLUS_FLAGS += $(RTM_KEY)
195 + endif
196 +
197 + ifeq (bg,$(arch))
198 +@@ -98,12 +86,6 @@ ifeq (bg,$(arch))
199 + CONLY = $(firstword $(notdir $(shell which powerpc{64,32,}-bg{z..a}-linux-gcc 2>/dev/null)))
200 + endif
201 +
202 +-# for some gcc versions on Solaris, -m64 may imply V9, but perhaps not everywhere (TODO: verify)
203 +-ifeq (sparc,$(arch))
204 +- CPLUS_FLAGS += -mcpu=v9 -m64
205 +- LIB_LINK_FLAGS += -mcpu=v9 -m64
206 +-endif
207 +-
208 + # automatically generate "IT" instructions when compiling for Thumb ISA
209 + ifeq (armv7,$(arch))
210 + CPLUS_FLAGS += -Wa,-mimplicit-it=thumb
211 +@@ -112,13 +94,7 @@ endif
212 + #------------------------------------------------------------------------------
213 + # Setting assembler data.
214 + #------------------------------------------------------------------------------
215 +-ASM = as
216 +-ifeq (intel64,$(arch))
217 +- ASM_FLAGS += --64
218 +-endif
219 +-ifeq (ia32,$(arch))
220 +- ASM_FLAGS += --32
221 +-endif
222 ++ASM := $(AS)
223 + ifeq ($(cfg),debug)
224 + ASM_FLAGS += -g
225 + endif
226
227 diff --git a/dev-cpp/tbb/files/tbb-4.4.20160803-underlinking.patch b/dev-cpp/tbb/files/tbb-4.4.20160803-underlinking.patch
228 new file mode 100644
229 index 00000000000..5935017a325
230 --- /dev/null
231 +++ b/dev-cpp/tbb/files/tbb-4.4.20160803-underlinking.patch
232 @@ -0,0 +1,15 @@
233 +https://bugs.gentoo.org/show_bug.cgi?id=418447
234 +
235 +--- a/build/Makefile.test
236 ++++ b/build/Makefile.test
237 +@@ -44,8 +44,8 @@
238 + USE_PROXY_FLAG = $(DEFINE_KEY)HARNESS_USE_PROXY
239 + CPLUS_FLAGS += $(USE_PROXY_FLAG)
240 + LINK_TBB.LIB = $(PROXY.LIB)
241 +- LIBS += $(LIBDL)
242 +-endif
243 ++endif
244 ++LIBS += $(LIBDL)
245 +
246 + TEST_SUFFIXES=secondary compiler_builtins pic
247 + include $(tbb_root)/build/common_rules.inc
248
249 diff --git a/dev-cpp/tbb/tbb-4.4.20160803.ebuild b/dev-cpp/tbb/tbb-4.4.20160803.ebuild
250 new file mode 100644
251 index 00000000000..e4e6af1dd1d
252 --- /dev/null
253 +++ b/dev-cpp/tbb/tbb-4.4.20160803.ebuild
254 @@ -0,0 +1,145 @@
255 +# Copyright 1999-2017 Gentoo Foundation
256 +# Distributed under the terms of the GNU General Public License v2
257 +
258 +EAPI=6
259 +
260 +inherit eutils flag-o-matic multilib-minimal toolchain-funcs versionator
261 +
262 +PV1="$(get_version_component_range 1)"
263 +PV2="$(get_version_component_range 2)"
264 +PV3="$(get_version_component_range 3)"
265 +MYP="${PN}${PV1}${PV2}_${PV3}oss"
266 +
267 +DESCRIPTION="High level abstract threading library"
268 +HOMEPAGE="http://www.threadingbuildingblocks.org/"
269 +SRC_URI="http://threadingbuildingblocks.org/sites/default/files/software_releases/source/${MYP}_src.tgz"
270 +LICENSE="GPL-2-with-exceptions"
271 +SLOT="0"
272 +KEYWORDS="~alpha ~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux"
273 +IUSE="debug doc examples"
274 +
275 +DEPEND=""
276 +RDEPEND="${DEPEND}"
277 +S="${WORKDIR}/${MYP}"
278 +
279 +PATCHES=(
280 + "${FILESDIR}"/${P}-underlinking.patch
281 + "${FILESDIR}"/${P}-build.patch
282 +)
283 +
284 +src_prepare() {
285 + default
286 +
287 + find include -name \*.html -delete || die
288 +
289 + # Give it a soname on FreeBSD
290 + echo 'LIB_LINK_FLAGS += -Wl,-soname=$(BUILDING_LIBRARY)' >> build/FreeBSD.gcc.inc
291 + # Set proper versionning on FreeBSD
292 + sed -i -e '/.DLL =/s/$/.1/' build/FreeBSD.inc || die
293 +
294 + use debug || sed -i -e '/_debug/d' Makefile
295 +}
296 +
297 +multilib_src_configure() {
298 + # pc files are for debian and fedora compatibility
299 + # some deps use them
300 + cat <<-EOF > ${PN}.pc.template
301 + prefix=${EPREFIX}/usr
302 + libdir=\${prefix}/$(get_libdir)
303 + includedir=\${prefix}/include
304 + Name: ${PN}
305 + Description: ${DESCRIPTION}
306 + Version: ${PV}
307 + URL: ${HOMEPAGE}
308 + Cflags: -I\${includedir}
309 + EOF
310 + cp ${PN}.pc.template ${PN}.pc || die
311 + cat <<-EOF >> ${PN}.pc
312 + Libs: -L\${libdir} -ltbb
313 + Libs.private: -lm -lrt
314 + EOF
315 + cp ${PN}.pc.template ${PN}malloc.pc || die
316 + cat <<-EOF >> ${PN}malloc.pc
317 + Libs: -L\${libdir} -ltbbmalloc
318 + Libs.private: -lm -lrt
319 + EOF
320 + cp ${PN}.pc.template ${PN}malloc_proxy.pc || die
321 + cat <<-EOF >> ${PN}malloc_proxy.pc
322 + Libs: -L\${libdir} -ltbbmalloc_proxy
323 + Libs.private: -lrt
324 + Requires: tbbmalloc
325 + EOF
326 +}
327 +
328 +local_src_compile() {
329 + cd "${S}"
330 +
331 + local comp arch
332 +
333 + case ${MULTILIB_ABI_FLAG} in
334 + abi_x86_64) arch=x86_64 ;;
335 + abi_x86_32) arch=ia32 ;;
336 + abi_ppc_64) arch=ppc64 ;;
337 + abi_ppc_32) arch=ppc32 ;;
338 + esac
339 +
340 + case "$(tc-getCXX)" in
341 + *g++*) comp="gcc" ;;
342 + *ic*c) comp="icc" ;;
343 + *clang*) comp="clang" ;;
344 + *) die "compiler $(tc-getCXX) not supported by build system" ;;
345 + esac
346 +
347 + CXX="$(tc-getCXX)" \
348 + CC="$(tc-getCC)" \
349 + AS="$(tc-getAS)" \
350 + arch=${arch} \
351 + CPLUS_FLAGS="${CXXFLAGS}" \
352 + emake compiler=${comp} work_dir="${BUILD_DIR}" tbb_root="${S}" $@
353 +}
354 +
355 +multilib_src_compile() {
356 + local_src_compile tbb tbbmalloc
357 +}
358 +
359 +multilib_src_test() {
360 + CXXFLAGS="${CXXFLAGS} -fabi-version=4" \
361 + local_src_compile -j1 test
362 +}
363 +
364 +multilib_src_install() {
365 + local bt
366 + local buildtypes
367 + if use debug ; then
368 + buildtypes="release debug"
369 + else
370 + buildtypes="release"
371 + fi
372 + for bt in ${buildtypes}; do
373 + cd "${BUILD_DIR}_${bt}" || die
374 + local l
375 + for l in $(find . -name lib\*.so.\*); do
376 + dolib.so ${l}
377 + local bl=$(basename ${l})
378 + dosym ${bl} /usr/$(get_libdir)/${bl%.*}
379 + done
380 + done
381 +
382 + cd "${BUILD_DIR}" || die
383 + insinto /usr/$(get_libdir)/pkgconfig
384 + doins *.pc
385 +}
386 +
387 +multilib_src_install_all() {
388 + doheader -r include/*
389 +
390 + dodoc README CHANGES doc/Release_Notes.txt
391 + use doc && dohtml -r doc/html/*
392 +
393 + if use examples ; then
394 + insinto /usr/share/doc/${PF}/examples/build
395 + doins build/*.inc
396 + insinto /usr/share/doc/${PF}/examples
397 + doins -r examples
398 + fi
399 +}