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