source: projects/specs/trunk/t/tbb/tbb-vl.spec @ 12469

Revision 12469, 11.2 KB checked in by tomop, 4 years ago (diff)

python-3.8.5 and related packages.

Line 
1%bcond_with test
2
3Name:           tbb
4Summary:        The Threading Building Blocks library abstracts low-level threading details
5Summary(ja):    スレッド処理を抽象化するスレッディング・ビルディング・ブロックライブラリ
6Version:        2020.3
7Release:        1%{?_dist_release}
8Group:          system
9Vendor:         Project Vine
10Distribution:   Vine Linux
11
12License:        ASL 2.0
13URL:            https://github.com/oneapi-src/oneTBB
14Source0:        https://github.com/intel/tbb/archive/v%{version}/%{name}-%{version}.tar.gz
15# These three are downstream sources.
16Source6:        tbb.pc
17Source7:        tbbmalloc.pc
18Source8:        tbbmalloc_proxy.pc
19
20# Don't snip -Wall from C++ flags.  Add -fno-strict-aliasing, as that
21# uncovers some static-aliasing warnings.
22# Related: https://bugzilla.redhat.com/show_bug.cgi?id=1037347
23Patch0: tbb-2019-dont-snip-Wall.patch
24
25# Make attributes of aliases match those on the aliased function.
26Patch1: tbb-2020-attributes.patch
27
28# Fix test-thread-monitor, which had multiple bugs that could (and did, on
29# ppc64le) result in a hang.
30Patch2: tbb-2019-test-thread-monitor.patch
31
32# Fix a test that builds a 4-thread barrier, but cannot guarantee that more
33# than 2 threads will be available to use it.
34Patch3: tbb-2019-test-task-scheduler-init.patch
35
36# Fix compilation on aarch64 and s390x.  See
37# https://github.com/intel/tbb/issues/186
38Patch4: tbb-2019-fetchadd4.patch
39
40BuildRoot:     %{_tmppath}/%{name}-%{version}-root
41BuildRequires: doxygen
42BuildRequires: libstdc++-devel
43BuildRequires: python3-rpm-macros
44BuildRequires: python3-devel
45BuildRequires: python3-setuptools
46BuildRequires: swig
47
48%description
49Threading Building Blocks (TBB) is a C++ runtime library that
50abstracts the low-level threading details necessary for optimal
51multi-core performance.  It uses common C++ templates and coding style
52to eliminate tedious threading implementation work.
53
54TBB requires fewer lines of code to achieve parallelism than other
55threading models.  The applications you write are portable across
56platforms.  Since the library is also inherently scalable, no code
57maintenance is required as more processor cores become available.
58
59
60%package devel
61Summary: The Threading Building Blocks C++ headers and shared development libraries
62Summary(ja): TBBの C++ ヘッダファイルと開発用共有ライブラリ
63Group: programming
64Requires: %{name} = %{version}-%{release}
65
66%description devel
67Header files and shared object symlinks for the Threading Building
68Blocks (TBB) C++ libraries.
69
70
71%package doc
72Summary: The Threading Building Blocks documentation
73Summary(ja): TBBのドキュメント
74Group: documentation
75BuildArch: noarch
76
77%description doc
78PDF documentation for the user of the Threading Building Block (TBB)
79C++ library.
80
81
82%package -n python3-%{name}
83Summary: Python 3 TBB module
84%{?python_provide:%python_provide python3-%{name}}
85
86%description -n python3-%{name}
87Python 3 TBB module.
88
89
90%debug_package
91
92
93%prep
94%autosetup -p1 -n oneTBB-%{version}
95
96# For repeatable builds, don't query the hostname or architecture
97sed -i 's/"`hostname -s`" ("`uname -m`"/fedorabuild (%{_arch}/' \
98    build/version_info_linux.sh
99
100# Do not assume the RTM instructions are available.
101# Insert --as-needed before the libraries to be linked.
102sed -e 's/-mrtm//' \
103    -e "s/-fPIC/& -Wl,--as-needed/" \
104    -i build/linux.gcc.inc
105
106# Invoke the right python binary directly
107sed -i 's,env python,python3,' python/TBB.py python/tbb/__*.py
108
109# Remove shebang from files that don't need it
110sed -i '/^#!/d' python/tbb/{pool,test}.py
111
112
113%build
114make %{?_smp_mflags} tbb_build_prefix=obj stdver=c++14 \
115    compiler=gcc \
116    CXXFLAGS="%{optflags} -DDO_ITT_NOTIFY -DUSE_PTHREAD" \
117    LDFLAGS="$RPM_LD_FLAGS -lpthread"
118for file in %{SOURCE6} %{SOURCE7} %{SOURCE8}; do
119    base=$(basename ${file})
120    sed 's/_FEDORA_VERSION/%{version}/' ${file} > ${base}
121    touch -r ${file} ${base}
122done
123
124# Build for python 3
125. build/obj_release/tbbvars.sh
126pushd python
127make %{?_smp_mflags} -C rml stdver=c++14 \
128    compiler=gcc \
129    CPLUS_FLAGS="%{optflags} -DDO_ITT_NOTIFY -DUSE_PTHREAD" \
130    LDFLAGS="$RPM_LD_FLAGS -lpthread"
131cp -p rml/libirml.so* .
132%py3_build
133popd
134
135%ifnarch %{ix86}
136# Build the documentation
137make doxygen
138%endif
139
140%if %{with test}
141%check
142# This test assumes it can create thread barriers for arbitrary numbers of
143# threads, but tbb limits the number of threads spawned to a function of the
144# number of CPUs available.  Some of the koji builders have a small number of
145# CPUs, so the test hangs waiting for threads that have not been created to
146# arrive at the barrier.  Skip this test until upstream fixes it.
147sed -i '/test_task_scheduler_observer/d' build/Makefile.test
148
149make test tbb_build_prefix=obj stdver=c++14 CXXFLAGS="%{optflags}"
150%endif
151
152
153%install
154rm -rf $RPM_BUILD_ROOT
155mkdir -p $RPM_BUILD_ROOT%{_libdir}
156mkdir -p $RPM_BUILD_ROOT%{_includedir}
157
158pushd build/obj_release
159    for file in libtbb{,malloc{,_proxy}}; do
160        install -p -D -m 755 ${file}.so.2 $RPM_BUILD_ROOT/%{_libdir}
161        ln -s $file.so.2 $RPM_BUILD_ROOT/%{_libdir}/$file.so
162    done
163popd
164
165pushd include
166    find tbb -type f ! -name \*.htm\* -exec \
167        install -p -D -m 644 {} $RPM_BUILD_ROOT/%{_includedir}/{} \
168    \;
169popd
170
171for file in %{SOURCE6} %{SOURCE7} %{SOURCE8}; do
172    install -p -D -m 644 $(basename ${file}) \
173        $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/$(basename ${file})
174done
175
176# Install the rml headers
177mkdir -p $RPM_BUILD_ROOT%{_includedir}/rml
178cp -p src/rml/include/*.h $RPM_BUILD_ROOT%{_includedir}/rml
179
180# Python 3 install
181. build/obj_release/tbbvars.sh
182pushd python
183%py3_install
184chmod a+x $RPM_BUILD_ROOT%{python3_sitearch}/TBB.py
185chmod a+x $RPM_BUILD_ROOT%{python3_sitearch}/tbb/__*.py
186cp -p libirml.so.1 $RPM_BUILD_ROOT%{_libdir}
187ln -s libirml.so.1 $RPM_BUILD_ROOT%{_libdir}/libirml.so
188popd
189
190# Install the cmake files
191mkdir -p $RPM_BUILD_ROOT%{_libdir}/cmake
192cp -a cmake $RPM_BUILD_ROOT%{_libdir}/cmake/%{name}
193rm $RPM_BUILD_ROOT%{_libdir}/cmake/%{name}/README.rst
194
195
196%clean
197rm -rf $RPM_BUILD_ROOT
198
199
200%post -p /sbin/ldconfig
201
202%postun -p /sbin/ldconfig
203
204
205%files
206%doc doc/Release_Notes.txt README.md
207%license LICENSE
208%{_libdir}/*.so.*
209
210%files devel
211%doc CHANGES
212%doc CHANGES cmake/README.rst
213%{_includedir}/rml/
214%{_includedir}/tbb/
215%{_libdir}/*.so
216%{_libdir}/cmake/tbb/
217%{_libdir}/pkgconfig/*.pc
218
219%ifnarch %{ix86}
220%files doc
221%doc doc/Release_Notes.txt
222%doc html
223%endif
224
225%files -n python3-%{name}
226%doc python/index.html
227%{python3_sitearch}/TBB*
228%{python3_sitearch}/tbb/
229%{python3_sitearch}/__pycache__/TBB*
230
231
232%changelog
233* Mon Aug 17 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 2020.3-1
234- new upstream release.
235
236* Tue Jun 30 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 2020.2-1
237- new upstream release.
238
239* Sat Sep 03 2016 Toshiaki Ara <ara_t@384.jp> - 4.3u6-2
240- rebuild with gcc-5.4.0
241
242* Fri Jun 19 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> - 4.3u6-1
243- new upstream release
244
245* Wed Mar  4 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> - 4.3u3-2
246- Initial build for Vine Linux based on 4.3 update3
247
248* Mon Jan 19 2015 Petr Machata <pmachata@redhat.com> - 4.3-1.20141204
249- Rebase to 4.3u2
250- Drop ExclusiveArch
251
252* Thu Sep 25 2014 Karsten Hopp <karsten@redhat.com> 4.1-9.20130314
253- enable ppc64le and run 'make test' on that new arch
254
255* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.1-8.20130314
256- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
257
258* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.1-7.20130314
259- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
260
261* Sun Jan 12 2014 Peter Robinson <pbrobinson@fedoraproject.org> 4.1-6.20130314
262- Build on aarch64, minor spec cleanups
263
264* Tue Dec  3 2013 Petr Machata <pmachata@redhat.com> - 4.1-5.20130314
265- Fix building with -Werror=format-security (tbb-4.1-dont-snip-Wall.patch)
266
267* Thu Oct  3 2013 Petr Machata <pmachata@redhat.com> - 4.1-4.20130314
268- Fix %%install to also install include files that are not named *.h
269
270* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.1-3.20130314
271- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
272
273* Tue May 28 2013 Petr Machata <pmachata@redhat.com> - 4.1-3.20130314
274- Enable ARM arches
275
276* Wed May 22 2013 Petr Machata <pmachata@redhat.com> - 4.1-2.20130314
277- Fix mfence patch.  Since the __TBB_full_memory_fence macro was
278  function-call-like, it stole () intended for function invocation.
279
280* Wed May 22 2013 Petr Machata <pmachata@redhat.com> - 4.1-1.20130314
281- Rebase to 4.1 update 3
282
283* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0-7.20120408
284- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
285
286* Tue Aug 28 2012 Petr Machata <pmachata@redhat.com> - 4.0-6.20120408
287- Fix build on PowerPC
288
289* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0-5.20120408
290- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
291
292* Thu Jun  7 2012 Petr Machata <pmachata@redhat.com> - 4.0-4.20120408
293- Rebase to 4.0 update 4
294- Refresh Getting_Started.pdf, Reference.pdf, Tutorial.pdf
295- Provide pkg-config files
296- Resolves: #825402
297
298* Thu Apr 05 2012 Karsten Hopp <karsten@redhat.com> 4.0-3.20110809
299- tbb builds now on PPC(64)
300
301* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0-2.20110809
302- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
303
304* Tue Oct 18 2011 Petr Machata <pmachata@redhat.com> - 4.0-1.20110809
305- Rebase to 4.0
306  - Port the mfence patch
307  - Refresh the documentation bundle
308
309* Tue Jul 26 2011 Petr Machata <pmachata@redhat.com> - 3.0-1.20110419
310- Rebase to 3.0-r6
311  - Port both patches
312  - Package Design_Patterns.pdf
313  - Thanks to Richard Shaw for initial rebase patch
314- Resolves: #723043
315
316* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2-3.20090809
317- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
318
319* Thu Jun 10 2010 Petr Machata <pmachata@redhat.com> - 2.2-2.20090809
320- Replace mfence instruction with xchg to make it run on ia32-class
321  machines without SSE2.
322- Resolves: #600654
323
324* Tue Nov  3 2009 Petr Machata <pmachata@redhat.com> - 2.2-1.20090809
325- New upstream 2.2
326- Resolves: #521571
327
328* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1-3.20080605
329- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
330
331* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1-2.20080605
332- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
333
334* Fri Jun 13 2008 Petr Machata <pmachata@redhat.com> - 2.1-1.20080605
335- New upstream 2.1
336  - Drop soname patch, parallel make patch, and GCC 4.3 patch
337
338* Wed Feb 13 2008 Petr Machata <pmachata@redhat.com> - 2.0-4.20070927
339- Review fixes
340  - Use updated URL
341  - More timestamp preservation
342- Initial import into Fedora CVS
343
344* Mon Feb 11 2008 Petr Machata <pmachata@redhat.com> - 2.0-3.20070927
345- Review fixes
346  - Preserve timestamp of installed files
347  - Fix soname not to contain "debug"
348
349* Tue Feb  5 2008 Petr Machata <pmachata@redhat.com> - 2.0-2.20070927
350- Review fixes
351  - GCC 4.3 patchset
352  - Add BR util-linux net-tools
353  - Add full URL to Source0
354  - Build in debug mode to work around problems with GCC 4.3
355
356* Mon Dec 17 2007 Petr Machata <pmachata@redhat.com> - 2.0-1.20070927
357- Initial package.
358- Using SONAME patch from Debian.
Note: See TracBrowser for help on using the repository browser.