codonell / rpms / tbb

Forked from rpms/tbb 6 years ago
Clone
Petr Machata 7cc476a
%define releasedate 20130314
Petr Machata 7a670e8
%define major 4
Petr Machata 7cc476a
%define minor 1
Petr Machata 7cc476a
%define update 3
0f662bd
%define dotver %{major}.%{minor}
68bb783
%define sourcebasename tbb%{major}%{minor}_%{releasedate}oss
Petr Machata 657e0b6
68bb783
%define sourcefilename %{sourcebasename}_src.tgz
a645b4b
7141b73
Name:    tbb
a645b4b
Summary: The Threading Building Blocks library abstracts low-level threading details
0f662bd
Version: %{dotver}
64604f7
Release: 9.%{releasedate}%{?dist}
a645b4b
License: GPLv2 with exceptions
7141b73
Group:   Development/Tools
7141b73
URL:     http://threadingbuildingblocks.org/
0f662bd
7141b73
Source0: http://threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb41_20130314oss_src.tgz
Petr Machata 657e0b6
# These two are downstream sources.
Petr Machata 657e0b6
Source6: tbb.pc
Petr Machata 657e0b6
Source7: tbbmalloc.pc
Petr Machata 657e0b6
Source8: tbbmalloc_proxy.pc
Petr Machata 657e0b6
Petr Machata e2d668c
# Propagate CXXFLAGS variable into flags used when compiling C++.
Petr Machata e2d668c
# This so that RPM_OPT_FLAGS are respected.
0f662bd
Patch1: tbb-3.0-cxxflags.patch
Petr Machata e2d668c
Petr Machata e2d668c
# Replace mfence with xchg (for 32-bit builds only) so that TBB
Petr Machata e2d668c
# compiles and works supported hardware.  mfence was added with SSE2,
Petr Machata e2d668c
# which we still don't assume.
Petr Machata 7a670e8
Patch2: tbb-4.0-mfence.patch
Petr Machata 5eaf47d
Petr Machata d5c7dbc
# Don't snip -Wall from C++ flags.  Add -fno-strict-aliasing, as that
Petr Machata d5c7dbc
# uncovers some static-aliasing warnings.
Petr Machata d5c7dbc
# Related: https://bugzilla.redhat.com/show_bug.cgi?id=1037347
Petr Machata d5c7dbc
Patch3: tbb-4.1-dont-snip-Wall.patch
Petr Machata d5c7dbc
a645b4b
BuildRequires: libstdc++-devel
64604f7
ExclusiveArch: %{ix86} x86_64 ia64 ppc ppc64 %{arm} aarch64 ppc64le
a645b4b
a645b4b
%description
a645b4b
Threading Building Blocks (TBB) is a C++ runtime library that
a645b4b
abstracts the low-level threading details necessary for optimal
a645b4b
multi-core performance.  It uses common C++ templates and coding style
a645b4b
to eliminate tedious threading implementation work.
a645b4b
a645b4b
TBB requires fewer lines of code to achieve parallelism than other
a645b4b
threading models.  The applications you write are portable across
a645b4b
platforms.  Since the library is also inherently scalable, no code
a645b4b
maintenance is required as more processor cores become available.
a645b4b
a645b4b
a645b4b
%package devel
a645b4b
Summary: The Threading Building Blocks C++ headers and shared development libraries
a645b4b
Group: Development/Libraries
0f662bd
Requires: %{name}%{?_isa} = %{version}-%{release}
a645b4b
a645b4b
%description devel
a645b4b
Header files and shared object symlinks for the Threading Building
a645b4b
Blocks (TBB) C++ libraries.
a645b4b
a645b4b
a645b4b
%package doc
a645b4b
Summary: The Threading Building Blocks documentation
a645b4b
Group: Documentation
a645b4b
a645b4b
%description doc
a645b4b
PDF documentation for the user of the Threading Building Block (TBB)
a645b4b
C++ library.
a645b4b
a645b4b
a645b4b
%prep
a645b4b
%setup -q -n %{sourcebasename}
a645b4b
%patch1 -p1
43fea0c
%patch2 -p1
Petr Machata d5c7dbc
%patch3 -p1
a645b4b
a645b4b
%build
68bb783
make %{?_smp_mflags} CXXFLAGS="$RPM_OPT_FLAGS" tbb_build_prefix=obj
Petr Machata 657e0b6
for file in %{SOURCE6} %{SOURCE7} %{SOURCE8}; do
Petr Machata 657e0b6
    sed 's/_FEDORA_VERSION/%{major}.%{minor}.%{update}/' ${file} \
Petr Machata 657e0b6
        > $(basename ${file})
Petr Machata 657e0b6
done
a645b4b
64604f7
%check
64604f7
%ifarch ppc64le
64604f7
make test
64604f7
%endif
64604f7
a645b4b
%install
68bb783
mkdir -p $RPM_BUILD_ROOT/%{_libdir}
68bb783
mkdir -p $RPM_BUILD_ROOT/%{_includedir}
a645b4b
68bb783
pushd build/obj_release
Petr Machata 657e0b6
    for file in libtbb{,malloc{,_proxy}}; do
68bb783
        install -p -D -m 755 ${file}.so.2 $RPM_BUILD_ROOT/%{_libdir}
68bb783
        ln -s $file.so.2 $RPM_BUILD_ROOT/%{_libdir}/$file.so
a645b4b
    done
a645b4b
popd
a645b4b
a645b4b
pushd include
Petr Machata 97f14cc
    find tbb -type f ! -name \*.htm\* -exec \
a645b4b
        install -p -D -m 644 {} $RPM_BUILD_ROOT/%{_includedir}/{} \
a645b4b
    \;
a645b4b
popd
a645b4b
Petr Machata 657e0b6
for file in %{SOURCE6} %{SOURCE7} %{SOURCE8}; do
Petr Machata 657e0b6
    install -p -D -m 644 $(basename ${file}) \
Petr Machata 657e0b6
	$RPM_BUILD_ROOT/%{_libdir}/pkgconfig/$(basename ${file})
Petr Machata 657e0b6
done
Petr Machata 657e0b6
a645b4b
%post -p /sbin/ldconfig
a645b4b
a645b4b
%postun -p /sbin/ldconfig
a645b4b
a645b4b
%files
0f662bd
%doc COPYING doc/Release_Notes.txt
a645b4b
%{_libdir}/*.so.2
a645b4b
a645b4b
%files devel
Petr Machata 7cc476a
%doc CHANGES
a645b4b
%{_includedir}/tbb
a645b4b
%{_libdir}/*.so
Petr Machata 657e0b6
%{_libdir}/pkgconfig/*.pc
a645b4b
a645b4b
%files doc
Petr Machata 7cc476a
%doc doc/Release_Notes.txt
Petr Machata 7cc476a
%doc doc/html
a645b4b
a645b4b
%changelog
64604f7
* Thu Sep 25 2014 Karsten Hopp <karsten@redhat.com> 4.1-9.20130314
64604f7
- enable ppc64le and run 'make test' on that new arch
64604f7
b128a40
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.1-8.20130314
b128a40
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
b128a40
46f11b8
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.1-7.20130314
46f11b8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
46f11b8
7141b73
* Sun Jan 12 2014 Peter Robinson <pbrobinson@fedoraproject.org> 4.1-6.20130314
7141b73
- Build on aarch64, minor spec cleanups
7141b73
Petr Machata d5c7dbc
* Tue Dec  3 2013 Petr Machata <pmachata@redhat.com> - 4.1-5.20130314
Petr Machata d5c7dbc
- Fix building with -Werror=format-security (tbb-4.1-dont-snip-Wall.patch)
Petr Machata d5c7dbc
Petr Machata 97f14cc
* Thu Oct  3 2013 Petr Machata <pmachata@redhat.com> - 4.1-4.20130314
Petr Machata 97f14cc
- Fix %%install to also install include files that are not named *.h
Petr Machata 97f14cc
5508dae
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.1-3.20130314
5508dae
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
5508dae
Petr Machata 588a248
* Tue May 28 2013 Petr Machata <pmachata@redhat.com> - 4.1-3.20130314
Petr Machata 588a248
- Enable ARM arches
Petr Machata 588a248
Petr Machata c0e0938
* Wed May 22 2013 Petr Machata <pmachata@redhat.com> - 4.1-2.20130314
Petr Machata dba7283
- Fix mfence patch.  Since the __TBB_full_memory_fence macro was
Petr Machata dba7283
  function-call-like, it stole () intended for function invocation.
Petr Machata dba7283
Petr Machata dba7283
* Wed May 22 2013 Petr Machata <pmachata@redhat.com> - 4.1-1.20130314
Petr Machata 7cc476a
- Rebase to 4.1 update 3
Petr Machata 7cc476a
59a27a4
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0-7.20120408
59a27a4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
59a27a4
Petr Machata 5eaf47d
* Tue Aug 28 2012 Petr Machata <pmachata@redhat.com> - 4.0-6.20120408
Petr Machata 5eaf47d
- Fix build on PowerPC
Petr Machata 5eaf47d
6da08f9
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0-5.20120408
6da08f9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
6da08f9
Petr Machata 657e0b6
* Thu Jun  7 2012 Petr Machata <pmachata@redhat.com> - 4.0-4.20120408
Petr Machata 657e0b6
- Rebase to 4.0 update 4
Petr Machata 657e0b6
- Refresh Getting_Started.pdf, Reference.pdf, Tutorial.pdf
Petr Machata 657e0b6
- Provide pkg-config files
Petr Machata 657e0b6
- Resolves: #825402
Petr Machata 657e0b6
89710d5
* Thu Apr 05 2012 Karsten Hopp <karsten@redhat.com> 4.0-3.20110809
89710d5
- tbb builds now on PPC(64)
89710d5
7ccafa7
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0-2.20110809
7ccafa7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
7ccafa7
Petr Machata 7a670e8
* Tue Oct 18 2011 Petr Machata <pmachata@redhat.com> - 4.0-1.20110809
Petr Machata 7a670e8
- Rebase to 4.0
Petr Machata 7a670e8
  - Port the mfence patch
Petr Machata 7a670e8
  - Refresh the documentation bundle
Petr Machata 7a670e8
0f662bd
* Tue Jul 26 2011 Petr Machata <pmachata@redhat.com> - 3.0-1.20110419
0f662bd
- Rebase to 3.0-r6
0f662bd
  - Port both patches
0f662bd
  - Package Design_Patterns.pdf
0f662bd
  - Thanks to Richard Shaw for initial rebase patch
0f662bd
- Resolves: #723043
0f662bd
bb37126
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2-3.20090809
bb37126
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
bb37126
43fea0c
* Thu Jun 10 2010 Petr Machata <pmachata@redhat.com> - 2.2-2.20090809
43fea0c
- Replace mfence instruction with xchg to make it run on ia32-class
43fea0c
  machines without SSE2.
43fea0c
- Resolves: #600654
43fea0c
83f75f3
* Tue Nov  3 2009 Petr Machata <pmachata@redhat.com> - 2.2-1.20090809
83f75f3
- New upstream 2.2
83f75f3
- Resolves: #521571
83f75f3
aaea778
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1-3.20080605
aaea778
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
aaea778
27d007a
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1-2.20080605
27d007a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
27d007a
68bb783
* Fri Jun 13 2008 Petr Machata <pmachata@redhat.com> - 2.1-1.20080605
68bb783
- New upstream 2.1
68bb783
  - Drop soname patch, parallel make patch, and GCC 4.3 patch
68bb783
a645b4b
* Wed Feb 13 2008 Petr Machata <pmachata@redhat.com> - 2.0-4.20070927
a645b4b
- Review fixes
a645b4b
  - Use updated URL
a645b4b
  - More timestamp preservation
a645b4b
- Initial import into Fedora CVS
a645b4b
a645b4b
* Mon Feb 11 2008 Petr Machata <pmachata@redhat.com> - 2.0-3.20070927
a645b4b
- Review fixes
a645b4b
  - Preserve timestamp of installed files
a645b4b
  - Fix soname not to contain "debug"
a645b4b
a645b4b
* Tue Feb  5 2008 Petr Machata <pmachata@redhat.com> - 2.0-2.20070927
a645b4b
- Review fixes
a645b4b
  - GCC 4.3 patchset
a645b4b
  - Add BR util-linux net-tools
a645b4b
  - Add full URL to Source0
a645b4b
  - Build in debug mode to work around problems with GCC 4.3
a645b4b
a645b4b
* Mon Dec 17 2007 Petr Machata <pmachata@redhat.com> - 2.0-1.20070927
a645b4b
- Initial package.
a645b4b
- Using SONAME patch from Debian.