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