# # spec file for package tbb # # Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %define rel_ver 2018_U2 %define so_ver 2 %bcond_without python2 %bcond_without python3 Name: tbb Version: 2018_20171205 Release: 4.1 Summary: Threading Building Blocks (TBB) License: Apache-2.0 Group: Development/Libraries/C and C++ Url: https://www.threadingbuildingblocks.org/ Source0: https://github.com/01org/tbb/archive/2018_U2.tar.gz # PATCH-FIX-OPENSUSE optflags.patch -- Use rpm optflags Patch1: optflags.patch # PATCH-FIX-OPENSUSE reproducible.patch -- Do not compile build hostname+kernel into binary Patch2: reproducible.patch # PATCH-FIX-OPENSUSE disable-irml.patch -- Don't try to link to irml Patch3: disable-irml.patch BuildRequires: gcc-c++ %if %{with python2} BuildRequires: python2-devel %endif %if %{with python3} BuildRequires: python3-devel %endif BuildRequires: swig >= 3.0.6 %description Threading Building Blocks (TBB) offers a rich and complete approach to expressing parallelism in a C++ program. It is a library that helps you take advantage of multi-core processor performance without having to be a threading expert. Threading Building Blocks is not just a threads-replacement library. It represents a higher-level, task-based parallelism that abstracts platform details and threading mechanism for performance and scalability. %package -n libtbb%{so_ver} Summary: Threading Building Blocks (TBB) Group: System/Libraries Provides: %{name} = %{version} Obsoletes: %{name} < %{version} %description -n libtbb%{so_ver} Threading Building Blocks (TBB) offers a rich and complete approach to expressing parallelism in a C++ program. It is a library that helps you take advantage of multi-core processor performance without having to be a threading expert. Threading Building Blocks is not just a threads-replacement library. It represents a higher-level, task-based parallelism that abstracts platform details and threading mechanism for performance and scalability. %package -n libtbbmalloc%{so_ver} Summary: Threading Building Blocks (TBB) Group: System/Libraries Provides: %{name} = %{version} Obsoletes: %{name} < %{version} %description -n libtbbmalloc%{so_ver} This subpackage contains the two TBB memory allocator templates that are similar to the STL template class std::allocator. These two templates, scalable_allocator and cache_aligned_allocator, address critical issues in parallel programming: scalability and false sharing. %package -n python2-%{name} Summary: Python 2 support for Threading Building Blocks (TBB) Group: Development/Languages/Python %description -n python2-%{name} This package contains python 2 bindings for Threading Building Blocks (TBB). %package -n python3-%{name} Summary: Python 3 support for Threading Building Blocks (TBB) Group: Development/Languages/Python %description -n python3-%{name} This package contains python 2 bindings for Threading Building Blocks (TBB). %package devel Summary: Development Files for Threading Building Blocks (TBB) Group: Development/Libraries/C and C++ Requires: c++_compiler Requires: libtbb%{so_ver} = %{version} Requires: libtbbmalloc%{so_ver} = %{version} %description devel Threading Building Blocks (TBB) offers a rich and complete approach to expressing parallelism in a C++ program. It is a library that helps you take advantage of multi-core processor performance without having to be a threading expert. Threading Building Blocks is not just a threads-replacement library. It represents a higher-level, task-based parallelism that abstracts platform details and threading mechanism for performance and scalability. This package contains the header files needed for development with tbb. %prep %setup -q -n %{name}-%{rel_ver} %patch1 -p1 %patch2 -p1 %patch3 -p1 %build make OPTFLAGS="%{optflags}" %{?_smp_mflags} tbb_build_prefix=obj mkdir lib; pushd lib ln -s ../build/obj_release/*.so* . popd cp -r python python3 export TBBROOT=$PWD . build/obj_release/tbbvars.sh %if %{with python2} pushd python %python2_build popd %endif %if %{with python3} pushd python3 %python3_build popd %endif %install mkdir -p %{buildroot}%{_includedir} mkdir -p %{buildroot}%{_libdir} pushd include find tbb -type f -exec \ install -Dpm 644 {} %{buildroot}%{_includedir}/{} \ \; popd pushd build/obj_release for file in libtbb{,malloc{,_proxy}}; do install -Dpm 0755 ${file}.so.%{so_ver} %{buildroot}%{_libdir} ln -s $file.so.%{so_ver} %{buildroot}%{_libdir}/$file.so done popd %if %{with python2} pushd python %python2_install popd %endif %if %{with python3} pushd python3 %python3_install popd %endif %post -n libtbb%{so_ver} -p /sbin/ldconfig %postun -n libtbb%{so_ver} -p /sbin/ldconfig %post -n libtbbmalloc%{so_ver} -p /sbin/ldconfig %postun -n libtbbmalloc%{so_ver} -p /sbin/ldconfig %files -n libtbb%{so_ver} %{_libdir}/libtbb.so.%{so_ver}* %if %{with python2} %files -n python2-%{name} %{python_sitearch}/* %endif %if %{with python3} %files -n python3-%{name} %{python3_sitearch}/* %endif %files -n libtbbmalloc%{so_ver} %{_libdir}/libtbbmalloc.so.%{so_ver}* %{_libdir}/libtbbmalloc_proxy.so.%{so_ver}* %files devel %doc CHANGES LICENSE index.html %doc doc/Release_Notes.txt doc/html/ %{_includedir}/tbb/ %{_libdir}/libtbb.so %{_libdir}/libtbbmalloc.so %{_libdir}/libtbbmalloc_proxy.so %changelog * Fri Aug 24 2018 bwiedemann@suse.com - Extend reproducible.patch to not capture build kernel version (boo#1101107) * Wed Aug 1 2018 bwiedemann@suse.com - Extend reproducible.patch to override build date (boo#1047218) * Mon Jan 8 2018 tchvatal@suse.com - Add conditions to build with py2 and py3 respectively in order to allow us disable one based on codestream * Thu Dec 21 2017 idonmez@suse.com - Add disable-irml.patch to disable linking to libirml - Actually update to tarball to 2018_U2 release * Sat Dec 16 2017 idonmez@suse.com - Update to version 2018_U2 * lambda-friendly overloads for parallel_scan. * support of static and simple partitioners in parallel_deterministic_reduce. * initial support for Flow Graph Analyzer to do parallel_for. * reservation support in overwrite_node and write_once_node. * Fixed a potential deadlock scenario in the flow graph that affected IntelĀ® TBB 2018 Initial Release. * Fixed constructors of concurrent_hash_map to be exception-safe. * Fixed auto-initialization in the main thread to be cleaned up at shutdown. * Fixed a crash when tbbmalloc_proxy is used together with dbghelp. * Fixed static_partitioner to assign tasks properly in case of nested parallelism. * Wed Nov 1 2017 mpluskal@suse.com - Build python2 and python3 bindings - Do not bundle python bindings with shared library * Thu Sep 21 2017 idonmez@suse.com - Update to version 2018 release * Now fully supports this_task_arena::isolate() function. * Parallel STL, an implementation of the C++ standard library algorithms with support for execution policies, has been introduced. * Fixed a bug preventing use of streaming_node and opencl_node with Clang. * Fixed this_task_arena::isolate() function to work correctly with parallel_invoke and parallel_do algorithms. * Fixed a memory leak in composite_node. * Fixed an assertion failure in debug tbbmalloc binaries when TBBMALLOC_CLEAN_ALL_BUFFERS is used. * Tue May 30 2017 bwiedemann@suse.com - Add reproducible.patch to not add build hostname+kernel to binary * Wed May 24 2017 idonmez@suse.com - Update to version 2017_20170412 release * Added a blocking terminate extension to the task_scheduler_init class that allows an object to wait for termination of worker threads. * Wed Apr 19 2017 idonmez@suse.com - Add missing include files boo#1034842 * Sun Mar 5 2017 idonmez@suse.com - Update to 2017_20170226 release * Added support for C++11 move semantics in parallel_do. * Constructors for many classes, including graph nodes, concurrent containers, thread-local containers, etc., are declared explicit and cannot be used for implicit conversions anymore. * Added a workaround for bug 16657 in the GNU C Library (glibc) affecting the debug version of tbb::mutex. * Fixed a crash in pool_identify() called for an object allocated in another thread. * Mon Dec 12 2016 idonmez@suse.com - Update to 2017_20161128 release * Added template class gfx_factory to the flow graph API. It implements the Factory concept for streaming_node to offload computations to Intel processor graphics. * Fixed a possible deadlock caused by missed wakeup signals in task_arena::execute(). * Thu Nov 3 2016 idonmez@suse.com - Update to version 2017_20161004 * Fixed the issue with task_arena::execute() not being processed when the calling thread cannot join the arena. * Sat Sep 17 2016 idonmez@suse.com - Updated to version 2017_20160722 * static_partitioner class is now a fully supported feature. * async_node class is now a fully supported feature. * For 64-bit platforms, quadrupled the worst-case limit on the amount of memory the Intel TBB allocator can handle. * Added TBB_USE_GLIBCXX_VERSION macro to specify the version of GNU libstdc++ when it cannot be properly recognized, e.g. when used with Clang on Linux* OS. Inspired by a contribution from David A. * Added graph/stereo example to demostrate tbb::flow::async_msg. * Removed a few cases of excessive user data copying in the flow graph. * Reworked split_node to eliminate unnecessary overheads. * Added support for C++11 move semantics to the argument of tbb::parallel_do_feeder::add() method. * Added C++11 move constructor and assignment operator to tbb::combinable template class. * Added tbb::this_task_arena::max_concurrency() function and max_concurrency() method of class task_arena returning the maximal number of threads that can work inside an arena. * Deprecated tbb::task_arena::current_thread_index() static method; use tbb::this_task_arena::current_thread_index() function instead. - License changed to Apache-2.0 - Please see included CHANGES file for all changes. * Wed Jun 8 2016 idonmez@suse.com - Update to version 44_20160526 * Added a Python module which is able to replace Python's thread pool class with the implementation based on Intel TBB task scheduler. * Fixed the implementation of 64-bit tbb::atomic for IA-32 architecture to work correctly with GCC 5.2 in C++11/14 mode. * Fixed a possible crash when tasks with affinity (e.g. specified via affinity_partitioner) are used simultaneously with task priority changes. * Wed May 4 2016 jengelh@inai.de - Update group, and description of tbbmalloc. * Wed May 4 2016 idonmez@suse.com - Update to version 44_20160128: * Lots of changes, see the CHANGES file. - Drop tbb-4.0-cas.patch, fixed upstream. * Sun Feb 17 2013 asterios.dramis@gmail.com - Update to version 41_20130116: * See CHANGES file for news. - Removed tbb package which included only doc files (moved them to tbb-devel). - Updated optflags.patch to make it apply correctly and also fix "File is compiled without RPM_OPT_FLAGS" rpm post build check warning. - Added a patch "tbb-4.0-cas.patch" to fix build on PowerPC (taken from Fedora). * Sun Jan 29 2012 jengelh@medozas.de - Remove redundant tags/sections per specfile guideline suggestions - Parallel building using %%_smp_mflags * Sun Aug 14 2011 crrodriguez@opensuse.org - Update to version tbb30_20110704 * Wed Sep 16 2009 meissner@suse.de - Reimport from Andi Kleens directory. * Sat Sep 5 2009 andi@firstfloor.org - update to 22_20090809oss, install machine/* includes * Thu Sep 11 2008 skh@suse.de - update to snapshot 21_20080825 (for details see CHANGES file in package) - remove obsolete patch tbb-build.patch - split off libtbb2 and libtbbmalloc2 subpackages * Wed Aug 13 2008 ro@suse.de - add ExclusiveArch * Mon Apr 28 2008 skh@suse.de - update to source version tbb20_20080408oss_src * Wed Feb 13 2008 dmueller@suse.de - fix buildrequires * Fri Feb 8 2008 skh@suse.de - initial package from version 2.0, source version tbb20_20080122oss_src