]>
Commit | Line | Data |
---|---|---|
5d11029b | 1 | %define major 4 |
38b7cc08 ER |
2 | %define minor 3 |
3 | %define micro 20150611 | |
546cff52 | 4 | %define sourcebasename tbb%{major}%{minor}_%{micro}oss |
4ebeb785 | 5 | Summary: The Threading Building Blocks library abstracts low-level threading details |
546cff52 | 6 | Summary(pl.UTF-8): Threading Building Blocks - biblioteka abstrahująca niskopoziomowe szczegóły obsługi wątków |
4ebeb785 | 7 | Name: tbb |
546cff52 | 8 | Version: %{major}.%{minor}.%{micro} |
5d11029b | 9 | Release: 2 |
546cff52 | 10 | License: GPL v2 with runtime exception |
4ebeb785 | 11 | Group: Development/Tools |
38b7cc08 ER |
12 | # Source0Download: https://www.threadingbuildingblocks.org/download |
13 | Source0: https://www.threadingbuildingblocks.org/sites/default/files/software_releases/source/%{sourcebasename}_src.tgz | |
14 | # Source0-md5: bb144ec868c53244ea6be11921d86f03 | |
4ebeb785 ER |
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 | |
546cff52 | 23 | Source5: %{name}.pc.in |
f89f9a85 ER |
24 | Source6: %{name}malloc.pc.in |
25 | Source7: %{name}malloc_proxy.pc.in | |
5d11029b | 26 | Patch0: no-forced-arch-bits.patch |
4ebeb785 | 27 | Patch1: %{name}-cxxflags.patch |
eb5b42b5 | 28 | Patch2: mfence.patch |
546cff52 | 29 | URL: http://www.threadingbuildingblocks.org/ |
4ebeb785 | 30 | BuildRequires: libstdc++-devel |
8c6cde5d | 31 | BuildRequires: pkgconfig |
546cff52 | 32 | BuildRequires: sed >= 4.0 |
8c6cde5d | 33 | # We need "arch" binary: |
4ebeb785 | 34 | BuildRequires: util-linux |
5d11029b | 35 | ExclusiveArch: %{ix86} %{x8664} x32 %{arm} ia64 ppc ppc64 |
f1716db8 JB |
36 | # __TBB_machine_cmpswp8 uses gcc's __sync_val_compare_and_swap8 or directly cmpxchg8b asm instruction |
37 | ExcludeArch: i386 i486 | |
4ebeb785 ER |
38 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
39 | ||
40 | %description | |
41 | Threading Building Blocks (TBB) is a C++ runtime library that | |
42 | abstracts the low-level threading details necessary for optimal | |
43 | multi-core performance. It uses common C++ templates and coding style | |
44 | to eliminate tedious threading implementation work. | |
45 | ||
46 | TBB requires fewer lines of code to achieve parallelism than other | |
47 | threading models. The applications you write are portable across | |
546cff52 JB |
48 | supported platforms. Since the library is also inherently scalable, no |
49 | code maintenance is required as more processor cores become available. | |
50 | ||
51 | %description -l pl.UTF-8 | |
52 | Threading Building Blocks (TBB) to biblioteka uruchomieniowa C++ | |
53 | abstrahująca niskopoziomowe szczegóły obsługi wątków potrzebne dla | |
54 | optymalnej wydajności na procesorach wielordzeniowych. Wykorzystuje | |
55 | szablony C++ w celu wyeliminowania nudnej pracy nad wielowątkowością. | |
56 | ||
57 | TBB wymaga mniej linii kodu do osiągnięcia równoległości niż inne | |
58 | modele wątkowania. Aplikacje są przenośne między obsługiwanymi | |
59 | platformami. Biblioteka jest skalowalna, więc nie jest wymagane | |
60 | modyfikowanie kodu wraz z dostępnością większej liczby rdzeni | |
61 | procesor. | |
4ebeb785 ER |
62 | |
63 | %package devel | |
546cff52 JB |
64 | Summary: The Threading Building Blocks C++ headers |
65 | Summary(pl.UTF-8): Pliki nagłówkowe C++ bibliotek Threading Building Blocks | |
4ebeb785 ER |
66 | Group: Development/Libraries |
67 | Requires: %{name} = %{version}-%{release} | |
68 | ||
69 | %description devel | |
70 | Header files and shared object symlinks for the Threading Building | |
71 | Blocks (TBB) C++ libraries. | |
72 | ||
546cff52 JB |
73 | %description devel -l pl.UTF-8 |
74 | Pliki nagłówkowe i dowiązania symboliczne dla bibliotek C++ Threading | |
75 | Building Blocks. | |
76 | ||
4ebeb785 ER |
77 | %package doc |
78 | Summary: The Threading Building Blocks documentation | |
546cff52 | 79 | Summary(pl.UTF-8): Dokumentacja bibliotek Threading Building Blocks |
4ebeb785 ER |
80 | Group: Documentation |
81 | ||
82 | %description doc | |
83 | PDF documentation for the user of the Threading Building Block (TBB) | |
84 | C++ library. | |
85 | ||
546cff52 JB |
86 | %description doc -l pl.UTF-8 |
87 | Dokumentacja w formacie PDF dla użytkowników biblioteki C++ Threading | |
88 | Building Blocks (TBB). | |
89 | ||
4ebeb785 ER |
90 | %prep |
91 | %setup -q -n %{sourcebasename} | |
5d11029b | 92 | %patch0 -p1 |
eb5b42b5 ER |
93 | %patch1 -p1 |
94 | %patch2 -p1 | |
4ebeb785 ER |
95 | |
96 | cp -p %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} . | |
97 | ||
f89f9a85 ER |
98 | cp -p %{SOURCE5} %{SOURCE6} %{SOURCE7} . |
99 | ||
4ebeb785 ER |
100 | %build |
101 | %{__make} \ | |
546cff52 | 102 | CPLUS="%{__cxx}" \ |
4ebeb785 ER |
103 | CXXFLAGS="%{rpmcxxflags}" \ |
104 | tbb_build_prefix=obj | |
105 | ||
106 | %install | |
107 | rm -rf $RPM_BUILD_ROOT | |
eb5b42b5 | 108 | install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir},%{_pkgconfigdir}} |
f89f9a85 | 109 | |
4ebeb785 | 110 | cd build/obj_release |
f89f9a85 | 111 | for file in tbb tbbmalloc tbbmalloc_proxy; do |
546cff52 JB |
112 | install lib${file}.so.2 $RPM_BUILD_ROOT%{_libdir}/lib${file}.so.2.%{version} |
113 | ln -s lib${file}.so.2.%{version} $RPM_BUILD_ROOT%{_libdir}/lib${file}.so | |
114 | ln -s lib${file}.so.2.%{version} $RPM_BUILD_ROOT%{_libdir}/lib${file}.so.2 | |
4ebeb785 ER |
115 | done |
116 | cd - | |
117 | ||
118 | cd include | |
119 | find tbb -type f -name '*.h' -exec \ | |
120 | install -p -D -m 644 {} $RPM_BUILD_ROOT%{_includedir}/{} ';' | |
f89f9a85 | 121 | cd - |
4ebeb785 | 122 | |
f89f9a85 ER |
123 | for pc in tbb.pc tbbmalloc.pc tbbmalloc_proxy.pc; do |
124 | in=$pc.in | |
125 | # fail if obsolete | |
126 | [ ! -f $RPM_BUILD_ROOT%{_pkgconfigdir}/$pc ] || exit 1 | |
127 | sed -e ' | |
128 | s,@prefix@,%{_prefix},; | |
129 | s,@libdir@,%{_libdir},; | |
130 | s,@includedir@,%{_includedir}/tbb,; | |
131 | s,@version@,%{version}, | |
132 | ' $in > $RPM_BUILD_ROOT%{_pkgconfigdir}/$pc | |
133 | done | |
4ebeb785 ER |
134 | |
135 | %clean | |
136 | rm -rf $RPM_BUILD_ROOT | |
137 | ||
546cff52 JB |
138 | %post -p /sbin/ldconfig |
139 | %postun -p /sbin/ldconfig | |
140 | ||
4ebeb785 ER |
141 | %files |
142 | %defattr(644,root,root,755) | |
546cff52 | 143 | %doc CHANGES COPYING doc/Release_Notes.txt |
4ebeb785 ER |
144 | %attr(755,root,root) %{_libdir}/libtbb.so.*.*.* |
145 | %attr(755,root,root) %ghost %{_libdir}/libtbb.so.2 | |
146 | %attr(755,root,root) %{_libdir}/libtbbmalloc.so.*.*.* | |
147 | %attr(755,root,root) %ghost %{_libdir}/libtbbmalloc.so.2 | |
546cff52 JB |
148 | %attr(755,root,root) %{_libdir}/libtbbmalloc_proxy.so.*.*.* |
149 | %attr(755,root,root) %ghost %{_libdir}/libtbbmalloc_proxy.so.2 | |
4ebeb785 ER |
150 | |
151 | %files devel | |
152 | %defattr(644,root,root,755) | |
546cff52 JB |
153 | %attr(755,root,root) %{_libdir}/libtbb.so |
154 | %attr(755,root,root) %{_libdir}/libtbbmalloc.so | |
155 | %attr(755,root,root) %{_libdir}/libtbbmalloc_proxy.so | |
4ebeb785 | 156 | %{_includedir}/tbb |
546cff52 | 157 | %{_pkgconfigdir}/tbb.pc |
f89f9a85 ER |
158 | %{_pkgconfigdir}/tbbmalloc.pc |
159 | %{_pkgconfigdir}/tbbmalloc_proxy.pc | |
4ebeb785 ER |
160 | |
161 | %files doc | |
162 | %defattr(644,root,root,755) | |
163 | %doc *.pdf |