[tbb] Rebase to 3.0-r6
Petr Machata
pmachata at fedoraproject.org
Tue Jul 26 14:42:01 UTC 2011
commit 0f662bdfb8780ae6fafa67643eddba7ad92094f7
Author: Petr Machata <pmachata at gmail.com>
Date: Tue Jul 26 16:41:37 2011 +0200
Rebase to 3.0-r6
.gitignore | 4 ++
sources | 10 ++++--
tbb-2.2-20090809-cxxflags.patch | 15 ---------
tbb-2.2-mfence.patch | 20 ------------
tbb-3.0-cxxflags.patch | 18 +++++++++++
tbb-3.0-mfence.patch | 20 ++++++++++++
tbb.spec | 62 +++++++++++++++++++++++---------------
7 files changed, 85 insertions(+), 64 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index b47f1ca..a5036d0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,7 @@ tbb22_20090809oss_src.tgz
Tutorial.pdf
Reference.pdf
Getting_Started.pdf
+/tbb30_20110419oss_src.tgz
+/Design_Patterns.pdf
+/CHANGES.txt
+tbb*/
diff --git a/sources b/sources
index ede79b6..c13b95d 100644
--- a/sources
+++ b/sources
@@ -1,4 +1,6 @@
-c621053887c7ee86932da43e2deb3bff tbb22_20090809oss_src.tgz
-8fee2897156b387de17a84ef0df75603 Tutorial.pdf
-2c0f0bb046ae96ba57ef620fce42af56 Reference.pdf
-5ca846dbddf77557b6a0702f31365a31 Getting_Started.pdf
+c7d1712d9e3ff76d9037aff5fcd67a17 tbb30_20110419oss_src.tgz
+3378f28664adc82d20bccbe35ea4fbfb Design_Patterns.pdf
+2d56ac8475941c81f004359ab75e4120 Getting_Started.pdf
+bb609bdd5dcb4b0a8bc0709e3bef622e Reference.pdf
+30239687f75afd96ae1ad62e380633b9 Tutorial.pdf
+62d5169d83f256b502c6a7d0729a68e9 CHANGES.txt
diff --git a/tbb-3.0-cxxflags.patch b/tbb-3.0-cxxflags.patch
new file mode 100644
index 0000000..3b7a69d
--- /dev/null
+++ b/tbb-3.0-cxxflags.patch
@@ -0,0 +1,18 @@
+diff -up tbb30_20110419oss/build/linux.gcc.inc\~ tbb30_20110419oss/build/linux.gcc.inc
+--- tbb30_20110419oss/build/linux.gcc.inc~ 2011-04-19 13:48:58.000000000 +0200
++++ tbb30_20110419oss/build/linux.gcc.inc 2011-07-26 14:02:48.482006056 +0200
+@@ -51,10 +51,10 @@ C_FLAGS = $(CPLUS_FLAGS)
+
+ ITT_NOTIFY = -DDO_ITT_NOTIFY
+ ifeq ($(cfg), release)
+- CPLUS_FLAGS = $(ITT_NOTIFY) -O2 -DUSE_PTHREAD
++ CPLUS_FLAGS = $(CXXFLAGS) $(ITT_NOTIFY) -O2 -DUSE_PTHREAD
+ endif
+ ifeq ($(cfg), debug)
+- CPLUS_FLAGS = -DTBB_USE_DEBUG $(ITT_NOTIFY) -g -O0 -DUSE_PTHREAD
++ CPLUS_FLAGS = $(CXXFLAGS) -DTBB_USE_DEBUG $(ITT_NOTIFY) -g -O0 -DUSE_PTHREAD
+ endif
+
+ ifneq (0,$(cpp0x))
+
+Diff finished. Tue Jul 26 14:02:54 2011
diff --git a/tbb-3.0-mfence.patch b/tbb-3.0-mfence.patch
new file mode 100644
index 0000000..1638abd
--- /dev/null
+++ b/tbb-3.0-mfence.patch
@@ -0,0 +1,20 @@
+diff -up tbb30_20110419oss/include/tbb/machine/linux_ia32.h\~ tbb30_20110419oss/include/tbb/machine/linux_ia32.h
+--- tbb30_20110419oss/include/tbb/machine/linux_ia32.h~ 2011-04-19 13:48:59.000000000 +0200
++++ tbb30_20110419oss/include/tbb/machine/linux_ia32.h 2011-07-26 16:09:19.986615628 +0200
+@@ -40,7 +40,13 @@
+ #define __TBB_control_consistency_helper()
+ #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")
++inline void __TBB_full_memory_fence() {
++ int tmp;
++ __asm__ __volatile__("xchg %0,%0"
++ : "=r"(tmp)
++ : "r"(tmp)
++ : "memory");
++}
+
+ #if __TBB_ICC_ASM_VOLATILE_BROKEN
+ #define __TBB_VOLATILE
+
+Diff finished. Tue Jul 26 16:09:26 2011
diff --git a/tbb.spec b/tbb.spec
index 78d979b..857d1fe 100644
--- a/tbb.spec
+++ b/tbb.spec
@@ -1,32 +1,36 @@
-%define releasedate 20090809
-%define major 2
-%define minor 2
+%define releasedate 20110419
+%define major 3
+%define minor 0
+%define dotver %{major}.%{minor}
%define sourcebasename tbb%{major}%{minor}_%{releasedate}oss
%define sourcefilename %{sourcebasename}_src.tgz
-%define source_2 Getting_Started.pdf
-%define source_3 Reference.pdf
-%define source_4 Tutorial.pdf
-
Summary: The Threading Building Blocks library abstracts low-level threading details
Name: tbb
-Version: %{major}.%{minor}
-Release: 3.%{releasedate}%{?dist}
+Version: %{dotver}
+Release: 1.%{releasedate}%{?dist}
License: GPLv2 with exceptions
Group: Development/Tools
URL: http://threadingbuildingblocks.org/
-Source: http://threadingbuildingblocks.org/uploads/77/142/2.2/%{sourcefilename}
-# RPM can't handle spaces in specs, so don't include full URL. Each
-# of the following sources was downloaded from:
-# http://www.threadingbuildingblocks.org/uploads/81/91/Latest Open Source Documentation/
-# Unfortunately, because they regularly replace the "Latest"
-# documentation with what's actually Latest at that point, these
-# sources may no longer be available at that link.
-Source2: %{source_2}
-Source3: %{source_3}
-Source4: %{source_4}
-Patch1: tbb-2.2-20090809-cxxflags.patch
-Patch2: tbb-2.2-mfence.patch
+Source0: http://threadingbuildingblocks.org/uploads/76/169/3.0%%20update%%206/tbb30_20110419oss_src.tgz
+
+# Upstream regularly replaces the "Latest" documentation with what's
+# actually Latest at that point. These sources may no longer match
+# what's uploaded anymore.
+%define docurl http://threadingbuildingblocks.org/uploads/81/91/Latest%%20Open%%20Source%%20Documentation/
+%define source_1 CHANGES.txt
+%define source_2 Getting_Started.pdf
+%define source_3 Reference.pdf
+%define source_4 Tutorial.pdf
+%define source_5 Design_Patterns.pdf
+Source1: %{docurl}/%{source_1}
+Source2: %{docurl}/%{source_2}
+Source3: %{docurl}/%{source_3}
+Source4: %{docurl}/%{source_4}
+Source5: %{docurl}/%{source_5}
+
+Patch1: tbb-3.0-cxxflags.patch
+Patch2: tbb-3.0-mfence.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: libstdc++-devel
# We need "arch" and "hostname" binaries:
@@ -48,7 +52,7 @@ maintenance is required as more processor cores become available.
%package devel
Summary: The Threading Building Blocks C++ headers and shared development libraries
Group: Development/Libraries
-Requires: tbb = %{version}-%{release}
+Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
Header files and shared object symlinks for the Threading Building
@@ -72,7 +76,7 @@ C++ library.
%build
make %{?_smp_mflags} CXXFLAGS="$RPM_OPT_FLAGS" tbb_build_prefix=obj
-cp -p "%{SOURCE2}" "%{SOURCE3}" "%{SOURCE4}" .
+cp -p "%{SOURCE1}" "%{SOURCE2}" "%{SOURCE3}" "%{SOURCE4}" "%{SOURCE5}" .
%install
rm -rf $RPM_BUILD_ROOT
@@ -101,12 +105,12 @@ rm -rf ${RPM_BUILD_ROOT}
%files
%defattr(-,root,root,-)
-%doc COPYING
-%doc doc/Release_Notes.txt
+%doc COPYING doc/Release_Notes.txt
%{_libdir}/*.so.2
%files devel
%defattr(-,root,root,-)
+%doc %{source_1}
%{_includedir}/tbb
%{_libdir}/*.so
@@ -115,8 +119,16 @@ rm -rf ${RPM_BUILD_ROOT}
%doc %{source_2}
%doc %{source_3}
%doc %{source_4}
+%doc %{source_5}
%changelog
+* Tue Jul 26 2011 Petr Machata <pmachata at redhat.com> - 3.0-1.20110419
+- Rebase to 3.0-r6
+ - Port both patches
+ - Package Design_Patterns.pdf
+ - Thanks to Richard Shaw for initial rebase patch
+- Resolves: #723043
+
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.2-3.20090809
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
More information about the scm-commits
mailing list