Accepting request 155678 from home:adra:branches:devel:libraries:c_c++

Update to version 41_20130116, Removed tbb package, Updated optflags.patch, Added a patch to fix build on PowerPC

OBS-URL: https://build.opensuse.org/request/show/155678
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/tbb?expand=0&rev=5
This commit is contained in:
Ismail Dönmez
2013-02-21 21:24:06 +00:00
committed by Git OBS Bridge
parent 0268ddae8b
commit 6a04b9fe10
7 changed files with 119 additions and 112 deletions

173
tbb.spec
View File

@@ -1,7 +1,7 @@
#
# spec file for package tbb (Version 21_20080825)
# spec file for package tbb
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -15,138 +15,125 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define so_ver 2
Name: tbb
BuildRequires: gcc-c++
%define sourcedir tbb40_20120613oss
Url: http://threadingbuildingblocks.org/
License: GPL v2 only
Group: Development/Libraries/C and C++
Version: 40_20120613
Release: 1
Version: 41_20130116
Release: 0
License: GPL-2.0
Summary: Threading Building Blocks (TBB)
Source0: %{sourcedir}_src.tgz
Url: http://threadingbuildingblocks.org/
Group: System/Libraries
Source0: http://threadingbuildingblocks.org/sites/default/files/software_releases/source/%{name}%{version}oss_src.tgz
# PATCH-FIX-OPENSUSE optflags.patch -- Use rpm optflags
Patch0: optflags.patch
# PATCH-FIX-UPSTREAM tbb-4.0-cas.patch asterios.dramis@gmail.com -- Fix build on PowerPC, http://software.intel.com/en-us/forums/showthread.php?t=106373 (taken from Fedora)
Patch1: tbb-4.0-cas.patch
BuildRequires: gcc-c++
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: %install_info_prereq
ExclusiveArch: %ix86 ia64 x86_64
ExclusiveArch: %ix86 ia64 x86_64 ppc ppc64
%description
Intel<EFBFBD> Threading Building Blocks (TBB) offers a rich and complete
approach to expressing parallelism in a C++ program. It is a library
that helps you take advantage of multi-core processor performance
without having to be a threading expert. Threading Building Blocks is
not just a threads-replacement library. It represents a higher-level,
task-based parallelism that abstracts platform details and threading
mechanism for performance and scalability.
Threading Building Blocks (TBB) offers a rich and complete approach to
expressing parallelism in a C++ program. It is a library that helps you take
advantage of multi-core processor performance without having to be a threading
expert. Threading Building Blocks is not just a threads-replacement library. It
represents a higher-level, task-based parallelism that abstracts platform
details and threading mechanism for performance and scalability.
%package -n libtbb2
Group: Development/Libraries/C and C++
%package -n libtbb%{so_ver}
Summary: Threading Building Blocks (TBB)
Group: System/Libraries
Provides: %{name} = %{version}
Obsoletes: %{name} < %{version}
%description -n libtbb2
Intel<EFBFBD> Threading Building Blocks (TBB) offers a rich and complete
approach to expressing parallelism in a C++ program. It is a library
that helps you take advantage of multi-core processor performance
without having to be a threading expert. Threading Building Blocks is
not just a threads-replacement library. It represents a higher-level,
task-based parallelism that abstracts platform details and threading
mechanism for performance and scalability.
%description -n libtbb%{so_ver}
Threading Building Blocks (TBB) offers a rich and complete approach to
expressing parallelism in a C++ program. It is a library that helps you take
advantage of multi-core processor performance without having to be a threading
expert. Threading Building Blocks is not just a threads-replacement library. It
represents a higher-level, task-based parallelism that abstracts platform
details and threading mechanism for performance and scalability.
%package -n libtbbmalloc2
Group: Development/Libraries/C and C++
%package -n libtbbmalloc%{so_ver}
Summary: Threading Building Blocks (TBB)
Group: System/Libraries
Provides: %{name} = %{version}
Obsoletes: %{name} < %{version}
%description -n libtbbmalloc2
Intel<EFBFBD> Threading Building Blocks (TBB) offers a rich and complete
approach to expressing parallelism in a C++ program. It is a library
that helps you take advantage of multi-core processor performance
without having to be a threading expert. Threading Building Blocks is
not just a threads-replacement library. It represents a higher-level,
task-based parallelism that abstracts platform details and threading
mechanism for performance and scalability.
%description -n libtbbmalloc%{so_ver}
Threading Building Blocks (TBB) offers a rich and complete approach to
expressing parallelism in a C++ program. It is a library that helps you take
advantage of multi-core processor performance without having to be a threading
expert. Threading Building Blocks is not just a threads-replacement library. It
represents a higher-level, task-based parallelism that abstracts platform
details and threading mechanism for performance and scalability.
%package devel
Summary: Development Files for Threading Building Blocks (TBB)
Group: Development/Libraries/C and C++
Summary: Threading Building Blocks (TBB)
Requires: /bin/sh, /bin/csh
Requires: c++_compiler
Requires: libtbb2 = %{version} libtbbmalloc2 = %{version}
Requires: libtbb%{so_ver} = %{version}
Requires: libtbbmalloc%{so_ver} = %{version}
%description devel
Intel<EFBFBD> Threading Building Blocks (TBB) offers a rich and complete
approach to expressing parallelism in a C++ program. It is a library
that helps you take advantage of multi-core processor performance
without having to be a threading expert. Threading Building Blocks is
not just a threads-replacement library. It represents a higher-level,
task-based parallelism that abstracts platform details and threading
mechanism for performance and scalability.
Threading Building Blocks (TBB) offers a rich and complete approach to
expressing parallelism in a C++ program. It is a library that helps you take
advantage of multi-core processor performance without having to be a threading
expert. Threading Building Blocks is not just a threads-replacement library. It
represents a higher-level, task-based parallelism that abstracts platform
details and threading mechanism for performance and scalability.
This package contains the header files needed for development with tbb.
%prep
%setup -q -n %{sourcedir}
%setup -q -n %{name}%{version}oss
%patch0
%patch1 -p1
%build
gmake OPTFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags}
make OPTFLAGS="%{optflags}" %{?_smp_mflags} tbb_build_prefix=obj
%install
mkdir -p $RPM_BUILD_ROOT/%{_includedir}/%{name}/machine
mkdir -p $RPM_BUILD_ROOT/%{_includedir}/%{name}/internal
mkdir -p $RPM_BUILD_ROOT/%{_libdir}
mkdir -p $RPM_BUILD_ROOT/etc/%{name}
# sic!
install $RPM_BUILD_DIR/%{sourcedir}/include/tbb/*.h $RPM_BUILD_ROOT/%{_includedir}/%{name}
install $RPM_BUILD_DIR/%{sourcedir}/include/tbb/machine/linux*.h $RPM_BUILD_ROOT/%{_includedir}/%{name}/machine
install $RPM_BUILD_DIR/%{sourcedir}/include/tbb/internal/*.h $RPM_BUILD_ROOT/%{_includedir}/%{name}/internal
install $RPM_BUILD_DIR/%{sourcedir}/build/linux*release/*.so.2 $RPM_BUILD_ROOT/%{_libdir}
pushd $RPM_BUILD_ROOT/%{_libdir}
ln -s libtbb.so.2 libtbb.so
ln -s libtbbmalloc.so.2 libtbbmalloc.so
mkdir -p %{buildroot}%{_includedir}
mkdir -p %{buildroot}%{_libdir}
pushd include
find tbb -type f -name \*.h -exec \
install -Dpm 644 {} %{buildroot}%{_includedir}/{} \
\;
popd
pushd build/obj_release
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
%post -n libtbb2 -p /sbin/ldconfig
%post -n libtbb%{so_ver} -p /sbin/ldconfig
%postun -n libtbb2 -p /sbin/ldconfig
%postun -n libtbb%{so_ver} -p /sbin/ldconfig
%post -n libtbbmalloc2 -p /sbin/ldconfig
%post -n libtbbmalloc%{so_ver} -p /sbin/ldconfig
%postun -n libtbbmalloc2 -p /sbin/ldconfig
%postun -n libtbbmalloc%{so_ver} -p /sbin/ldconfig
%files
%defattr(-,root,root)
%doc CHANGES COPYING index.html
%files -n libtbb%{so_ver}
%defattr(-,root,root,-)
%{_libdir}/libtbb.so.%{so_ver}*
%files -n libtbb2
%defattr(-,root,root)
%{_libdir}/libtbb.so.2
%files -n libtbbmalloc2
%defattr(-,root,root)
%{_libdir}/libtbbmalloc.so.2
%{_libdir}/libtbbmalloc_proxy.so.2
%files -n libtbbmalloc%{so_ver}
%defattr(-,root,root,-)
%{_libdir}/libtbbmalloc.so.%{so_ver}*
%{_libdir}/libtbbmalloc_proxy.so.%{so_ver}*
%files devel
%defattr(-,root,root)
%dir %{_includedir}/tbb
%attr(755,root,root) %dir %{_includedir}/tbb/machine
%attr(755,root,root) %dir %{_includedir}/tbb/internal
%attr(644,root,root) %{_includedir}/tbb/*.h
%attr(644,root,root) %{_includedir}/tbb/machine/*.h
%attr(644,root,root) %{_includedir}/tbb/internal/*.h
%defattr(-,root,root,-)
%doc CHANGES COPYING index.html
%doc doc/Release_Notes.txt doc/html/
%{_includedir}/tbb/
%{_libdir}/libtbb.so
%{_libdir}/libtbbmalloc.so
%{_libdir}/libtbbmalloc_proxy.so
%changelog