commit 00f79ac27efed5f1ac435159c20d8da465d2af9c
Author: Jan Palus <[email protected]>
Date:   Wed Dec 15 21:29:46 2021 +0100

    up to 2021.4.0 (new soname)
    
    - uses cmake now

 mfence.patch              | 21 -----------
 no-forced-arch-bits.patch | 19 ----------
 tbb-cxxflags.patch        | 15 --------
 tbb.pc.in                 | 10 -----
 tbb.spec                  | 94 ++++++++++++++++-------------------------------
 tbbmalloc.pc.in           | 10 -----
 tbbmalloc_proxy.pc.in     | 10 -----
 7 files changed, 31 insertions(+), 148 deletions(-)
---
diff --git a/tbb.spec b/tbb.spec
index c07da43..d190bf1 100644
--- a/tbb.spec
+++ b/tbb.spec
@@ -1,35 +1,30 @@
 # use: major=year, minor=Update version, [micro=date if present]
-%define                major   2020
-%define                minor   3
-%define                micro   %{nil}
+%define                major   2021
+%define                minor   4
+%define                micro   0
 Summary:       The Threading Building Blocks library abstracts low-level 
threading details
 Summary(pl.UTF-8):     Threading Building Blocks - biblioteka abstrahująca 
niskopoziomowe szczegóły obsługi wątków
 Name:          tbb
-#Version:      %{major}.%{minor}.%{micro}
-Version:       %{major}.%{minor}
+Version:       %{major}.%{minor}.%{micro}
 Release:       1
 License:       Apache v2.0
 Group:         Development/Tools
 # Source0Download: https://github.com/oneapi-src/oneTBB/releases
-Source0:       
https://github.com/01org/tbb/archive/v%{major}.%{minor}/oneTBB-%{major}.%{minor}.tar.gz
-# Source0-md5: ea8fa4332f4bad10a75a361cba025380
+Source0:       
https://github.com/01org/tbb/archive/v%{version}/oneTBB-%{version}.tar.gz
+# Source0-md5: fa317f16003e31e33a57ae7d888403e4
 Source1:       
http://www.threadingbuildingblocks.org/uploads/81/91/Latest%20Open%20Source%20Documentation/Design_Patterns.pdf
-# Source1-md5: 46062fef922d39abfd464bc06e02cdd8
+# Source1-md5: 3fd5805aa4439b2c46072c9673300a4a
 Source2:       
http://www.threadingbuildingblocks.org/uploads/81/91/Latest%20Open%20Source%20Documentation/Getting_Started.pdf
-# Source2-md5: b8f94104c47f9667e537b98bd940494a
+# Source2-md5: 993aca18f0717f3ca3b36a7e4d0e0124
 Source3:       
http://www.threadingbuildingblocks.org/uploads/81/91/Latest%20Open%20Source%20Documentation/Reference.pdf
-# Source3-md5: 1481cbd378f4964691046d0ba570b374
+# Source3-md5: c646c043d65a45b460eeb03b0a8ef0fb
 Source4:       
http://www.threadingbuildingblocks.org/uploads/81/91/Latest%20Open%20Source%20Documentation/Tutorial.pdf
-# Source4-md5: 5bbdd1050c5dac5c1b782a6a98db0c46
-Source5:       %{name}.pc.in
-Source6:       %{name}malloc.pc.in
-Source7:       %{name}malloc_proxy.pc.in
-Patch0:                no-forced-arch-bits.patch
-Patch1:                %{name}-cxxflags.patch
-Patch2:                mfence.patch
+# Source4-md5: 5c712f3a977525d5f23286decb3b1e16
 URL:           http://www.threadingbuildingblocks.org/
+BuildRequires: cmake >= 3.1
 BuildRequires: libstdc++-devel
 BuildRequires: pkgconfig
+BuildRequires: rpmbuild(macros) >= 1.605
 BuildRequires: sed >= 4.0
 # We need "arch" binary:
 BuildRequires: util-linux
@@ -89,52 +84,22 @@ Dokumentacja w formacie PDF dla użytkowników biblioteki C++ 
Threading
 Building Blocks (TBB).
 
 %prep
-%setup -q -n oneTBB-%{major}.%{minor}
-%patch0 -p1
-%patch1 -p1
-%patch2 -p1
+%setup -q -n oneTBB-%{version}
 
 cp -p %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} .
 
-cp -p %{SOURCE5} %{SOURCE6} %{SOURCE7} .
-
 %build
-%ifarch x32
-setarch linux32 \
-%endif
-%{__make} \
-       CPLUS="%{__cxx}" \
-       CXXFLAGS="%{rpmcxxflags}" \
-       tbb_build_prefix=obj
+%cmake -B build \
+       -DTBB_STRICT:BOOL=OFF \
+       -DTBB_TEST:BOOL=OFF
+
+%{__make} -C build
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir},%{_pkgconfigdir}}
-
-cd build/obj_release
-for file in tbb tbbmalloc tbbmalloc_proxy; do
-       install lib${file}.so.2 
$RPM_BUILD_ROOT%{_libdir}/lib${file}.so.2.%{version}
-       ln -s lib${file}.so.2.%{version} $RPM_BUILD_ROOT%{_libdir}/lib${file}.so
-       ln -s lib${file}.so.2.%{version} 
$RPM_BUILD_ROOT%{_libdir}/lib${file}.so.2
-done
-cd -
-
-cd include
-find tbb -type f -name '*.h' -exec \
-       install -p -D -m 644 {} $RPM_BUILD_ROOT%{_includedir}/{} ';'
-cd -
-
-for pc in tbb.pc tbbmalloc.pc tbbmalloc_proxy.pc; do
-       in=$pc.in
-       # fail if obsolete
-       [ ! -f $RPM_BUILD_ROOT%{_pkgconfigdir}/$pc ] || exit 1
-       sed -e '
-               s,@prefix@,%{_prefix},;
-               s,@libdir@,%{_libdir},;
-               s,@includedir@,%{_includedir}/tbb,;
-               s,@version@,%{version},
-       ' $in > $RPM_BUILD_ROOT%{_pkgconfigdir}/$pc
-done
+
+%{__make} -C build install \
+       DESTDIR=$RPM_BUILD_ROOT
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -144,12 +109,12 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc CHANGES README.md third-party-programs.txt doc/Release_Notes.txt
-%attr(755,root,root) %{_libdir}/libtbb.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libtbb.so.2
-%attr(755,root,root) %{_libdir}/libtbbmalloc.so.*.*.*
+%doc README.md third-party-programs.txt
+%attr(755,root,root) %{_libdir}/libtbb.so.*.*
+%attr(755,root,root) %ghost %{_libdir}/libtbb.so.12
+%attr(755,root,root) %{_libdir}/libtbbmalloc.so.*.*
 %attr(755,root,root) %ghost %{_libdir}/libtbbmalloc.so.2
-%attr(755,root,root) %{_libdir}/libtbbmalloc_proxy.so.*.*.*
+%attr(755,root,root) %{_libdir}/libtbbmalloc_proxy.so.*.*
 %attr(755,root,root) %ghost %{_libdir}/libtbbmalloc_proxy.so.2
 
 %files devel
@@ -157,10 +122,13 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_libdir}/libtbb.so
 %attr(755,root,root) %{_libdir}/libtbbmalloc.so
 %attr(755,root,root) %{_libdir}/libtbbmalloc_proxy.so
+# likely to be owned by different package?
+%dir %{_includedir}/oneapi
+%{_includedir}/oneapi/tbb.h
+%{_includedir}/oneapi/tbb
 %{_includedir}/tbb
 %{_pkgconfigdir}/tbb.pc
-%{_pkgconfigdir}/tbbmalloc.pc
-%{_pkgconfigdir}/tbbmalloc_proxy.pc
+%{_libdir}/cmake/TBB
 
 %files doc
 %defattr(644,root,root,755)
diff --git a/mfence.patch b/mfence.patch
deleted file mode 100644
index a463bc9..0000000
--- a/mfence.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff -up tbb40_20110809oss/include/tbb/machine/linux_ia32.h\~ 
tbb40_20110809oss/include/tbb/machine/linux_ia32.h
---- tbb40_20110809oss/include/tbb/machine/linux_ia32.h~        2011-08-24 
15:51:56.000000000 +0200
-+++ tbb40_20110809oss/include/tbb/machine/linux_ia32.h 2011-10-18 
15:04:01.994271994 +0200
-@@ -42,7 +42,14 @@
- #define __TBB_control_consistency_helper() __TBB_compiler_fence()
- #define __TBB_acquire_consistency_helper() __TBB_compiler_fence()
- #define __TBB_release_consistency_helper() __TBB_compiler_fence()
--#define __TBB_full_memory_fence()          __asm__ __volatile__("mfence": : 
:"memory")
-+#define __TBB_full_memory_fence()          __TBB_full_memory_fence_imp()
-+inline void __TBB_full_memory_fence_imp() {
-+    int tmp;
-+    __asm__ __volatile__("xchg %0,%0"
-+                       : "=r"(tmp)
-+                       : "r"(tmp)
-+                       : "memory");
-+}
- 
- #if __TBB_ICC_ASM_VOLATILE_BROKEN
- #define __TBB_VOLATILE
-
-Diff finished.  Tue Oct 18 15:04:09 2011
diff --git a/no-forced-arch-bits.patch b/no-forced-arch-bits.patch
deleted file mode 100644
index 3e2e1e9..0000000
--- a/no-forced-arch-bits.patch
+++ /dev/null
@@ -1,19 +0,0 @@
---- tbb43_20150611oss/build/linux.gcc.inc~     2015-06-28 12:13:13.000000000 
+0200
-+++ tbb43_20150611oss/build/linux.gcc.inc      2015-06-28 12:14:51.385001671 
+0200
-@@ -74,14 +74,12 @@
- 
- ifeq (intel64,$(arch))
-     ITT_NOTIFY = -DDO_ITT_NOTIFY
--    CPLUS_FLAGS += -m64 $(RTM_KEY)
--    LIB_LINK_FLAGS += -m64
-+    CPLUS_FLAGS += $(RTM_KEY)
- endif
- 
- ifeq (ia32,$(arch))
-     ITT_NOTIFY = -DDO_ITT_NOTIFY
--    CPLUS_FLAGS += -m32 -march=pentium4 $(RTM_KEY)
--    LIB_LINK_FLAGS += -m32
-+    CPLUS_FLAGS += $(RTM_KEY)
- endif
- 
- ifeq (ppc64,$(arch))
diff --git a/tbb-cxxflags.patch b/tbb-cxxflags.patch
deleted file mode 100644
index a620c03..0000000
--- a/tbb-cxxflags.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- tbb-2019_U9/build/linux.gcc.inc.orig       2019-12-02 19:29:10.832630387 
+0100
-+++ tbb-2019_U9/build/linux.gcc.inc    2019-12-02 19:31:27.408557158 +0100
-@@ -66,10 +66,10 @@
- 
- ifeq ($(cfg), release)
-         # -g is set intentionally in the release mode. It should not affect 
performance.
--        CPLUS_FLAGS = -O2 -g
-+        CPLUS_FLAGS = $(CXXFLAGS) -O2 -g
- endif
- ifeq ($(cfg), debug)
--        CPLUS_FLAGS = -DTBB_USE_DEBUG -O0 -g
-+        CPLUS_FLAGS = $(CXXFLAGS) -DTBB_USE_DEBUG -O0 -g
- endif
- 
- CPLUS_FLAGS += $(ITT_NOTIFY) -DUSE_PTHREAD -pthread
diff --git a/tbb.pc.in b/tbb.pc.in
deleted file mode 100644
index 9d9afc3..0000000
--- a/tbb.pc.in
+++ /dev/null
@@ -1,10 +0,0 @@
-exec_prefix=@prefix@
-libdir=@libdir@
-includedir=@includedir@
-
-Name: Threading Building Blocks
-Description: Intel's parallelism library for C++
-URL: http://www.threadingbuildingblocks.org/
-Version: @version@
-Libs: -L${libdir} -ltbb
-Cflags: -I${includedir}
diff --git a/tbbmalloc.pc.in b/tbbmalloc.pc.in
deleted file mode 100644
index edeb07d..0000000
--- a/tbbmalloc.pc.in
+++ /dev/null
@@ -1,10 +0,0 @@
-exec_prefix=@prefix@
-libdir=@libdir@
-includedir=@includedir@
-
-Name: Threading Building Blocks Scalable Allocator
-Description: Implementation of Scalable Memory Allocator of Threading Building 
Blocks
-URL: http://www.threadingbuildingblocks.org/
-Version: @version@
-Libs: -L${libdir} -ltbbmalloc
-Cflags: -I${includedir}
diff --git a/tbbmalloc_proxy.pc.in b/tbbmalloc_proxy.pc.in
deleted file mode 100644
index 57e26a0..0000000
--- a/tbbmalloc_proxy.pc.in
+++ /dev/null
@@ -1,10 +0,0 @@
-exec_prefix=@prefix@
-libdir=@libdir@
-includedir=@includedir@
-
-Name: Threading Building Blocks Scallable Malloc Proxy
-Description: Implementation of proxy that redirects memory allocation calls to 
TBB Scalable Memory Allocator
-URL: http://www.threadingbuildingblocks.org/
-Version: @version@
-Libs: -L${libdir} -ltbbmalloc_proxy -ltbbmalloc
-Cflags: -I${includedir}
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/tbb.git/commitdiff/00f79ac27efed5f1ac435159c20d8da465d2af9c

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to