[packages/tbb] - package libtbbbind - tbb.pc is installed as tbb32.pc on 32-bit archs, create compat tbb.pc symlink

qboosh qboosh at pld-linux.org
Thu Dec 16 16:30:58 CET 2021


commit f132f93e6185f4b918c95df6c11d1c69453fef0d
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Thu Dec 16 16:31:37 2021 +0100

    - package libtbbbind
    - tbb.pc is installed as tbb32.pc on 32-bit archs, create compat tbb.pc symlink in this case
    - arch no longer required

 tbb.spec | 22 +++++++++++++++++++---
 1 file changed, 19 insertions(+), 3 deletions(-)
---
diff --git a/tbb.spec b/tbb.spec
index d9aa3c8..5d954f6 100644
--- a/tbb.spec
+++ b/tbb.spec
@@ -22,17 +22,22 @@ Source4:	http://www.threadingbuildingblocks.org/uploads/81/91/Latest%20Open%20So
 # Source4-md5:	5bbdd1050c5dac5c1b782a6a98db0c46
 URL:		http://www.threadingbuildingblocks.org/
 BuildRequires:	cmake >= 3.1
-BuildRequires:	libstdc++-devel
+BuildRequires:	libstdc++-devel >= 6:4.7
 BuildRequires:	pkgconfig
 BuildRequires:	rpmbuild(macros) >= 1.605
 BuildRequires:	sed >= 4.0
-# We need "arch" binary:
-BuildRequires:	util-linux
 ExclusiveArch:	%{ix86} %{x8664} x32 %{arm} aarch64 ia64 ppc ppc64
 # __TBB_machine_cmpswp8 uses gcc's __sync_val_compare_and_swap8 or directly cmpxchg8b asm instruction
 ExcludeArch:	i386 i486
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+# see src/tbb/CMakeLists.txt /TBB_PC_NAME
+%ifarch %{ix86} x32 %{arm} ppc
+%define		tbb_pc_name	tbb32
+%else
+%define		tbb_pc_name	tbb
+%endif
+
 %description
 Threading Building Blocks (TBB) is a C++ runtime library that
 abstracts the low-level threading details necessary for optimal
@@ -101,6 +106,11 @@ rm -rf $RPM_BUILD_ROOT
 %{__make} -C build install \
 	DESTDIR=$RPM_BUILD_ROOT
 
+%if "%{tbb_pc_name}" != "tbb"
+# for compatibility
+ln -sf %{tbb_pc_name}.pc $RPM_BUILD_ROOT%{_pkgconfigdir}/tbb.pc
+%endif
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -112,6 +122,8 @@ rm -rf $RPM_BUILD_ROOT
 %doc README.md third-party-programs.txt
 %attr(755,root,root) %{_libdir}/libtbb.so.*.*
 %attr(755,root,root) %ghost %{_libdir}/libtbb.so.12
+%attr(755,root,root) %{_libdir}/libtbbbind.so.*.*
+%attr(755,root,root) %ghost %{_libdir}/libtbbbind.so.3
 %attr(755,root,root) %{_libdir}/libtbbmalloc.so.*.*
 %attr(755,root,root) %ghost %{_libdir}/libtbbmalloc.so.2
 %attr(755,root,root) %{_libdir}/libtbbmalloc_proxy.so.*.*
@@ -120,6 +132,7 @@ rm -rf $RPM_BUILD_ROOT
 %files devel
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/libtbb.so
+%attr(755,root,root) %{_libdir}/libtbbbind.so
 %attr(755,root,root) %{_libdir}/libtbbmalloc.so
 %attr(755,root,root) %{_libdir}/libtbbmalloc_proxy.so
 # likely to be owned by different package?
@@ -127,7 +140,10 @@ rm -rf $RPM_BUILD_ROOT
 %{_includedir}/oneapi/tbb.h
 %{_includedir}/oneapi/tbb
 %{_includedir}/tbb
+%{_pkgconfigdir}/%{tbb_pc_name}.pc
+%if "%{tbb_pc_name}" != "tbb"
 %{_pkgconfigdir}/tbb.pc
+%endif
 %{_libdir}/cmake/TBB
 
 %files doc
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/tbb.git/commitdiff/f132f93e6185f4b918c95df6c11d1c69453fef0d



More information about the pld-cvs-commit mailing list