Name: tbb Summary: The Threading Building Blocks library abstracts low-level threading details Version: 2020.3 Release: 8%{?dist}.1 License: ASL 2.0 URL: http://threadingbuildingblocks.org/ Source0: https://github.com/intel/tbb/archive/v%{version}/%{name}-%{version}.tar.gz # These three are downstream sources. Source6: tbb.pc Source7: tbbmalloc.pc Source8: tbbmalloc_proxy.pc # Don't snip -Wall from C++ flags. Add -fno-strict-aliasing, as that # uncovers some static-aliasing warnings. # Related: https://bugzilla.redhat.com/show_bug.cgi?id=1037347 Patch0: tbb-2019-dont-snip-Wall.patch # Make attributes of aliases match those on the aliased function. Patch1: tbb-2020-attributes.patch # Fix test-thread-monitor, which had multiple bugs that could (and did, on # ppc64le) result in a hang. Patch2: tbb-2019-test-thread-monitor.patch # Fix a test that builds a 4-thread barrier, but cannot guarantee that more # than 2 threads will be available to use it. Patch3: tbb-2019-test-task-scheduler-init.patch # Fix ABI break resulting from tbb::empty_task being removed from libtbb.so's # exported symbols Patch4: tbb-mark-empty_task-execute-with-gnu-used.patch BuildRequires: cmake BuildRequires: doxygen BuildRequires: gcc-c++ BuildRequires: make BuildRequires: python3-devel BuildRequires: swig %description Threading Building Blocks (TBB) is a C++ runtime library that abstracts the low-level threading details necessary for optimal multi-core performance. It uses common C++ templates and coding style to eliminate tedious threading implementation work. TBB requires fewer lines of code to achieve parallelism than other threading models. The applications you write are portable across platforms. Since the library is also inherently scalable, no code maintenance is required as more processor cores become available. %package devel Summary: The Threading Building Blocks C++ headers and shared development libraries Requires: %{name}%{?_isa} = %{version}-%{release} %description devel Header files and shared object symlinks for the Threading Building Blocks (TBB) C++ libraries. %package doc Summary: The Threading Building Blocks documentation %description doc HTML documentation for the user of the Threading Building Block (TBB) C++ library. %package -n python3-%{name} Summary: Python 3 TBB module %description -n python3-%{name} Python 3 TBB module. %prep %autosetup -p1 -n oneTBB-%{version} # For repeatable builds, don't query the hostname or architecture sed -i 's/"`hostname -s`" ("`uname -m`"/fedorabuild (%{_arch}/' \ build/version_info_linux.sh # Insert --as-needed before the libraries to be linked. sed -i "s/-fPIC/& -Wl,--as-needed/" build/linux.gcc.inc # Invoke the right python binary directly sed -i 's,env python,python3,' python/TBB.py python/tbb/__*.py # Remove shebang from files that don't need it sed -i '/^#!/d' python/tbb/{pool,test}.py # Disable jQuery use sed -i '/^SEARCHENGINE/s/YES/NO/' Doxyfile %build compiler="" if [[ %{__cc} == *"gcc"* ]]; then compiler="gcc" elif [[ %{__cc} == *"clang"* ]]; then compiler="clang" else compiler="%{__cc}" fi %make_build tbb_build_prefix=obj stdver=c++14 \ compiler=${compiler} \ CXXFLAGS="%{optflags} -DUSE_PTHREAD" \ LDFLAGS="$RPM_LD_FLAGS -lpthread" for file in %{SOURCE6} %{SOURCE7} %{SOURCE8}; do base=$(basename ${file}) sed 's/_FEDORA_VERSION/%{version}/' ${file} > ${base} touch -r ${file} ${base} done # Build for python 3 . build/obj_release/tbbvars.sh pushd python %make_build -C rml stdver=c++14 \ compiler=${compiler} \ CPLUS_FLAGS="%{optflags} -DUSE_PTHREAD" \ LDFLAGS="$RPM_LD_FLAGS -lpthread" cp -p rml/libirml.so* . %py3_build popd # Build the documentation make doxygen # We don't want to ship jQuery in the tbb-doc package rm html/jquery.js find html -name '*.html' | xargs sed -i '/