[packages/tbb] up to 4.1.20130314, add .pc for tbbmalloc and tbbmalloc_proxy
glen
glen at pld-linux.org
Sat Oct 5 19:00:38 CEST 2013
commit f89f9a85251b3d89792a51e4c815fe80be3f136e
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Sat Oct 5 19:59:49 2013 +0300
up to 4.1.20130314, add .pc for tbbmalloc and tbbmalloc_proxy
tbb-cxxflags.patch | 21 ++++++++++++---------
tbb.spec | 37 +++++++++++++++++++++++++++----------
tbbmalloc.pc.in | 10 ++++++++++
tbbmalloc_proxy.pc.in | 10 ++++++++++
4 files changed, 59 insertions(+), 19 deletions(-)
---
diff --git a/tbb.spec b/tbb.spec
index b09d981..b0828c2 100644
--- a/tbb.spec
+++ b/tbb.spec
@@ -1,6 +1,6 @@
-%define major 3
-%define minor 0
-%define micro 127
+%define major 4
+%define minor 1
+%define micro 20130314
%define sourcebasename tbb%{major}%{minor}_%{micro}oss
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
@@ -9,8 +9,8 @@ Version: %{major}.%{minor}.%{micro}
Release: 1
License: GPL v2 with runtime exception
Group: Development/Tools
-Source0: http://www.threadingbuildingblocks.org/uploads/78/162/3.0%20update%204/%{sourcebasename}_src.tgz
-# Source0-md5: c911f74f3d207358bb5554614b276c39
+Source0: http://threadingbuildingblocks.org/sites/default/files/software_releases/source/%{sourcebasename}_src.tgz
+# Source0-md5: ed4af7ccfa122f16cf9920b241633a3a
Source1: http://www.threadingbuildingblocks.org/uploads/81/91/Latest%20Open%20Source%20Documentation/Design_Patterns.pdf
# Source1-md5: 46062fef922d39abfd464bc06e02cdd8
Source2: http://www.threadingbuildingblocks.org/uploads/81/91/Latest%20Open%20Source%20Documentation/Getting_Started.pdf
@@ -20,6 +20,8 @@ Source3: http://www.threadingbuildingblocks.org/uploads/81/91/Latest%20Open%20So
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
Patch1: %{name}-cxxflags.patch
URL: http://www.threadingbuildingblocks.org/
BuildRequires: libstdc++-devel
@@ -82,10 +84,12 @@ Building Blocks (TBB).
%prep
%setup -q -n %{sourcebasename}
-%patch1 -p1
+#%patch1 -p1
cp -p %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} .
+cp -p %{SOURCE5} %{SOURCE6} %{SOURCE7} .
+
sed -i -e 's/-march=pentium4//' build/linux.gcc.inc
%build
@@ -98,8 +102,10 @@ sed -i -e 's/-march=pentium4//' build/linux.gcc.inc
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir}}
+cp -p %{SOURCE5} %{SOURCE6} %{SOURCE7} .
+
cd build/obj_release
-for file in tbb tbbmalloc tbbmalloc_proxy ; do
+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
@@ -109,11 +115,20 @@ cd -
cd include
find tbb -type f -name '*.h' -exec \
install -p -D -m 644 {} $RPM_BUILD_ROOT%{_includedir}/{} ';'
+cd -
-# fail if obsolete
-[ ! -f $RPM_BUILD_ROOT%{_pkgconfigdir}/tbb.pc ] || exit 1
install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
-sed -e 's, at prefix@,%{_prefix},;s, at libdir@,%{_libdir},;s, at includedir@,%{_includedir}/tbb,;s, at version@,%{version},' %{SOURCE5} >$RPM_BUILD_ROOT%{_pkgconfigdir}/tbb.pc
+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, at prefix@,%{_prefix},;
+ s, at libdir@,%{_libdir},;
+ s, at includedir@,%{_includedir}/tbb,;
+ s, at version@,%{version},
+ ' $in > $RPM_BUILD_ROOT%{_pkgconfigdir}/$pc
+done
%clean
rm -rf $RPM_BUILD_ROOT
@@ -138,6 +153,8 @@ rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %{_libdir}/libtbbmalloc_proxy.so
%{_includedir}/tbb
%{_pkgconfigdir}/tbb.pc
+%{_pkgconfigdir}/tbbmalloc.pc
+%{_pkgconfigdir}/tbbmalloc_proxy.pc
%files doc
%defattr(644,root,root,755)
diff --git a/tbb-cxxflags.patch b/tbb-cxxflags.patch
index 911edf5..71dc4af 100644
--- a/tbb-cxxflags.patch
+++ b/tbb-cxxflags.patch
@@ -1,15 +1,18 @@
---- tbb22_20090809oss_src/build/linux.gcc.inc 2007-09-28 22:13:21.000000000 +0200
-+++ tbb22_20090809oss_src.pm/build/linux.gcc.inc 2007-12-19 16:56:13.000000000 +0100
-@@ -45,10 +45,10 @@ LIBS = -lpthread -lrt -ldl
- C_FLAGS = $(CPLUS_FLAGS)
+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
+@@ -59,10 +59,10 @@ ifneq (,$(shell gcc -dumpversion | egrep
+ endif
ifeq ($(cfg), release)
-- CPLUS_FLAGS = -DDO_ITT_NOTIFY -O2 -DUSE_PTHREAD
-+ CPLUS_FLAGS = $(CXXFLAGS) -DDO_ITT_NOTIFY -O2 -DUSE_PTHREAD
+- CPLUS_FLAGS = $(ITT_NOTIFY) -g -O2 -DUSE_PTHREAD
++ CPLUS_FLAGS = $(CXXFLAGS) $(ITT_NOTIFY) -g -O2 -DUSE_PTHREAD
endif
ifeq ($(cfg), debug)
-- CPLUS_FLAGS = -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD
-+ CPLUS_FLAGS = $(CXXFLAGS) -DTBB_USE_DEBUG -DDO_ITT_NOTIFY -g -O0 -DUSE_PTHREAD
+- CPLUS_FLAGS = -DTBB_USE_DEBUG $(ITT_NOTIFY) -g -O0 -DUSE_PTHREAD
++ CPLUS_FLAGS = $(CXXFLAGS) -DTBB_USE_DEBUG $(ITT_NOTIFY) -g -O0 -DUSE_PTHREAD
endif
- ASM=
+ ifneq (00,$(lambdas)$(cpp0x))
+
+Diff finished. Tue Feb 26 13:00:13 2013
diff --git a/tbbmalloc.pc.in b/tbbmalloc.pc.in
new file mode 100644
index 0000000..edeb07d
--- /dev/null
+++ b/tbbmalloc.pc.in
@@ -0,0 +1,10 @@
+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
new file mode 100644
index 0000000..57e26a0
--- /dev/null
+++ b/tbbmalloc_proxy.pc.in
@@ -0,0 +1,10 @@
+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/f89f9a85251b3d89792a51e4c815fe80be3f136e
More information about the pld-cvs-commit
mailing list