[12418] | 1 | %bcond_with test |
---|
[9410] | 2 | |
---|
[12418] | 3 | Name: tbb |
---|
| 4 | Summary: The Threading Building Blocks library abstracts low-level threading details |
---|
| 5 | Summary(ja): スレッド処理を抽象化するスレッディング・ビルディング・ブロックライブラリ |
---|
| 6 | Version: 2020.2 |
---|
| 7 | Release: 1%{?_dist_release} |
---|
| 8 | Group: System Environment/Libraries |
---|
| 9 | Vendor: Project Vine |
---|
| 10 | Distribution: Vine Linux |
---|
[9410] | 11 | |
---|
| 12 | |
---|
[12418] | 13 | License: ASL 2.0 |
---|
| 14 | URL: https://github.com/oneapi-src/oneTBB |
---|
[9410] | 15 | |
---|
[12418] | 16 | Source0: https://github.com/intel/tbb/archive/v%{version}/%{name}-%{version}.tar.gz |
---|
| 17 | # These three are downstream sources. |
---|
| 18 | Source6: tbb.pc |
---|
| 19 | Source7: tbbmalloc.pc |
---|
| 20 | Source8: tbbmalloc_proxy.pc |
---|
[9410] | 21 | |
---|
| 22 | # Don't snip -Wall from C++ flags. Add -fno-strict-aliasing, as that |
---|
| 23 | # uncovers some static-aliasing warnings. |
---|
| 24 | # Related: https://bugzilla.redhat.com/show_bug.cgi?id=1037347 |
---|
[12418] | 25 | Patch0: tbb-2019-dont-snip-Wall.patch |
---|
[9410] | 26 | |
---|
[12418] | 27 | # Make attributes of aliases match those on the aliased function. |
---|
| 28 | Patch1: tbb-2020-attributes.patch |
---|
| 29 | |
---|
| 30 | # Fix test-thread-monitor, which had multiple bugs that could (and did, on |
---|
| 31 | # ppc64le) result in a hang. |
---|
| 32 | Patch2: tbb-2019-test-thread-monitor.patch |
---|
| 33 | |
---|
| 34 | # Fix a test that builds a 4-thread barrier, but cannot guarantee that more |
---|
| 35 | # than 2 threads will be available to use it. |
---|
| 36 | Patch3: tbb-2019-test-task-scheduler-init.patch |
---|
| 37 | |
---|
| 38 | # Fix compilation on aarch64 and s390x. See |
---|
| 39 | # https://github.com/intel/tbb/issues/186 |
---|
| 40 | Patch4: tbb-2019-fetchadd4.patch |
---|
| 41 | |
---|
[9410] | 42 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
[12418] | 43 | BuildRequires: doxygen |
---|
[9410] | 44 | BuildRequires: libstdc++-devel |
---|
[12418] | 45 | BuildRequires: python3-rpm-macros |
---|
| 46 | BuildRequires: python3-devel |
---|
| 47 | BuildRequires: python3-setuptools |
---|
| 48 | BuildRequires: swig |
---|
[9410] | 49 | |
---|
| 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 |
---|
| 58 | platforms. Since the library is also inherently scalable, no code |
---|
| 59 | maintenance is required as more processor cores become available. |
---|
| 60 | |
---|
| 61 | |
---|
| 62 | %package devel |
---|
| 63 | Summary: The Threading Building Blocks C++ headers and shared development libraries |
---|
[12418] | 64 | Summary(ja): TBBの C++ ヘッダファイルと開発用共有ライブラリ |
---|
[9410] | 65 | Group: Development/Libraries |
---|
| 66 | Requires: %{name} = %{version}-%{release} |
---|
| 67 | |
---|
| 68 | %description devel |
---|
| 69 | Header files and shared object symlinks for the Threading Building |
---|
| 70 | Blocks (TBB) C++ libraries. |
---|
| 71 | |
---|
| 72 | |
---|
| 73 | %package doc |
---|
| 74 | Summary: The Threading Building Blocks documentation |
---|
[12418] | 75 | Summary(ja): TBBのドキュメント |
---|
[9410] | 76 | Group: Documentation |
---|
| 77 | BuildArch: noarch |
---|
| 78 | |
---|
| 79 | %description doc |
---|
| 80 | PDF documentation for the user of the Threading Building Block (TBB) |
---|
| 81 | C++ library. |
---|
| 82 | |
---|
| 83 | |
---|
[12418] | 84 | %package -n python3-%{name} |
---|
| 85 | Summary: Python 3 TBB module |
---|
| 86 | %{?python_provide:%python_provide python3-%{name}} |
---|
| 87 | |
---|
| 88 | %description -n python3-%{name} |
---|
| 89 | Python 3 TBB module. |
---|
| 90 | |
---|
| 91 | |
---|
[9410] | 92 | %prep |
---|
[12418] | 93 | %autosetup -p1 -n oneTBB-%{version} |
---|
[9410] | 94 | |
---|
[12418] | 95 | # For repeatable builds, don't query the hostname or architecture |
---|
| 96 | sed -i 's/"`hostname -s`" ("`uname -m`"/fedorabuild (%{_arch}/' \ |
---|
| 97 | build/version_info_linux.sh |
---|
| 98 | |
---|
| 99 | # Do not assume the RTM instructions are available. |
---|
| 100 | # Insert --as-needed before the libraries to be linked. |
---|
| 101 | sed -e 's/-mrtm//' \ |
---|
| 102 | -e "s/-fPIC/& -Wl,--as-needed/" \ |
---|
| 103 | -i build/linux.gcc.inc |
---|
| 104 | |
---|
| 105 | # Invoke the right python binary directly |
---|
| 106 | sed -i 's,env python,python3,' python/TBB.py python/tbb/__*.py |
---|
| 107 | |
---|
| 108 | # Remove shebang from files that don't need it |
---|
| 109 | sed -i '/^#!/d' python/tbb/{pool,test}.py |
---|
| 110 | |
---|
| 111 | |
---|
[9410] | 112 | %build |
---|
[12418] | 113 | make %{?_smp_mflags} tbb_build_prefix=obj stdver=c++14 \ |
---|
| 114 | compiler=gcc \ |
---|
| 115 | CXXFLAGS="%{optflags} -DDO_ITT_NOTIFY -DUSE_PTHREAD" \ |
---|
| 116 | LDFLAGS="$RPM_LD_FLAGS -lpthread" |
---|
[9410] | 117 | for file in %{SOURCE6} %{SOURCE7} %{SOURCE8}; do |
---|
[12418] | 118 | base=$(basename ${file}) |
---|
| 119 | sed 's/_FEDORA_VERSION/%{version}/' ${file} > ${base} |
---|
| 120 | touch -r ${file} ${base} |
---|
[9410] | 121 | done |
---|
| 122 | |
---|
[12418] | 123 | # Build for python 3 |
---|
| 124 | . build/obj_release/tbbvars.sh |
---|
| 125 | pushd python |
---|
| 126 | make %{?_smp_mflags} -C rml stdver=c++14 \ |
---|
| 127 | compiler=gcc \ |
---|
| 128 | CPLUS_FLAGS="%{optflags} -DDO_ITT_NOTIFY -DUSE_PTHREAD" \ |
---|
| 129 | LDFLAGS="$RPM_LD_FLAGS -lpthread" |
---|
| 130 | cp -p rml/libirml.so* . |
---|
| 131 | %py3_build |
---|
| 132 | popd |
---|
| 133 | |
---|
| 134 | # Build the documentation |
---|
| 135 | make doxygen |
---|
| 136 | |
---|
| 137 | |
---|
| 138 | %if %{with test} |
---|
[9410] | 139 | %check |
---|
[12418] | 140 | # This test assumes it can create thread barriers for arbitrary numbers of |
---|
| 141 | # threads, but tbb limits the number of threads spawned to a function of the |
---|
| 142 | # number of CPUs available. Some of the koji builders have a small number of |
---|
| 143 | # CPUs, so the test hangs waiting for threads that have not been created to |
---|
| 144 | # arrive at the barrier. Skip this test until upstream fixes it. |
---|
| 145 | sed -i '/test_task_scheduler_observer/d' build/Makefile.test |
---|
| 146 | |
---|
| 147 | make test tbb_build_prefix=obj stdver=c++14 CXXFLAGS="%{optflags}" |
---|
[9410] | 148 | %endif |
---|
| 149 | |
---|
[12418] | 150 | |
---|
[9410] | 151 | %install |
---|
| 152 | rm -rf $RPM_BUILD_ROOT |
---|
| 153 | mkdir -p $RPM_BUILD_ROOT%{_libdir} |
---|
| 154 | mkdir -p $RPM_BUILD_ROOT%{_includedir} |
---|
| 155 | |
---|
| 156 | pushd build/obj_release |
---|
| 157 | for file in libtbb{,malloc{,_proxy}}; do |
---|
[12418] | 158 | install -p -D -m 755 ${file}.so.2 $RPM_BUILD_ROOT/%{_libdir} |
---|
| 159 | ln -s $file.so.2 $RPM_BUILD_ROOT/%{_libdir}/$file.so |
---|
[9410] | 160 | done |
---|
| 161 | popd |
---|
| 162 | |
---|
| 163 | pushd include |
---|
| 164 | find tbb -type f ! -name \*.htm\* -exec \ |
---|
[12418] | 165 | install -p -D -m 644 {} $RPM_BUILD_ROOT/%{_includedir}/{} \ |
---|
[9410] | 166 | \; |
---|
| 167 | popd |
---|
| 168 | |
---|
| 169 | for file in %{SOURCE6} %{SOURCE7} %{SOURCE8}; do |
---|
| 170 | install -p -D -m 644 $(basename ${file}) \ |
---|
[12418] | 171 | $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/$(basename ${file}) |
---|
[9410] | 172 | done |
---|
| 173 | |
---|
[12418] | 174 | # Install the rml headers |
---|
| 175 | mkdir -p $RPM_BUILD_ROOT%{_includedir}/rml |
---|
| 176 | cp -p src/rml/include/*.h $RPM_BUILD_ROOT%{_includedir}/rml |
---|
| 177 | |
---|
| 178 | # Python 3 install |
---|
| 179 | . build/obj_release/tbbvars.sh |
---|
| 180 | pushd python |
---|
| 181 | %py3_install |
---|
| 182 | chmod a+x $RPM_BUILD_ROOT%{python3_sitearch}/TBB.py |
---|
| 183 | chmod a+x $RPM_BUILD_ROOT%{python3_sitearch}/tbb/__*.py |
---|
| 184 | cp -p libirml.so.1 $RPM_BUILD_ROOT%{_libdir} |
---|
| 185 | ln -s libirml.so.1 $RPM_BUILD_ROOT%{_libdir}/libirml.so |
---|
| 186 | popd |
---|
| 187 | |
---|
| 188 | # Install the cmake files |
---|
| 189 | mkdir -p $RPM_BUILD_ROOT%{_libdir}/cmake |
---|
| 190 | cp -a cmake $RPM_BUILD_ROOT%{_libdir}/cmake/%{name} |
---|
| 191 | rm $RPM_BUILD_ROOT%{_libdir}/cmake/%{name}/README.rst |
---|
| 192 | |
---|
| 193 | |
---|
[9410] | 194 | %clean |
---|
| 195 | rm -rf $RPM_BUILD_ROOT |
---|
| 196 | |
---|
[12418] | 197 | |
---|
[9410] | 198 | %post -p /sbin/ldconfig |
---|
| 199 | |
---|
| 200 | %postun -p /sbin/ldconfig |
---|
| 201 | |
---|
[12418] | 202 | |
---|
[9410] | 203 | %files |
---|
[12418] | 204 | %doc doc/Release_Notes.txt README.md |
---|
| 205 | %license LICENSE |
---|
| 206 | %{_libdir}/*.so.* |
---|
[9410] | 207 | |
---|
| 208 | %files devel |
---|
| 209 | %doc CHANGES |
---|
[12418] | 210 | %doc CHANGES cmake/README.rst |
---|
| 211 | %{_includedir}/rml/ |
---|
| 212 | %{_includedir}/tbb/ |
---|
[9410] | 213 | %{_libdir}/*.so |
---|
[12418] | 214 | %{_libdir}/cmake/tbb/ |
---|
[9410] | 215 | %{_libdir}/pkgconfig/*.pc |
---|
| 216 | |
---|
| 217 | %files doc |
---|
| 218 | %doc doc/Release_Notes.txt |
---|
[12418] | 219 | %doc html |
---|
[9410] | 220 | |
---|
[12418] | 221 | |
---|
| 222 | %files -n python3-%{name} |
---|
| 223 | %doc python/index.html |
---|
| 224 | %{python3_sitearch}/TBB* |
---|
| 225 | %{python3_sitearch}/tbb/ |
---|
| 226 | %{python3_sitearch}/__pycache__/TBB* |
---|
| 227 | |
---|
| 228 | |
---|
[9410] | 229 | %changelog |
---|
[12418] | 230 | * Tue Jun 30 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 2020.2-1 |
---|
| 231 | - new upstream release. |
---|
| 232 | |
---|
[10772] | 233 | * Sat Sep 03 2016 Toshiaki Ara <ara_t@384.jp> - 4.3u6-2 |
---|
| 234 | - rebuild with gcc-5.4.0 |
---|
| 235 | |
---|
[9623] | 236 | * Fri Jun 19 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> - 4.3u6-1 |
---|
| 237 | - new upstream release |
---|
| 238 | |
---|
[9410] | 239 | * Wed Mar 4 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> - 4.3u3-2 |
---|
| 240 | - Initial build for Vine Linux based on 4.3 update3 |
---|
| 241 | |
---|
| 242 | * Mon Jan 19 2015 Petr Machata <pmachata@redhat.com> - 4.3-1.20141204 |
---|
| 243 | - Rebase to 4.3u2 |
---|
| 244 | - Drop ExclusiveArch |
---|
| 245 | |
---|
| 246 | * Thu Sep 25 2014 Karsten Hopp <karsten@redhat.com> 4.1-9.20130314 |
---|
| 247 | - enable ppc64le and run 'make test' on that new arch |
---|
| 248 | |
---|
| 249 | * Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.1-8.20130314 |
---|
| 250 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild |
---|
| 251 | |
---|
| 252 | * Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.1-7.20130314 |
---|
| 253 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild |
---|
| 254 | |
---|
| 255 | * Sun Jan 12 2014 Peter Robinson <pbrobinson@fedoraproject.org> 4.1-6.20130314 |
---|
| 256 | - Build on aarch64, minor spec cleanups |
---|
| 257 | |
---|
| 258 | * Tue Dec 3 2013 Petr Machata <pmachata@redhat.com> - 4.1-5.20130314 |
---|
| 259 | - Fix building with -Werror=format-security (tbb-4.1-dont-snip-Wall.patch) |
---|
| 260 | |
---|
| 261 | * Thu Oct 3 2013 Petr Machata <pmachata@redhat.com> - 4.1-4.20130314 |
---|
| 262 | - Fix %%install to also install include files that are not named *.h |
---|
| 263 | |
---|
| 264 | * Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.1-3.20130314 |
---|
| 265 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild |
---|
| 266 | |
---|
| 267 | * Tue May 28 2013 Petr Machata <pmachata@redhat.com> - 4.1-3.20130314 |
---|
| 268 | - Enable ARM arches |
---|
| 269 | |
---|
| 270 | * Wed May 22 2013 Petr Machata <pmachata@redhat.com> - 4.1-2.20130314 |
---|
| 271 | - Fix mfence patch. Since the __TBB_full_memory_fence macro was |
---|
| 272 | function-call-like, it stole () intended for function invocation. |
---|
| 273 | |
---|
| 274 | * Wed May 22 2013 Petr Machata <pmachata@redhat.com> - 4.1-1.20130314 |
---|
| 275 | - Rebase to 4.1 update 3 |
---|
| 276 | |
---|
| 277 | * Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0-7.20120408 |
---|
| 278 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild |
---|
| 279 | |
---|
| 280 | * Tue Aug 28 2012 Petr Machata <pmachata@redhat.com> - 4.0-6.20120408 |
---|
| 281 | - Fix build on PowerPC |
---|
| 282 | |
---|
| 283 | * Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0-5.20120408 |
---|
| 284 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild |
---|
| 285 | |
---|
| 286 | * Thu Jun 7 2012 Petr Machata <pmachata@redhat.com> - 4.0-4.20120408 |
---|
| 287 | - Rebase to 4.0 update 4 |
---|
| 288 | - Refresh Getting_Started.pdf, Reference.pdf, Tutorial.pdf |
---|
| 289 | - Provide pkg-config files |
---|
| 290 | - Resolves: #825402 |
---|
| 291 | |
---|
| 292 | * Thu Apr 05 2012 Karsten Hopp <karsten@redhat.com> 4.0-3.20110809 |
---|
| 293 | - tbb builds now on PPC(64) |
---|
| 294 | |
---|
| 295 | * Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0-2.20110809 |
---|
| 296 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild |
---|
| 297 | |
---|
| 298 | * Tue Oct 18 2011 Petr Machata <pmachata@redhat.com> - 4.0-1.20110809 |
---|
| 299 | - Rebase to 4.0 |
---|
| 300 | - Port the mfence patch |
---|
| 301 | - Refresh the documentation bundle |
---|
| 302 | |
---|
| 303 | * Tue Jul 26 2011 Petr Machata <pmachata@redhat.com> - 3.0-1.20110419 |
---|
| 304 | - Rebase to 3.0-r6 |
---|
| 305 | - Port both patches |
---|
| 306 | - Package Design_Patterns.pdf |
---|
| 307 | - Thanks to Richard Shaw for initial rebase patch |
---|
| 308 | - Resolves: #723043 |
---|
| 309 | |
---|
| 310 | * Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2-3.20090809 |
---|
| 311 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild |
---|
| 312 | |
---|
| 313 | * Thu Jun 10 2010 Petr Machata <pmachata@redhat.com> - 2.2-2.20090809 |
---|
| 314 | - Replace mfence instruction with xchg to make it run on ia32-class |
---|
| 315 | machines without SSE2. |
---|
| 316 | - Resolves: #600654 |
---|
| 317 | |
---|
| 318 | * Tue Nov 3 2009 Petr Machata <pmachata@redhat.com> - 2.2-1.20090809 |
---|
| 319 | - New upstream 2.2 |
---|
| 320 | - Resolves: #521571 |
---|
| 321 | |
---|
| 322 | * Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1-3.20080605 |
---|
| 323 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild |
---|
| 324 | |
---|
| 325 | * Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1-2.20080605 |
---|
| 326 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild |
---|
| 327 | |
---|
| 328 | * Fri Jun 13 2008 Petr Machata <pmachata@redhat.com> - 2.1-1.20080605 |
---|
| 329 | - New upstream 2.1 |
---|
| 330 | - Drop soname patch, parallel make patch, and GCC 4.3 patch |
---|
| 331 | |
---|
| 332 | * Wed Feb 13 2008 Petr Machata <pmachata@redhat.com> - 2.0-4.20070927 |
---|
| 333 | - Review fixes |
---|
| 334 | - Use updated URL |
---|
| 335 | - More timestamp preservation |
---|
| 336 | - Initial import into Fedora CVS |
---|
| 337 | |
---|
| 338 | * Mon Feb 11 2008 Petr Machata <pmachata@redhat.com> - 2.0-3.20070927 |
---|
| 339 | - Review fixes |
---|
| 340 | - Preserve timestamp of installed files |
---|
| 341 | - Fix soname not to contain "debug" |
---|
| 342 | |
---|
| 343 | * Tue Feb 5 2008 Petr Machata <pmachata@redhat.com> - 2.0-2.20070927 |
---|
| 344 | - Review fixes |
---|
| 345 | - GCC 4.3 patchset |
---|
| 346 | - Add BR util-linux net-tools |
---|
| 347 | - Add full URL to Source0 |
---|
| 348 | - Build in debug mode to work around problems with GCC 4.3 |
---|
| 349 | |
---|
| 350 | * Mon Dec 17 2007 Petr Machata <pmachata@redhat.com> - 2.0-1.20070927 |
---|
| 351 | - Initial package. |
---|
| 352 | - Using SONAME patch from Debian. |
---|