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

Revision 12418, 11.1 KB checked in by tomop, 4 years ago (diff)

updated 3 packages

eigen3-3.3.7-1

opencv-4.3.0-1

tbb-2020.2-1

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