]>
Commit | Line | Data |
---|---|---|
38c4a320 | 1 | # use: major=year, minor=Update version, [micro=date if present] |
00f79ac2 | 2 | %define major 2021 |
b874e7e5 | 3 | %define minor 5 |
00f79ac2 | 4 | %define micro 0 |
fec01785 JP |
5 | |
6 | %ifarch %{armv6} | |
7 | %define with_libatomic 1 | |
8 | %endif | |
9 | ||
4ebeb785 | 10 | Summary: The Threading Building Blocks library abstracts low-level threading details |
546cff52 | 11 | Summary(pl.UTF-8): Threading Building Blocks - biblioteka abstrahująca niskopoziomowe szczegóły obsługi wątków |
4ebeb785 | 12 | Name: tbb |
0f837bda | 13 | Version: 2021.10.0 |
53165151 | 14 | Release: 1 |
361d10a0 | 15 | License: Apache v2.0 |
4ebeb785 | 16 | Group: Development/Tools |
38c4a320 | 17 | # Source0Download: https://github.com/oneapi-src/oneTBB/releases |
00f79ac2 | 18 | Source0: https://github.com/01org/tbb/archive/v%{version}/oneTBB-%{version}.tar.gz |
0f837bda | 19 | # Source0-md5: 2caf55b3d35b53edccb33ecaf0f23402 |
4ebeb785 | 20 | Source1: http://www.threadingbuildingblocks.org/uploads/81/91/Latest%20Open%20Source%20Documentation/Design_Patterns.pdf |
dffb5810 | 21 | # Source1-md5: 46062fef922d39abfd464bc06e02cdd8 |
4ebeb785 | 22 | Source2: http://www.threadingbuildingblocks.org/uploads/81/91/Latest%20Open%20Source%20Documentation/Getting_Started.pdf |
dffb5810 | 23 | # Source2-md5: b8f94104c47f9667e537b98bd940494a |
4ebeb785 | 24 | Source3: http://www.threadingbuildingblocks.org/uploads/81/91/Latest%20Open%20Source%20Documentation/Reference.pdf |
dffb5810 | 25 | # Source3-md5: 1481cbd378f4964691046d0ba570b374 |
4ebeb785 | 26 | Source4: http://www.threadingbuildingblocks.org/uploads/81/91/Latest%20Open%20Source%20Documentation/Tutorial.pdf |
dffb5810 | 27 | # Source4-md5: 5bbdd1050c5dac5c1b782a6a98db0c46 |
546cff52 | 28 | URL: http://www.threadingbuildingblocks.org/ |
00f79ac2 | 29 | BuildRequires: cmake >= 3.1 |
2923faac | 30 | BuildRequires: hwloc-devel |
fec01785 | 31 | %{?with_libatomic:BuildRequires: libatomic-devel} |
f132f93e | 32 | BuildRequires: libstdc++-devel >= 6:4.7 |
8c6cde5d | 33 | BuildRequires: pkgconfig |
fec01785 | 34 | BuildRequires: rpmbuild(macros) >= 2.007 |
546cff52 | 35 | BuildRequires: sed >= 4.0 |
1992e46f | 36 | ExclusiveArch: %{ix86} %{x8664} x32 %{arm} aarch64 ia64 ppc ppc64 |
f1716db8 JB |
37 | # __TBB_machine_cmpswp8 uses gcc's __sync_val_compare_and_swap8 or directly cmpxchg8b asm instruction |
38 | ExcludeArch: i386 i486 | |
4ebeb785 ER |
39 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
40 | ||
f132f93e JB |
41 | # see src/tbb/CMakeLists.txt /TBB_PC_NAME |
42 | %ifarch %{ix86} x32 %{arm} ppc | |
43 | %define tbb_pc_name tbb32 | |
44 | %else | |
45 | %define tbb_pc_name tbb | |
46 | %endif | |
47 | ||
4ebeb785 ER |
48 | %description |
49 | Threading Building Blocks (TBB) is a C++ runtime library that | |
50 | abstracts the low-level threading details necessary for optimal | |
51 | multi-core performance. It uses common C++ templates and coding style | |
52 | to eliminate tedious threading implementation work. | |
53 | ||
54 | TBB requires fewer lines of code to achieve parallelism than other | |
55 | threading models. The applications you write are portable across | |
546cff52 JB |
56 | supported platforms. Since the library is also inherently scalable, no |
57 | code maintenance is required as more processor cores become available. | |
58 | ||
59 | %description -l pl.UTF-8 | |
60 | Threading Building Blocks (TBB) to biblioteka uruchomieniowa C++ | |
61 | abstrahująca niskopoziomowe szczegóły obsługi wątków potrzebne dla | |
62 | optymalnej wydajności na procesorach wielordzeniowych. Wykorzystuje | |
63 | szablony C++ w celu wyeliminowania nudnej pracy nad wielowątkowością. | |
64 | ||
65 | TBB wymaga mniej linii kodu do osiągnięcia równoległości niż inne | |
66 | modele wątkowania. Aplikacje są przenośne między obsługiwanymi | |
67 | platformami. Biblioteka jest skalowalna, więc nie jest wymagane | |
68 | modyfikowanie kodu wraz z dostępnością większej liczby rdzeni | |
69 | procesor. | |
4ebeb785 ER |
70 | |
71 | %package devel | |
546cff52 JB |
72 | Summary: The Threading Building Blocks C++ headers |
73 | Summary(pl.UTF-8): Pliki nagłówkowe C++ bibliotek Threading Building Blocks | |
4ebeb785 ER |
74 | Group: Development/Libraries |
75 | Requires: %{name} = %{version}-%{release} | |
76 | ||
77 | %description devel | |
78 | Header files and shared object symlinks for the Threading Building | |
79 | Blocks (TBB) C++ libraries. | |
80 | ||
546cff52 JB |
81 | %description devel -l pl.UTF-8 |
82 | Pliki nagłówkowe i dowiązania symboliczne dla bibliotek C++ Threading | |
83 | Building Blocks. | |
84 | ||
4ebeb785 ER |
85 | %package doc |
86 | Summary: The Threading Building Blocks documentation | |
546cff52 | 87 | Summary(pl.UTF-8): Dokumentacja bibliotek Threading Building Blocks |
4ebeb785 ER |
88 | Group: Documentation |
89 | ||
90 | %description doc | |
91 | PDF documentation for the user of the Threading Building Block (TBB) | |
92 | C++ library. | |
93 | ||
546cff52 JB |
94 | %description doc -l pl.UTF-8 |
95 | Dokumentacja w formacie PDF dla użytkowników biblioteki C++ Threading | |
96 | Building Blocks (TBB). | |
97 | ||
4ebeb785 | 98 | %prep |
00f79ac2 | 99 | %setup -q -n oneTBB-%{version} |
4ebeb785 ER |
100 | |
101 | cp -p %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} . | |
102 | ||
103 | %build | |
00f79ac2 | 104 | %cmake -B build \ |
fec01785 | 105 | %{?with_libatomic:-DTBB_LIB_LINK_LIBS=-latomic} \ |
00f79ac2 JP |
106 | -DTBB_STRICT:BOOL=OFF \ |
107 | -DTBB_TEST:BOOL=OFF | |
108 | ||
109 | %{__make} -C build | |
4ebeb785 ER |
110 | |
111 | %install | |
112 | rm -rf $RPM_BUILD_ROOT | |
00f79ac2 JP |
113 | |
114 | %{__make} -C build install \ | |
115 | DESTDIR=$RPM_BUILD_ROOT | |
4ebeb785 | 116 | |
f132f93e JB |
117 | %if "%{tbb_pc_name}" != "tbb" |
118 | # for compatibility | |
119 | ln -sf %{tbb_pc_name}.pc $RPM_BUILD_ROOT%{_pkgconfigdir}/tbb.pc | |
120 | %endif | |
121 | ||
4ebeb785 ER |
122 | %clean |
123 | rm -rf $RPM_BUILD_ROOT | |
124 | ||
546cff52 JB |
125 | %post -p /sbin/ldconfig |
126 | %postun -p /sbin/ldconfig | |
127 | ||
4ebeb785 ER |
128 | %files |
129 | %defattr(644,root,root,755) | |
00f79ac2 JP |
130 | %doc README.md third-party-programs.txt |
131 | %attr(755,root,root) %{_libdir}/libtbb.so.*.* | |
132 | %attr(755,root,root) %ghost %{_libdir}/libtbb.so.12 | |
f132f93e JB |
133 | %attr(755,root,root) %{_libdir}/libtbbbind.so.*.* |
134 | %attr(755,root,root) %ghost %{_libdir}/libtbbbind.so.3 | |
00f79ac2 | 135 | %attr(755,root,root) %{_libdir}/libtbbmalloc.so.*.* |
4ebeb785 | 136 | %attr(755,root,root) %ghost %{_libdir}/libtbbmalloc.so.2 |
00f79ac2 | 137 | %attr(755,root,root) %{_libdir}/libtbbmalloc_proxy.so.*.* |
546cff52 | 138 | %attr(755,root,root) %ghost %{_libdir}/libtbbmalloc_proxy.so.2 |
4ebeb785 ER |
139 | |
140 | %files devel | |
141 | %defattr(644,root,root,755) | |
546cff52 | 142 | %attr(755,root,root) %{_libdir}/libtbb.so |
f132f93e | 143 | %attr(755,root,root) %{_libdir}/libtbbbind.so |
546cff52 JB |
144 | %attr(755,root,root) %{_libdir}/libtbbmalloc.so |
145 | %attr(755,root,root) %{_libdir}/libtbbmalloc_proxy.so | |
00f79ac2 JP |
146 | # likely to be owned by different package? |
147 | %dir %{_includedir}/oneapi | |
148 | %{_includedir}/oneapi/tbb.h | |
149 | %{_includedir}/oneapi/tbb | |
4ebeb785 | 150 | %{_includedir}/tbb |
f132f93e JB |
151 | %{_pkgconfigdir}/%{tbb_pc_name}.pc |
152 | %if "%{tbb_pc_name}" != "tbb" | |
546cff52 | 153 | %{_pkgconfigdir}/tbb.pc |
f132f93e | 154 | %endif |
00f79ac2 | 155 | %{_libdir}/cmake/TBB |
4ebeb785 ER |
156 | |
157 | %files doc | |
158 | %defattr(644,root,root,755) | |
159 | %doc *.pdf |