Accepting request 924165 from home:bnavigator:branches:devel:libraries:c_c++
- Allow gcc11 - Add tbb-pr609-32bit-mwaitpkg.patch gh#oneapi-src/oneTBB#609 * fixes 32-bit build with gcc11 - Only run ctest when --with test is given - Update to version 2021.4 * Large release notes since 2020.3: https://software.intel.com/content/www/us/en/develop/articles/intel-oneapi-threading-building-blocks-release-notes.html - Drop python2 package - Drop patches: * disable-irml.patch -- install the library * optflags.patch -- build system change * reproducible.patch -- build system change - Refresh cmake-remove-include-path.patch - Add libirml subpackage for python module - Add libtbbbind library package for NUMA support OBS-URL: https://build.opensuse.org/request/show/924165 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/tbb?expand=0&rev=70
This commit is contained in:
parent
0ad932aa8a
commit
5054a0acde
8
_constraints
Normal file
8
_constraints
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<constraints>
|
||||||
|
<hardware>
|
||||||
|
<memory>
|
||||||
|
<size unit="M">8000</size>
|
||||||
|
</memory>
|
||||||
|
<processors>4</processors>
|
||||||
|
</hardware>
|
||||||
|
</constraints>
|
@ -1,13 +1,13 @@
|
|||||||
Index: oneTBB-2020.2/cmake/templates/TBBConfigInternal.cmake.in
|
Index: oneTBB-2021.3.0/cmake/templates/TBBConfig.cmake.in
|
||||||
===================================================================
|
===================================================================
|
||||||
--- oneTBB-2020.2.orig/cmake/templates/TBBConfigInternal.cmake.in
|
--- oneTBB-2021.3.0.orig/cmake/templates/TBBConfig.cmake.in
|
||||||
+++ oneTBB-2020.2/cmake/templates/TBBConfigInternal.cmake.in
|
+++ oneTBB-2021.3.0/cmake/templates/TBBConfig.cmake.in
|
||||||
@@ -57,8 +57,6 @@ foreach (_tbb_component ${TBB_FIND_COMPO
|
@@ -58,8 +58,6 @@ foreach (_tbb_component ${TBB_FIND_COMPO
|
||||||
if (EXISTS "${_tbb_release_lib}" OR EXISTS "${_tbb_debug_lib}")
|
|
||||||
if (NOT TARGET TBB::${_tbb_component})
|
|
||||||
add_library(TBB::${_tbb_component} SHARED IMPORTED)
|
add_library(TBB::${_tbb_component} SHARED IMPORTED)
|
||||||
- set_target_properties(TBB::${_tbb_component} PROPERTIES
|
|
||||||
- INTERFACE_INCLUDE_DIRECTORIES "${_tbb_root}/include"@TBB_COMPILE_DEFINITIONS@)
|
|
||||||
|
|
||||||
if (EXISTS "${_tbb_release_lib}")
|
get_filename_component(_tbb_include_dir "${_tbb_root}/@TBB_INC_REL_PATH@" ABSOLUTE)
|
||||||
set_target_properties(TBB::${_tbb_component} PROPERTIES
|
- set_target_properties(TBB::${_tbb_component} PROPERTIES
|
||||||
|
- INTERFACE_INCLUDE_DIRECTORIES "${_tbb_include_dir}"@TBB_COMPILE_DEFINITIONS@)
|
||||||
|
unset(_tbb_current_realpath)
|
||||||
|
unset(_tbb_include_dir)
|
||||||
|
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
Index: tbb-2019_U9/python/setup.py
|
|
||||||
===================================================================
|
|
||||||
--- tbb-2019_U9.orig/python/setup.py
|
|
||||||
+++ tbb-2019_U9/python/setup.py
|
|
||||||
@@ -67,7 +67,7 @@ _tbb = Extension("tbb._api", ["tbb/api.i
|
|
||||||
extra_compile_args=compile_flags + tbb_flag,
|
|
||||||
extra_link_args=tbb_flag,
|
|
||||||
libraries =(['tbb'] if not use_compiler_tbb else []) +
|
|
||||||
- (['irml'] if platform.system() == "Linux" else []), # TODO: why do we need this?
|
|
||||||
+ (['irml'] if platform.system() == "xLinux" else []), # TODO: why do we need this?
|
|
||||||
library_dirs=[ rundir, # for custom-builds
|
|
||||||
os.path.join(tbb_root, 'lib', 'intel64', 'gcc4.8'), # for Linux
|
|
||||||
os.path.join(tbb_root, 'lib'), # for MacOS
|
|
@ -1,13 +0,0 @@
|
|||||||
Index: tbb-2019_U9/build/linux.gcc.inc
|
|
||||||
===================================================================
|
|
||||||
--- tbb-2019_U9.orig/build/linux.gcc.inc
|
|
||||||
+++ tbb-2019_U9/build/linux.gcc.inc
|
|
||||||
@@ -72,7 +72,7 @@ ifeq ($(cfg), debug)
|
|
||||||
CPLUS_FLAGS = -DTBB_USE_DEBUG -O0 -g
|
|
||||||
endif
|
|
||||||
|
|
||||||
-CPLUS_FLAGS += $(ITT_NOTIFY) -DUSE_PTHREAD -pthread
|
|
||||||
+CPLUS_FLAGS += $(ITT_NOTIFY) $(OPTFLAGS) -DUSE_PTHREAD -pthread
|
|
||||||
LIB_LINK_FLAGS += -pthread
|
|
||||||
|
|
||||||
TBB_ASM.OBJ=
|
|
@ -1,36 +0,0 @@
|
|||||||
Index: tbb-2019_U8/build/version_info_linux.sh
|
|
||||||
===================================================================
|
|
||||||
--- tbb-2019_U8.orig/build/version_info_linux.sh
|
|
||||||
+++ tbb-2019_U8/build/version_info_linux.sh
|
|
||||||
@@ -16,10 +16,10 @@
|
|
||||||
|
|
||||||
# Script used to generate version info string
|
|
||||||
echo "#define __TBB_VERSION_STRINGS(N) \\"
|
|
||||||
-echo '#N": BUILD_HOST'"\t\t"`hostname -s`" ("`uname -m`")"'" ENDL \'
|
|
||||||
+echo '#N": BUILD_HOST'"\t\t"openSUSE" ("`uname -m`")"'" ENDL \'
|
|
||||||
# find OS name in *-release and issue* files by filtering blank lines and lsb-release content out
|
|
||||||
echo '#N": BUILD_OS'"\t\t"`lsb_release -sd 2>/dev/null | grep -ih '[a-z] ' - /etc/*release /etc/issue 2>/dev/null | head -1 | sed -e 's/["\\\\]//g'`'" ENDL \'
|
|
||||||
-echo '#N": BUILD_KERNEL'"\t"`uname -srv`'" ENDL \'
|
|
||||||
+echo '#N": BUILD_KERNEL'"\t"Linux'" ENDL \'
|
|
||||||
echo '#N": BUILD_GCC'"\t\t"`g++ --version </dev/null 2>&1 | grep 'g++'`'" ENDL \'
|
|
||||||
[ -z "$COMPILER_VERSION" ] || echo '#N": BUILD_COMPILER'"\t"$COMPILER_VERSION'" ENDL \'
|
|
||||||
echo '#N": BUILD_LIBC'"\t"`getconf GNU_LIBC_VERSION | grep glibc | sed -e 's/^glibc //'`'" ENDL \'
|
|
||||||
@@ -27,4 +27,4 @@ echo '#N": BUILD_LD'"\t\t"`ld -v 2>&1 |
|
|
||||||
echo '#N": BUILD_TARGET'"\t$arch on $runtime"'" ENDL \'
|
|
||||||
echo '#N": BUILD_COMMAND'"\t"$*'" ENDL \'
|
|
||||||
echo ""
|
|
||||||
-echo "#define __TBB_DATETIME \""`date -u`"\""
|
|
||||||
+echo "#define __TBB_DATETIME \""`date -u -r $(dirname $0)/../CHANGES`"\""
|
|
||||||
Index: tbb-2019_U8/build/linux.inc
|
|
||||||
===================================================================
|
|
||||||
--- tbb-2019_U8.orig/build/linux.inc
|
|
||||||
+++ tbb-2019_U8/build/linux.inc
|
|
||||||
@@ -57,7 +57,7 @@ endif
|
|
||||||
ifndef runtime
|
|
||||||
export gcc_version:=$(shell gcc -dumpfullversion -dumpversion)
|
|
||||||
os_version:=$(shell uname -r)
|
|
||||||
- os_kernel_version:=$(shell uname -r | sed -e 's/-.*$$//')
|
|
||||||
+ os_kernel_version:=4.0
|
|
||||||
export os_glibc_version_full:=$(shell getconf GNU_LIBC_VERSION | grep glibc | sed -e 's/^glibc //')
|
|
||||||
os_glibc_version:=$(shell echo "$(os_glibc_version_full)" | sed -e '2,$$d' -e 's/-.*$$//')
|
|
||||||
export runtime:=cc$(gcc_version)_libc$(os_glibc_version)_kernel$(os_kernel_version)
|
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:ebc4f6aa47972daed1f7bf71d100ae5bf6931c2e3144cf299c8cc7d041dca2f3
|
|
||||||
size 2639737
|
|
3
tbb-2021.4.0.tar.gz
Normal file
3
tbb-2021.4.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:021796c7845e155e616f5ecda16daa606ebb4c6f90b996e5c08aebab7a8d3de3
|
||||||
|
size 2452533
|
51
tbb-pr609-32bit-mwaitpkg.patch
Normal file
51
tbb-pr609-32bit-mwaitpkg.patch
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
From 542a27fa1cfafaf76772e793549d9f4d288d03a9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ilya Isaev <ilya.isaev@intel.com>
|
||||||
|
Date: Fri, 8 Oct 2021 10:18:16 +0300
|
||||||
|
Subject: [PATCH] Detect 32 bit x86 systems while adding -mwaitpkg option
|
||||||
|
|
||||||
|
Signed-off-by: Ilya Isaev <ilya.isaev@intel.com>
|
||||||
|
---
|
||||||
|
cmake/compilers/Clang.cmake | 2 +-
|
||||||
|
cmake/compilers/GNU.cmake | 2 +-
|
||||||
|
cmake/compilers/MSVC.cmake | 2 +-
|
||||||
|
3 files changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/cmake/compilers/Clang.cmake b/cmake/compilers/Clang.cmake
|
||||||
|
index bb7401e34..d551d3be2 100644
|
||||||
|
--- a/cmake/compilers/Clang.cmake
|
||||||
|
+++ b/cmake/compilers/Clang.cmake
|
||||||
|
@@ -44,7 +44,7 @@ if (NOT TBB_STRICT AND COMMAND tbb_remove_compile_flag)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Enable Intel(R) Transactional Synchronization Extensions (-mrtm) and WAITPKG instructions support (-mwaitpkg) on relevant processors
|
||||||
|
-if (CMAKE_SYSTEM_PROCESSOR MATCHES "(x86|AMD64)")
|
||||||
|
+if (CMAKE_SYSTEM_PROCESSOR MATCHES "(x86|AMD64|i.86)")
|
||||||
|
set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -mrtm $<$<NOT:$<VERSION_LESS:${CMAKE_CXX_COMPILER_VERSION},12.0>>:-mwaitpkg>)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
diff --git a/cmake/compilers/GNU.cmake b/cmake/compilers/GNU.cmake
|
||||||
|
index 86958e3a8..fee1c3bc2 100644
|
||||||
|
--- a/cmake/compilers/GNU.cmake
|
||||||
|
+++ b/cmake/compilers/GNU.cmake
|
||||||
|
@@ -36,7 +36,7 @@ if (NOT CMAKE_GENERATOR MATCHES "Ninja" AND NOT CMAKE_CXX_DEPENDS_USE_COMPILER)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Enable Intel(R) Transactional Synchronization Extensions (-mrtm) and WAITPKG instructions support (-mwaitpkg) on relevant processors
|
||||||
|
-if (CMAKE_SYSTEM_PROCESSOR MATCHES "(x86|AMD64)")
|
||||||
|
+if (CMAKE_SYSTEM_PROCESSOR MATCHES "(x86|AMD64|i.86)")
|
||||||
|
set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -mrtm $<$<AND:$<NOT:$<CXX_COMPILER_ID:Intel>>,$<NOT:$<VERSION_LESS:${CMAKE_CXX_COMPILER_VERSION},11.0>>>:-mwaitpkg>)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
diff --git a/cmake/compilers/MSVC.cmake b/cmake/compilers/MSVC.cmake
|
||||||
|
index acf0952cf..2d2c29a6f 100644
|
||||||
|
--- a/cmake/compilers/MSVC.cmake
|
||||||
|
+++ b/cmake/compilers/MSVC.cmake
|
||||||
|
@@ -72,7 +72,7 @@ if (TBB_WINDOWS_DRIVER)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (CMAKE_CXX_COMPILER_ID MATCHES "(Clang|IntelLLVM)")
|
||||||
|
- if (CMAKE_SYSTEM_PROCESSOR MATCHES "(x86|AMD64)")
|
||||||
|
+ if (CMAKE_SYSTEM_PROCESSOR MATCHES "(x86|AMD64|i.86)")
|
||||||
|
set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -mrtm -mwaitpkg)
|
||||||
|
endif()
|
||||||
|
set(TBB_OPENMP_NO_LINK_FLAG TRUE)
|
2
tbb-rpmlintrc
Normal file
2
tbb-rpmlintrc
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# loaded with ctypes by python package
|
||||||
|
addFilter("explicit-lib-dependency libirml1")
|
23
tbb.changes
23
tbb.changes
@ -1,3 +1,26 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Oct 8 08:11:54 UTC 2021 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- Allow gcc11
|
||||||
|
- Add tbb-pr609-32bit-mwaitpkg.patch gh#oneapi-src/oneTBB#609
|
||||||
|
* fixes 32-bit build with gcc11
|
||||||
|
- Only run ctest when --with test is given
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Oct 5 09:41:04 UTC 2021 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- Update to version 2021.4
|
||||||
|
* Large release notes since 2020.3:
|
||||||
|
https://software.intel.com/content/www/us/en/develop/articles/intel-oneapi-threading-building-blocks-release-notes.html
|
||||||
|
- Drop python2 package
|
||||||
|
- Drop patches:
|
||||||
|
* disable-irml.patch -- install the library
|
||||||
|
* optflags.patch -- build system change
|
||||||
|
* reproducible.patch -- build system change
|
||||||
|
- Refresh cmake-remove-include-path.patch
|
||||||
|
- Add libirml subpackage for python module
|
||||||
|
- Add libtbbbind library package for NUMA support
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Dec 25 11:10:11 UTC 2020 - Benjamin Greiner <code@bnavigator.de>
|
Fri Dec 25 11:10:11 UTC 2020 - Benjamin Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
212
tbb.spec
212
tbb.spec
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package tbb
|
# spec file for package tbb
|
||||||
#
|
#
|
||||||
# Copyright (c) 2020 SUSE LLC
|
# Copyright (c) 2021 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -16,38 +16,54 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%define so_ver 2
|
%define so_ver 12
|
||||||
|
%define so_ver_malloc 2
|
||||||
|
%define so_ver_irml 1
|
||||||
|
%define so_ver_bind 3
|
||||||
|
%if %{pkg_vcmp hwloc-devel >= 2.5}
|
||||||
|
%define tbbbind_suffix _2_5
|
||||||
|
%else
|
||||||
|
%if %{pkg_vcmp hwloc-devel >= 2}
|
||||||
|
%define tbbbind_suffix _2_0
|
||||||
|
%else
|
||||||
|
%define tbbbind_suffix %{nil}
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
|
# by default, don't compile all the tests
|
||||||
|
%bcond_with test
|
||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%if 0%{suse_version} >= 1500
|
||||||
%bcond_with python2
|
%{?!python_module:%define python_module() python3-%{**}}
|
||||||
%bcond_without python3
|
%bcond_without python3
|
||||||
%if ! %{with python2}
|
|
||||||
%define skip_python2 1
|
%define skip_python2 1
|
||||||
|
%else
|
||||||
|
%bcond_with python3
|
||||||
%endif
|
%endif
|
||||||
Name: tbb
|
Name: tbb
|
||||||
Version: 2020.3
|
Version: 2021.4.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Threading Building Blocks (TBB)
|
Summary: Threading Building Blocks (TBB)
|
||||||
License: Apache-2.0
|
License: Apache-2.0
|
||||||
Group: Development/Libraries/C and C++
|
Group: Development/Libraries/C and C++
|
||||||
URL: https://www.threadingbuildingblocks.org/
|
URL: https://www.threadingbuildingblocks.org/
|
||||||
Source0: https://github.com/oneapi-src/oneTBB/archive/v%{version}.tar.gz#/tbb-%{version}.tar.gz
|
Source0: https://github.com/oneapi-src/oneTBB/archive/v%{version}.tar.gz#/tbb-%{version}.tar.gz
|
||||||
# PATCH-FIX-OPENSUSE optflags.patch -- Use rpm optflags
|
Source99: tbb-rpmlintrc
|
||||||
Patch1: optflags.patch
|
# PATCH-FIX-UPSTREAM tbb-pr609-32bit-mwaitpkg.patch
|
||||||
# PATCH-FIX-OPENSUSE reproducible.patch -- Do not compile build hostname+kernel into binary
|
Patch1: https://github.com/oneapi-src/oneTBB/pull/609.patch#/tbb-pr609-32bit-mwaitpkg.patch
|
||||||
Patch2: reproducible.patch
|
# PATCH-FIX-OPENSUSE cmake-remove-include-path.patch -- openCV include error
|
||||||
# PATCH-FIX-OPENSUSE disable-irml.patch -- Don't try to link to irml
|
|
||||||
Patch3: disable-irml.patch
|
|
||||||
Patch4: cmake-remove-include-path.patch
|
Patch4: cmake-remove-include-path.patch
|
||||||
BuildRequires: %{python_module devel}
|
|
||||||
BuildRequires: %{python_module setuptools}
|
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
|
BuildRequires: hwloc-devel
|
||||||
|
%if %{with python3}
|
||||||
|
BuildRequires: %{python_module devel >= 3.5}
|
||||||
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
BuildRequires: swig >= 3.0.6
|
BuildRequires: swig >= 3.0.6
|
||||||
%if 0%{?python38_version_nodots}
|
%endif
|
||||||
# if python multiflavor is in place yet, use it to generate subpackages
|
%if 0%{?suse_version} > 1500
|
||||||
|
# if python multiflavor is available (Tumbleweed), use it to generate subpackages
|
||||||
%define python_subpackage_only 1
|
%define python_subpackage_only 1
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
%else
|
%else
|
||||||
@ -79,40 +95,52 @@ expert. Threading Building Blocks is not just a threads-replacement library. It
|
|||||||
represents a higher-level, task-based parallelism that abstracts platform
|
represents a higher-level, task-based parallelism that abstracts platform
|
||||||
details and threading mechanism for performance and scalability.
|
details and threading mechanism for performance and scalability.
|
||||||
|
|
||||||
%package -n libtbbmalloc%{so_ver}
|
%package -n libtbbmalloc%{so_ver_malloc}
|
||||||
Summary: Threading Building Blocks (TBB)
|
Summary: Threading Building Blocks (TBB)
|
||||||
Group: System/Libraries
|
Group: System/Libraries
|
||||||
Provides: %{name} = %{version}
|
Provides: %{name} = %{version}
|
||||||
Obsoletes: %{name} < %{version}
|
Obsoletes: %{name} < %{version}
|
||||||
|
|
||||||
%description -n libtbbmalloc%{so_ver}
|
%description -n libtbbmalloc%{so_ver_malloc}
|
||||||
This subpackage contains the two TBB memory allocator templates that
|
This subpackage contains the two TBB memory allocator templates that
|
||||||
are similar to the STL template class std::allocator. These two
|
are similar to the STL template class std::allocator. These two
|
||||||
templates, scalable_allocator<T> and cache_aligned_allocator<T>,
|
templates, scalable_allocator<T> and cache_aligned_allocator<T>,
|
||||||
address critical issues in parallel programming: scalability and
|
address critical issues in parallel programming: scalability and
|
||||||
false sharing.
|
false sharing.
|
||||||
|
|
||||||
|
%package -n libirml%{so_ver_irml}
|
||||||
|
Summary: Threading Building Blocks (TBB) - IPC Library
|
||||||
|
Group: System/Libraries
|
||||||
|
|
||||||
|
%description -n libirml%{so_ver_irml}
|
||||||
|
This subpackage provides the library required in order to enable inter-process
|
||||||
|
(IPC) coordination between oneTBB schedulers for the TBB python module.
|
||||||
|
|
||||||
|
%package -n libtbbbind%{tbbbind_suffix}-%{so_ver_bind}
|
||||||
|
Summary: Threading Building Blocks (TBB) NUMA support library
|
||||||
|
Group: System/Libraries
|
||||||
|
|
||||||
|
%description -n libtbbbind%{tbbbind_suffix}-%{so_ver_bind}
|
||||||
|
The NUMA support library for Threading Building Blocks (TBB)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%if 0%{?python_subpackage_only}
|
%if 0%{?python_subpackage_only}
|
||||||
%package -n python-%{name}
|
%package -n python-%{name}
|
||||||
Summary: Python %{python_version} support for Threading Building Blocks (TBB)
|
Summary: Python %{python_version} support for Threading Building Blocks (TBB)
|
||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
|
Requires: libirml%{so_ver_irml}
|
||||||
|
|
||||||
%description -n python-%{name}
|
%description -n python-%{name}
|
||||||
This package contains python %{python_version} bindings for Threading Building Blocks
|
This package contains python %{python_version} bindings for Threading Building Blocks
|
||||||
(TBB).
|
(TBB).
|
||||||
|
|
||||||
%else
|
%else
|
||||||
%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}
|
%package -n python3-%{name}
|
||||||
Summary: Python 3 support for Threading Building Blocks (TBB)
|
Summary: Python 3 support for Threading Building Blocks (TBB)
|
||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
|
Requires: libirml%{so_ver_irml}
|
||||||
|
|
||||||
%description -n python3-%{name}
|
%description -n python3-%{name}
|
||||||
This package contains python 3 bindings for Threading Building Blocks
|
This package contains python 3 bindings for Threading Building Blocks
|
||||||
@ -123,8 +151,10 @@ This package contains python 3 bindings for Threading Building Blocks
|
|||||||
Summary: Development Files for Threading Building Blocks (TBB)
|
Summary: Development Files for Threading Building Blocks (TBB)
|
||||||
Group: Development/Libraries/C and C++
|
Group: Development/Libraries/C and C++
|
||||||
Requires: c++_compiler
|
Requires: c++_compiler
|
||||||
|
Requires: libirml%{so_ver_irml} = %{version}
|
||||||
Requires: libtbb%{so_ver} = %{version}
|
Requires: libtbb%{so_ver} = %{version}
|
||||||
Requires: libtbbmalloc%{so_ver} = %{version}
|
Requires: libtbbbind%{tbbbind_suffix}-%{so_ver_bind} = %{version}
|
||||||
|
Requires: libtbbmalloc%{so_ver_malloc} = %{version}
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
Threading Building Blocks (TBB) offers a rich and complete approach to
|
Threading Building Blocks (TBB) offers a rich and complete approach to
|
||||||
@ -140,88 +170,111 @@ This package contains the header files needed for development with tbb.
|
|||||||
%setup -q -n oneTBB-%{version}
|
%setup -q -n oneTBB-%{version}
|
||||||
%autopatch -p1
|
%autopatch -p1
|
||||||
|
|
||||||
sed -i 's/version\s*="0.1"/version = "%{version}"/' python/setup.py
|
# fix python version
|
||||||
|
sed -i 's/version\s*="0.2"/version = "%{version}"/' python/setup.py
|
||||||
sed -i '1{/^#!.*env python/ d}' python/TBB.py python/tbb/*.py
|
sed -i '1{/^#!.*env python/ d}' python/TBB.py python/tbb/*.py
|
||||||
|
|
||||||
%build
|
%build
|
||||||
make OPTFLAGS="%{optflags}" %{?_smp_mflags} tbb_build_prefix=obj
|
# HWLOC: no automatic find on SLE-12 (older cmake)
|
||||||
|
# TBB_TEST: don't compile by default
|
||||||
|
# TBB4PY: use cmake build system to build libirml in the python tree
|
||||||
|
%cmake \
|
||||||
|
%if 0%{suse_version} < 1500
|
||||||
|
-DCMAKE_HWLOC_2_LIBRARY_PATH=%{_libdir}/libhwloc.so \
|
||||||
|
-DCMAKE_HWLOC_2_INCLUDE_PATH=%{_includedir}/hwloc \
|
||||||
|
%endif
|
||||||
|
%if ! %{with test}
|
||||||
|
-DTBB_TEST:BOOL=OFF \
|
||||||
|
%endif
|
||||||
|
%if %{with python3}
|
||||||
|
-DTBB4PY_BUILD:BOOL=ON \
|
||||||
|
%endif
|
||||||
|
|
||||||
mkdir lib; pushd lib
|
# Leap 15.2 encounters oom during compilation
|
||||||
ln -s ../build/obj_release/*.so* .
|
%cmake_build \
|
||||||
popd
|
%if 0%{?sle_version} == 150200
|
||||||
|
-j 4
|
||||||
|
%endif
|
||||||
|
|
||||||
export TBBROOT=$PWD
|
source */vars.sh
|
||||||
. build/obj_release/tbbvars.sh
|
cd ..
|
||||||
%if %{with python2} || %{with python3}
|
|
||||||
|
# rebuild for every python flavor
|
||||||
|
%if %{with python3}
|
||||||
pushd python
|
pushd python
|
||||||
%python_build
|
%python_build
|
||||||
# only needed for testing? Linking is patched out, not installing.
|
|
||||||
pushd rml
|
|
||||||
make
|
|
||||||
popd
|
|
||||||
popd
|
popd
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
mkdir -p %{buildroot}%{_includedir}
|
# create empty python build dir (?)
|
||||||
mkdir -p %{buildroot}%{_libdir}
|
mkdir -p build/python/build
|
||||||
|
%cmake_install
|
||||||
|
|
||||||
pushd include
|
source build/*/vars.sh
|
||||||
find tbb -type f -exec \
|
|
||||||
install -Dpm 644 {} %{buildroot}%{_includedir}/{} \
|
|
||||||
\;
|
|
||||||
popd
|
|
||||||
|
|
||||||
pushd build/obj_release
|
%if %{with python3}
|
||||||
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
|
|
||||||
|
|
||||||
mkdir -p %{buildroot}%{_libdir}/cmake/TBB
|
|
||||||
# Build cmake config files
|
|
||||||
cmake -DINSTALL_DIR=%{buildroot}%{_libdir}/cmake/TBB \
|
|
||||||
-DSYSTEM_NAME=Linux \
|
|
||||||
-DTBB_VERSION_FILE=%{buildroot}%{_includedir}/tbb/tbb_stddef.h \
|
|
||||||
-DLIB_REL_PATH="../../" \
|
|
||||||
-P cmake/tbb_config_installer.cmake
|
|
||||||
|
|
||||||
export TBBROOT=$PWD
|
|
||||||
. build/obj_release/tbbvars.sh
|
|
||||||
%if %{with python2} || %{with python3}
|
|
||||||
pushd python
|
pushd python
|
||||||
%python_install
|
%python_install
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
||||||
popd
|
popd
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with python2} || %{with python3}
|
# we install it into the devel package docdir
|
||||||
|
rm -r %{buildroot}%{_datadir}/doc/TBB
|
||||||
|
|
||||||
%check
|
%check
|
||||||
|
%if %{with test}
|
||||||
|
%ctest --exclude-regex python_test
|
||||||
|
%endif
|
||||||
|
# always test python modules, if they are built
|
||||||
|
%if %{with python3}
|
||||||
# avoid shuffling the existing build dir
|
# avoid shuffling the existing build dir
|
||||||
mkdir python-test
|
mkdir python-test
|
||||||
pushd python-test
|
pushd python-test
|
||||||
export LD_LIBRARY_PATH="%{buildroot}%{_libdir}:../python/rml"
|
export LD_LIBRARY_PATH="%{buildroot}%{_libdir}"
|
||||||
%python_expand PYTHONPATH=%{buildroot}%{$python_sitearch} $python -m tbb test -v
|
%python_expand PYTHONPATH=%{buildroot}%{$python_sitearch} $python -m tbb test -v
|
||||||
popd
|
popd
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%post -n libtbb%{so_ver} -p /sbin/ldconfig
|
%post -n libtbb%{so_ver} -p /sbin/ldconfig
|
||||||
%postun -n libtbb%{so_ver} -p /sbin/ldconfig
|
%postun -n libtbb%{so_ver} -p /sbin/ldconfig
|
||||||
%post -n libtbbmalloc%{so_ver} -p /sbin/ldconfig
|
%post -n libtbbmalloc%{so_ver_malloc} -p /sbin/ldconfig
|
||||||
%postun -n libtbbmalloc%{so_ver} -p /sbin/ldconfig
|
%postun -n libtbbmalloc%{so_ver_malloc} -p /sbin/ldconfig
|
||||||
|
%post -n libirml%{so_ver_irml} -p /sbin/ldconfig
|
||||||
|
%postun -n libirml%{so_ver_irml} -p /sbin/ldconfig
|
||||||
|
%post -n libtbbbind%{tbbbind_suffix}-%{so_ver_bind} -p /sbin/ldconfig
|
||||||
|
%postun -n libtbbbind%{tbbbind_suffix}-%{so_ver_bind} -p /sbin/ldconfig
|
||||||
|
|
||||||
%files -n libtbb%{so_ver}
|
%files -n libtbb%{so_ver}
|
||||||
%{_libdir}/libtbb.so.%{so_ver}*
|
%{_libdir}/libtbb.so.%{so_ver}*
|
||||||
|
|
||||||
%if %{with python2} && ! 0%{?python_subpackage_only}
|
%files -n libtbbmalloc%{so_ver_malloc}
|
||||||
%files -n python2-%{name}
|
%{_libdir}/libtbbmalloc.so.%{so_ver_malloc}*
|
||||||
%{python2_sitearch}/tbb
|
%{_libdir}/libtbbmalloc_proxy.so.%{so_ver_malloc}*
|
||||||
%{python2_sitearch}/TBB.py*
|
|
||||||
%{python2_sitearch}/TBB-%{version}*-info
|
%files -n libtbbbind%{tbbbind_suffix}-%{so_ver_bind}
|
||||||
|
%{_libdir}/libtbbbind%{tbbbind_suffix}.so.%{so_ver_bind}*
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%license LICENSE.txt
|
||||||
|
%doc README.md
|
||||||
|
%{_includedir}/tbb/
|
||||||
|
%{_includedir}/oneapi/
|
||||||
|
%{_libdir}/cmake/TBB
|
||||||
|
%{_libdir}/pkgconfig/tbb*.pc
|
||||||
|
%{_libdir}/libtbb.so
|
||||||
|
%{_libdir}/libtbbmalloc.so
|
||||||
|
%{_libdir}/libtbbmalloc_proxy.so
|
||||||
|
%{_libdir}/libtbbbind%{tbbbind_suffix}.so
|
||||||
|
%if %{with python3}
|
||||||
|
%{_libdir}/libirml.so
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with python3} || ( %{with python2} && 0%{?python_subpackage_only} )
|
%if %{with python3}
|
||||||
|
%files -n libirml%{so_ver_irml}
|
||||||
|
%{_libdir}/libirml.so.%{so_ver_irml}*
|
||||||
|
|
||||||
%files %{python_files %{name}}
|
%files %{python_files %{name}}
|
||||||
%{python_sitearch}/tbb
|
%{python_sitearch}/tbb
|
||||||
%{python_sitearch}/TBB.py*
|
%{python_sitearch}/TBB.py*
|
||||||
@ -229,17 +282,4 @@ popd
|
|||||||
%pycache_only %{python_sitearch}/__pycache__/TBB*
|
%pycache_only %{python_sitearch}/__pycache__/TBB*
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files -n libtbbmalloc%{so_ver}
|
|
||||||
%{_libdir}/libtbbmalloc.so.%{so_ver}*
|
|
||||||
%{_libdir}/libtbbmalloc_proxy.so.%{so_ver}*
|
|
||||||
|
|
||||||
%files devel
|
|
||||||
%license LICENSE
|
|
||||||
%doc CHANGES doc/Release_Notes.txt
|
|
||||||
%{_includedir}/tbb/
|
|
||||||
%{_libdir}/cmake/TBB
|
|
||||||
%{_libdir}/libtbb.so
|
|
||||||
%{_libdir}/libtbbmalloc.so
|
|
||||||
%{_libdir}/libtbbmalloc_proxy.so
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
x
Reference in New Issue
Block a user