]> git.pld-linux.org Git - packages/tbb.git/blob - tbb.spec
link with libatomic on %{armv6}
[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
6 %ifarch %{armv6}
7 %define         with_libatomic  1
8 %endif
9
10 Summary:        The Threading Building Blocks library abstracts low-level threading details
11 Summary(pl.UTF-8):      Threading Building Blocks - biblioteka abstrahująca niskopoziomowe szczegóły obsługi wątków
12 Name:           tbb
13 Version:        %{major}.%{minor}.%{micro}
14 Release:        1
15 License:        Apache v2.0
16 Group:          Development/Tools
17 # Source0Download: https://github.com/oneapi-src/oneTBB/releases
18 Source0:        https://github.com/01org/tbb/archive/v%{version}/oneTBB-%{version}.tar.gz
19 # Source0-md5:  fa317f16003e31e33a57ae7d888403e4
20 Source1:        http://www.threadingbuildingblocks.org/uploads/81/91/Latest%20Open%20Source%20Documentation/Design_Patterns.pdf
21 # Source1-md5:  46062fef922d39abfd464bc06e02cdd8
22 Source2:        http://www.threadingbuildingblocks.org/uploads/81/91/Latest%20Open%20Source%20Documentation/Getting_Started.pdf
23 # Source2-md5:  b8f94104c47f9667e537b98bd940494a
24 Source3:        http://www.threadingbuildingblocks.org/uploads/81/91/Latest%20Open%20Source%20Documentation/Reference.pdf
25 # Source3-md5:  1481cbd378f4964691046d0ba570b374
26 Source4:        http://www.threadingbuildingblocks.org/uploads/81/91/Latest%20Open%20Source%20Documentation/Tutorial.pdf
27 # Source4-md5:  5bbdd1050c5dac5c1b782a6a98db0c46
28 URL:            http://www.threadingbuildingblocks.org/
29 Patch0:         %{name}-x86_32bit.patch
30 BuildRequires:  cmake >= 3.1
31 BuildRequires:  hwloc-devel
32 %{?with_libatomic:BuildRequires:        libatomic-devel}
33 BuildRequires:  libstdc++-devel >= 6:4.7
34 BuildRequires:  pkgconfig
35 BuildRequires:  rpmbuild(macros) >= 2.007
36 BuildRequires:  sed >= 4.0
37 ExclusiveArch:  %{ix86} %{x8664} x32 %{arm} aarch64 ia64 ppc ppc64
38 # __TBB_machine_cmpswp8 uses gcc's __sync_val_compare_and_swap8 or directly cmpxchg8b asm instruction
39 ExcludeArch:    i386 i486
40 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
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
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
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.
71
72 %package devel
73 Summary:        The Threading Building Blocks C++ headers
74 Summary(pl.UTF-8):      Pliki nagłówkowe C++ bibliotek Threading Building Blocks
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
82 %description devel -l pl.UTF-8
83 Pliki nagłówkowe i dowiązania symboliczne dla bibliotek C++ Threading
84 Building Blocks.
85
86 %package doc
87 Summary:        The Threading Building Blocks documentation
88 Summary(pl.UTF-8):      Dokumentacja bibliotek Threading Building Blocks
89 Group:          Documentation
90
91 %description doc
92 PDF documentation for the user of the Threading Building Block (TBB)
93 C++ library.
94
95 %description doc -l pl.UTF-8
96 Dokumentacja w formacie PDF dla użytkowników biblioteki C++ Threading
97 Building Blocks (TBB).
98
99 %prep
100 %setup -q -n oneTBB-%{version}
101 %patch0 -p1
102
103 cp -p %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} .
104
105 %build
106 %cmake -B build \
107         %{?with_libatomic:-DTBB_LIB_LINK_LIBS=-latomic} \
108         -DTBB_STRICT:BOOL=OFF \
109         -DTBB_TEST:BOOL=OFF
110
111 %{__make} -C build
112
113 %install
114 rm -rf $RPM_BUILD_ROOT
115
116 %{__make} -C build install \
117         DESTDIR=$RPM_BUILD_ROOT
118
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
124 %clean
125 rm -rf $RPM_BUILD_ROOT
126
127 %post   -p /sbin/ldconfig
128 %postun -p /sbin/ldconfig
129
130 %files
131 %defattr(644,root,root,755)
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
135 %attr(755,root,root) %{_libdir}/libtbbbind.so.*.*
136 %attr(755,root,root) %ghost %{_libdir}/libtbbbind.so.3
137 %attr(755,root,root) %{_libdir}/libtbbmalloc.so.*.*
138 %attr(755,root,root) %ghost %{_libdir}/libtbbmalloc.so.2
139 %attr(755,root,root) %{_libdir}/libtbbmalloc_proxy.so.*.*
140 %attr(755,root,root) %ghost %{_libdir}/libtbbmalloc_proxy.so.2
141
142 %files devel
143 %defattr(644,root,root,755)
144 %attr(755,root,root) %{_libdir}/libtbb.so
145 %attr(755,root,root) %{_libdir}/libtbbbind.so
146 %attr(755,root,root) %{_libdir}/libtbbmalloc.so
147 %attr(755,root,root) %{_libdir}/libtbbmalloc_proxy.so
148 # likely to be owned by different package?
149 %dir %{_includedir}/oneapi
150 %{_includedir}/oneapi/tbb.h
151 %{_includedir}/oneapi/tbb
152 %{_includedir}/tbb
153 %{_pkgconfigdir}/%{tbb_pc_name}.pc
154 %if "%{tbb_pc_name}" != "tbb"
155 %{_pkgconfigdir}/tbb.pc
156 %endif
157 %{_libdir}/cmake/TBB
158
159 %files doc
160 %defattr(644,root,root,755)
161 %doc *.pdf
This page took 0.056149 seconds and 3 git commands to generate.