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