[suitesparse] fix build without TBB

Dan Horák sharkcz at fedoraproject.org
Tue Oct 11 09:42:11 UTC 2011


commit 5919d88ac4cfef57292088b44a1c9cf5c7702e39
Author: Dan Horák <dan at danny.cz>
Date:   Tue Oct 11 11:42:08 2011 +0200

    fix build without TBB

 suitesparse.spec |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/suitesparse.spec b/suitesparse.spec
index 6a21bdf..eaf2279 100644
--- a/suitesparse.spec
+++ b/suitesparse.spec
@@ -1,6 +1,6 @@
 Name:           suitesparse
 Version:        3.6.1
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        A collection of sparse matrix libraries
 
 Group:          System Environment/Libraries
@@ -13,6 +13,7 @@ BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires:  atlas-devel
 %ifarch %{ix86} x86_64 ia64
 BuildRequires:  tbb-devel
+%global with_tbb 1
 %endif
 Obsoletes:      umfpack <= 5.0.1
 Obsoletes:      ufsparse <= 2.1.1
@@ -306,16 +307,12 @@ popd
 
 pushd SPQR
   pushd Lib
-%ifarch %{ix86} x86_64 ia64
-    make CFLAGS="$RPM_OPT_FLAGS -DHAVE_TBB -DNPARTITION -fPIC"
-%else
-    make CFLAGS="$RPM_OPT_FLAGS -DNPARTITION -fPIC"
-%endif
+    make CFLAGS="$RPM_OPT_FLAGS %{?with_tbb:-DHAVE_TBB} -DNPARTITION -fPIC"
   popd
   pushd ../Lib
     g++ -shared -Wl,-soname,libspqr.so.%{spqr_version_major} -o \
         libspqr.so.%{spqr_version} ../SPQR/Lib/*.o \
-        -L%{_libdir}/atlas -L%{_libdir} -lcblas -llapack -ltbb -ltbbmalloc \
+        -L%{_libdir}/atlas -L%{_libdir} -lcblas -llapack %{?with_tbb:-ltbb -ltbbmalloc} \
         libcholmod.so.%{cholmod_version_major} -lm
     ln -sf libspqr.so.%{spqr_version} libspqr.so.%{spqr_version_major}
     ln -sf libspqr.so.%{spqr_version} libspqr.so
@@ -397,8 +394,11 @@ rm -rf ${RPM_BUILD_ROOT}
 %doc Doc/*
 
 %changelog
+* Tue Oct 11 2011 Dan Horák <dan[at]danny.cz> - 3.6.1-2
+- fix build without TBB
+
 * Fri Sep 23 2011 Deji Akingunola <dakingun at gmail.com> - 3.6.1-1
-- Update to 3.6.0
+- Update to 3.6.1
 - Fix undefine symbols in libspqr
 
 * Sun Feb 13 2011 Deji Akingunola <dakingun at gmail.com> - 3.6.0-3


More information about the scm-commits mailing list