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