060185
%define releasedate 20130314
060185
%define major 4
060185
%define minor 1
060185
%define update 3
060185
%define dotver %{major}.%{minor}
060185
%define sourcebasename tbb%{major}%{minor}_%{releasedate}oss
060185
060185
%define sourcefilename %{sourcebasename}_src.tgz
060185
060185
Summary: The Threading Building Blocks library abstracts low-level threading details
060185
Name: tbb
060185
Version: %{dotver}
060185
Release: 9.%{releasedate}%{?dist}
060185
License: GPLv2 with exceptions
060185
Group: Development/Tools
060185
URL: http://threadingbuildingblocks.org/
060185
Source0: http://threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb41_20130314oss_src.tgz
060185
060185
# These two are downstream sources.
060185
Source6: tbb.pc
060185
Source7: tbbmalloc.pc
060185
Source8: tbbmalloc_proxy.pc
060185
060185
# Propagate CXXFLAGS variable into flags used when compiling C++.
060185
# This so that RPM_OPT_FLAGS are respected.
060185
Patch1: tbb-3.0-cxxflags.patch
060185
060185
# Replace mfence with xchg (for 32-bit builds only) so that TBB
060185
# compiles and works supported hardware.  mfence was added with SSE2,
060185
# which we still don't assume.
060185
Patch2: tbb-4.0-mfence.patch
060185
060185
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
060185
BuildRequires: libstdc++-devel
060185
ExcludeArch: s390 s390x
060185
060185
%description
060185
Threading Building Blocks (TBB) is a C++ runtime library that
060185
abstracts the low-level threading details necessary for optimal
060185
multi-core performance.  It uses common C++ templates and coding style
060185
to eliminate tedious threading implementation work.
060185
060185
TBB requires fewer lines of code to achieve parallelism than other
060185
threading models.  The applications you write are portable across
060185
platforms.  Since the library is also inherently scalable, no code
060185
maintenance is required as more processor cores become available.
060185
060185
060185
%package devel
060185
Summary: The Threading Building Blocks C++ headers and shared development libraries
060185
Group: Development/Libraries
060185
Requires: %{name}%{?_isa} = %{version}-%{release}
060185
060185
%description devel
060185
Header files and shared object symlinks for the Threading Building
060185
Blocks (TBB) C++ libraries.
060185
060185
060185
%package doc
060185
Summary: The Threading Building Blocks documentation
060185
Group: Documentation
060185
060185
%description doc
060185
PDF documentation for the user of the Threading Building Block (TBB)
060185
C++ library.
060185
060185
060185
%prep
060185
%setup -q -n %{sourcebasename}
060185
%patch1 -p1
060185
%patch2 -p1
060185
060185
%build
060185
make %{?_smp_mflags} CXXFLAGS="$RPM_OPT_FLAGS" tbb_build_prefix=obj
060185
for file in %{SOURCE6} %{SOURCE7} %{SOURCE8}; do
060185
    sed 's/_FEDORA_VERSION/%{major}.%{minor}.%{update}/' ${file} \
060185
        > $(basename ${file})
060185
done
060185
060185
%install
060185
rm -rf $RPM_BUILD_ROOT
060185
mkdir -p $RPM_BUILD_ROOT/%{_libdir}
060185
mkdir -p $RPM_BUILD_ROOT/%{_includedir}
060185
060185
pushd build/obj_release
060185
    for file in libtbb{,malloc{,_proxy}}; do
060185
        install -p -D -m 755 ${file}.so.2 $RPM_BUILD_ROOT/%{_libdir}
060185
        ln -s $file.so.2 $RPM_BUILD_ROOT/%{_libdir}/$file.so
060185
    done
060185
popd
060185
060185
pushd include
060185
    find tbb -type f ! -name \*.htm\* -exec \
060185
        install -p -D -m 644 {} $RPM_BUILD_ROOT/%{_includedir}/{} \
060185
    \;
060185
popd
060185
060185
for file in %{SOURCE6} %{SOURCE7} %{SOURCE8}; do
060185
    install -p -D -m 644 $(basename ${file}) \
060185
	$RPM_BUILD_ROOT/%{_libdir}/pkgconfig/$(basename ${file})
060185
done
060185
060185
%post -p /sbin/ldconfig
060185
060185
%postun -p /sbin/ldconfig
060185
060185
%clean
060185
rm -rf ${RPM_BUILD_ROOT}
060185
060185
%files
060185
%defattr(-,root,root,-)
060185
%doc COPYING doc/Release_Notes.txt
060185
%{_libdir}/*.so.2
060185
060185
%files devel
060185
%defattr(-,root,root,-)
060185
%doc CHANGES
060185
%{_includedir}/tbb
060185
%{_libdir}/*.so
060185
%{_libdir}/pkgconfig/*.pc
060185
060185
%files doc
060185
%defattr(-,root,root,-)
060185
%doc doc/Release_Notes.txt
060185
%doc doc/html
060185
060185
%changelog
060185
* Sat Aug 16 2014 Petr Machata <pmachata@redhat.com> - 4.1-9.20130314
060185
- Add ExcludeArch: s390{,x}
060185
060185
* Sat Aug 16 2014 Petr Machata <pmachata@redhat.com> - 4.1-8.20130314
060185
- Bump for rebuild
060185
060185
* Fri Jul 25 2014 Petr Machata <pmachata@redhat.com> - 4.1-7.20130314
060185
- Bump for rebuild
060185
060185
* Wed Jan 22 2014 Petr Machata <pmachata@redhat.com> - 4.1-6.20130314
060185
- Drop ExclusiveArch altogether. TBB has a fallback code that works
060185
  irrespective of the architecture.
060185
060185
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 4.1-5.20130314
060185
- Mass rebuild 2013-12-27
060185
060185
* Thu Oct  3 2013 Petr Machata <pmachata@redhat.com> - 4.1-4.20130314
060185
- Fix %%install to also install include files that are not named *.h
060185
060185
* Tue May 28 2013 Petr Machata <pmachata@redhat.com> - 4.1-3.20130314
060185
- Enable ARM arches
060185
060185
* Wed May 22 2013 Petr Machata <pmachata@redhat.com> - 4.1-2.20130314
060185
- Fix mfence patch.  Since the __TBB_full_memory_fence macro was
060185
  function-call-like, it stole () intended for function invocation.
060185
060185
* Wed May 22 2013 Petr Machata <pmachata@redhat.com> - 4.1-1.20130314
060185
- Rebase to 4.1 update 3
060185
060185
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0-7.20120408
060185
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
060185
060185
* Tue Aug 28 2012 Petr Machata <pmachata@redhat.com> - 4.0-6.20120408
060185
- Fix build on PowerPC
060185
060185
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0-5.20120408
060185
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
060185
060185
* Thu Jun  7 2012 Petr Machata <pmachata@redhat.com> - 4.0-4.20120408
060185
- Rebase to 4.0 update 4
060185
- Refresh Getting_Started.pdf, Reference.pdf, Tutorial.pdf
060185
- Provide pkg-config files
060185
- Resolves: #825402
060185
060185
* Thu Apr 05 2012 Karsten Hopp <karsten@redhat.com> 4.0-3.20110809
060185
- tbb builds now on PPC(64)
060185
060185
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0-2.20110809
060185
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
060185
060185
* Tue Oct 18 2011 Petr Machata <pmachata@redhat.com> - 4.0-1.20110809
060185
- Rebase to 4.0
060185
  - Port the mfence patch
060185
  - Refresh the documentation bundle
060185
060185
* Tue Jul 26 2011 Petr Machata <pmachata@redhat.com> - 3.0-1.20110419
060185
- Rebase to 3.0-r6
060185
  - Port both patches
060185
  - Package Design_Patterns.pdf
060185
  - Thanks to Richard Shaw for initial rebase patch
060185
- Resolves: #723043
060185
060185
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2-3.20090809
060185
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
060185
060185
* Thu Jun 10 2010 Petr Machata <pmachata@redhat.com> - 2.2-2.20090809
060185
- Replace mfence instruction with xchg to make it run on ia32-class
060185
  machines without SSE2.
060185
- Resolves: #600654
060185
060185
* Tue Nov  3 2009 Petr Machata <pmachata@redhat.com> - 2.2-1.20090809
060185
- New upstream 2.2
060185
- Resolves: #521571
060185
060185
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1-3.20080605
060185
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
060185
060185
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1-2.20080605
060185
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
060185
060185
* Fri Jun 13 2008 Petr Machata <pmachata@redhat.com> - 2.1-1.20080605
060185
- New upstream 2.1
060185
  - Drop soname patch, parallel make patch, and GCC 4.3 patch
060185
060185
* Wed Feb 13 2008 Petr Machata <pmachata@redhat.com> - 2.0-4.20070927
060185
- Review fixes
060185
  - Use updated URL
060185
  - More timestamp preservation
060185
- Initial import into Fedora CVS
060185
060185
* Mon Feb 11 2008 Petr Machata <pmachata@redhat.com> - 2.0-3.20070927
060185
- Review fixes
060185
  - Preserve timestamp of installed files
060185
  - Fix soname not to contain "debug"
060185
060185
* Tue Feb  5 2008 Petr Machata <pmachata@redhat.com> - 2.0-2.20070927
060185
- Review fixes
060185
  - GCC 4.3 patchset
060185
  - Add BR util-linux net-tools
060185
  - Add full URL to Source0
060185
  - Build in debug mode to work around problems with GCC 4.3
060185
060185
* Mon Dec 17 2007 Petr Machata <pmachata@redhat.com> - 2.0-1.20070927
060185
- Initial package.
060185
- Using SONAME patch from Debian.