source: projects/specs/trunk/s/suitesparse/suitesparse-vl.spec @ 9410

Revision 9410, 15.6 KB checked in by inagaki, 9 years ago (diff)

2015-03-05 Ryoichi INAGAKI <ryo1@…>

  • opencv, suitesparse: rebuilt with tbb
  • pcre: updated with security fix
  • tbb: new


Line 
1Name:           suitesparse
2Version:        4.3.1
3Release:        2%{?_dist_release}
4Summary:        A collection of sparse matrix libraries
5Summary(ja):    疎行列ライブラリ集
6
7Group:          System Environment/Libraries
8License:        LGPLv2+ and GPLv2+
9URL:            http://www.cise.ufl.edu/research/sparse/SuiteSparse
10
11Source0:        http://www.cise.ufl.edu/research/sparse/SuiteSparse/SuiteSparse-%{version}.tar.gz
12# Move #include <math.h> out of StuiteSparse_config.h and into SuiteSparse_config.c
13Patch0:         suitesparse-math.patch
14
15BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root
16BuildRequires:  blas-devel
17BuildRequires:  lapack-devel
18%ifnarch s390 s390x
19BuildRequires:  tbb-devel
20%global with_tbb 1
21%endif
22
23%description
24suitesparse is a collection of libraries for computations involving sparse
25matrices.  The package includes the following libraries:
26  AMD                 approximate minimum degree ordering
27  BTF                 permutation to block triangular form (beta)
28  CAMD                constrained approximate minimum degree ordering
29  COLAMD              column approximate minimum degree ordering
30  CCOLAMD             constrained column approximate minimum degree ordering
31  CHOLMOD             sparse Cholesky factorization
32  CSparse             a concise sparse matrix package
33  CXSparse            CSparse extended: complex matrix, int and long int support
34  KLU                 sparse LU factorization, primarily for circuit simulation
35  LDL                 a simple LDL factorization
36  SQPR                a multithread, multifrontal, rank-revealing sparse QR
37                      factorization method
38  UMFPACK             sparse LU factorization
39  SuiteSparse_config  configuration file for all the above packages.
40  RBio                read/write files in Rutherford/Boeing format
41
42%package devel
43Summary:        Development headers for SuiteSparse
44Summary(ja):    SuiteSparse の開発用ヘッダファイル集
45Group:          Development/Libraries
46Requires:       %{name} = %{version}-%{release}
47
48%description devel
49The suitesparse-devel package contains files needed for developing
50applications which use the suitesparse libraries.
51
52
53%package static
54Summary:        Static version of SuiteSparse libraries
55Summary(ja):    SuiteSparse の静的ライブラリ
56Group:          Development/Libraries
57Requires:       %{name}-devel = %{version}-%{release}
58
59%description static
60The suitesparse-static package contains the statically linkable
61version of the suitesparse libraries.
62
63#'
64
65%prep
66%setup -q -n SuiteSparse
67%patch0 -p1 -b .math
68
69%build
70%define amd_version 2.4.0
71%define amd_version_major 2
72%define btf_version 1.2.0
73%define btf_version_major 1
74%define camd_version 2.4.0
75%define camd_version_major 2
76%define ccolamd_version 2.9.0
77%define ccolamd_version_major 2
78%define cholmod_version 3.0.1
79%define cholmod_version_major 3
80%define colamd_version 2.9.0
81%define colamd_version_major 2
82%define csparse_version 3.1.3
83%define csparse_version_major 3
84%define cxsparse_version 3.1.3
85%define cxsparse_version_major 3
86%define klu_version 1.3.0
87%define klu_version_major 1
88%define ldl_version 2.2.0
89%define ldl_version_major 2
90%define rbio_version 2.2.0
91%define rbio_version_major 2
92%define spqr_version 1.3.3
93%define spqr_version_major 1
94%define SuiteSparse_config_ver 4.3.1
95%define SuiteSparse_config_major 4
96%define umfpack_version 5.7.0
97%define umfpack_version_major 5
98### CHOLMOD can also be compiled to use the METIS library, but it is not
99### used here because its licensing terms exclude it from Fedora Extras.
100### To compile with METIS, define enable_metis as 1 below.
101%define enable_metis 0
102### CXSparse is a superset of CSparse, and the two share common header
103### names, so it does not make sense to build both. CXSparse is built
104### by default, but CSparse can be built instead by defining
105### enable_csparse as 1 below.
106%define enable_csparse 0
107
108mkdir -p Doc/{AMD,BTF,CAMD,CCOLAMD,CHOLMOD,COLAMD,KLU,LDL,UMFPACK,SPQR,RBio} Lib Include
109
110# SuiteSparse_config needs to come first
111pushd SuiteSparse_config
112  make CFLAGS="$RPM_OPT_FLAGS -fPIC"
113  ar x libsuitesparseconfig.a
114  pushd ../Lib
115    gcc -shared -Wl,-soname,libsuitesparseconfig.so.%{SuiteSparse_config_major} -o \
116        libsuitesparseconfig.so.%{SuiteSparse_config_ver} ../SuiteSparse_config/*.o -lm
117    ln -sf libsuitesparseconfig.so.%{SuiteSparse_config_ver} libsuitesparseconfig.so.%{SuiteSparse_config_major}
118    ln -sf libsuitesparseconfig.so.%{SuiteSparse_config_ver} libsuitesparseconfig.so
119    cp -p ../SuiteSparse_config/*.a ./
120  popd
121  cp -p *.h ../Include
122popd
123
124pushd AMD
125  pushd Lib
126    make CFLAGS="$RPM_OPT_FLAGS -fPIC"
127  popd
128  pushd ../Lib
129    gcc -shared -Wl,-soname,libamd.so.%{amd_version_major} -o \
130        libamd.so.%{amd_version} ../AMD/Lib/*.o \
131        libsuitesparseconfig.so.%{SuiteSparse_config_major} -lm
132    ln -sf libamd.so.%{amd_version} libamd.so.%{amd_version_major}
133    ln -sf libamd.so.%{amd_version} libamd.so
134    cp -p ../AMD/Lib/*.a ./
135  popd
136  cp -p Include/*.h ../Include
137  cp -p README.txt Doc/License Doc/ChangeLog Doc/*.pdf ../Doc/AMD
138popd
139
140pushd BTF
141  pushd Lib
142    make CFLAGS="$RPM_OPT_FLAGS -fPIC"
143  popd
144  pushd ../Lib
145    gcc -shared -Wl,-soname,libbtf.so.%{btf_version_major} -o \
146        libbtf.so.%{btf_version} ../BTF/Lib/*.o
147    ln -sf libbtf.so.%{btf_version} libbtf.so.%{btf_version_major}
148    ln -sf libbtf.so.%{btf_version} libbtf.so
149    cp -p ../BTF/Lib/*.a ./
150  popd
151  cp -p Include/*.h ../Include
152  cp -p README.txt Doc/* ../Doc/BTF
153popd
154
155pushd CAMD
156  pushd Lib
157    make CFLAGS="$RPM_OPT_FLAGS -fPIC"
158  popd
159  pushd ../Lib
160    gcc -shared -Wl,-soname,libcamd.so.%{camd_version_major} -o \
161        libcamd.so.%{camd_version} ../CAMD/Lib/*.o \
162        libsuitesparseconfig.so.%{SuiteSparse_config_major} -lm
163    ln -sf libcamd.so.%{camd_version} libcamd.so.%{camd_version_major}
164    ln -sf libcamd.so.%{camd_version} libcamd.so
165    cp -p ../CAMD/Lib/*.a ./
166  popd
167  cp -p Include/*.h ../Include
168  cp -p README.txt Doc/ChangeLog Doc/License Doc/*.pdf ../Doc/CAMD
169popd
170
171pushd CCOLAMD
172  pushd Lib
173    make CFLAGS="$RPM_OPT_FLAGS -fPIC"
174  popd
175  pushd ../Lib
176    gcc -shared -Wl,-soname,libccolamd.so.%{ccolamd_version_major} -o \
177        libccolamd.so.%{ccolamd_version} ../CCOLAMD/Lib/*.o \
178        libsuitesparseconfig.so.%{SuiteSparse_config_major} -lm
179    ln -sf libccolamd.so.%{ccolamd_version} libccolamd.so.%{ccolamd_version_major}
180    ln -sf libccolamd.so.%{ccolamd_version} libccolamd.so
181    cp -p ../CCOLAMD/Lib/*.a ./
182  popd
183  cp -p Include/*.h ../Include
184  cp -p README.txt Doc/* ../Doc/CCOLAMD
185popd
186
187pushd COLAMD
188  pushd Lib
189    make CFLAGS="$RPM_OPT_FLAGS -fPIC"
190  popd
191  pushd ../Lib
192    gcc -shared -Wl,-soname,libcolamd.so.%{colamd_version_major} -o \
193        libcolamd.so.%{colamd_version} ../COLAMD/Lib/*.o \
194        libsuitesparseconfig.so.%{SuiteSparse_config_major} -lm
195    ln -sf libcolamd.so.%{colamd_version} libcolamd.so.%{colamd_version_major}
196    ln -sf libcolamd.so.%{colamd_version} libcolamd.so
197    cp -p ../COLAMD/Lib/*.a ./
198  popd
199  cp -p Include/*.h ../Include
200  cp -p README.txt Doc/* ../Doc/COLAMD
201popd
202
203%if "%{?enable_metis}" == "1"
204CHOLMOD_FLAGS="$RPM_OPT_FLAGS -I%{_includedir}/metis -fPIC"
205%else
206CHOLMOD_FLAGS="$RPM_OPT_FLAGS -DNPARTITION -fPIC"
207%endif
208pushd CHOLMOD
209  pushd Lib
210    make CFLAGS="$CHOLMOD_FLAGS"
211  popd
212  pushd ../Lib
213    gcc -shared -Wl,-soname,libcholmod.so.%{cholmod_version_major} -o \
214        libcholmod.so.%{cholmod_version} ../CHOLMOD/Lib/*.o \
215        libamd.so.%{amd_version_major} \
216        libcamd.so.%{camd_version_major} libcolamd.so.%{colamd_version_major} \
217        libccolamd.so.%{ccolamd_version_major} \
218        libsuitesparseconfig.so.%{SuiteSparse_config_major} -lm \
219        -llapack -lblas -lgfortran
220#        -L%{_libdir}/atlas %{atlaslibs} \
221    ln -sf libcholmod.so.%{cholmod_version} libcholmod.so.%{cholmod_version_major}
222    ln -sf libcholmod.so.%{cholmod_version} libcholmod.so
223    cp -p ../CHOLMOD/Lib/*.a ./
224  popd
225  cp -p Include/*.h ../Include
226  cp -p README.txt Doc/*.pdf ../Doc/CHOLMOD
227  cp -p Cholesky/License.txt ../Doc/CHOLMOD/Cholesky_License.txt
228  cp -p Core/License.txt ../Doc/CHOLMOD/Core_License.txt
229  cp -p MatrixOps/License.txt ../Doc/CHOLMOD/MatrixOps_License.txt
230  cp -p Partition/License.txt ../Doc/CHOLMOD/Partition_License.txt
231  cp -p Supernodal/License.txt ../Doc/CHOLMOD/Supernodal_License.txt
232popd
233
234%if "%{?enable_csparse}" == "1"
235pushd CSparse
236  pushd Source
237    make CFLAGS="$RPM_OPT_FLAGS -fPIC"
238    cp -p cs.h ../../Include
239  popd
240  pushd ../Lib
241    gcc -shared -Wl,-soname,libcsparse.so.%{csparse_version_major} -o \
242        libcsparse.so.%{csparse_version} ../CSparse/Source/*.o -lm
243    ln -sf libcsparse.so.%{csparse_version} libcsparse.so.%{csparse_version_major}
244    ln -sf libcsparse.so.%{csparse_version} libcsparse.so
245    cp -p ../CSparse/Source/*.a ./
246  popd
247  mkdir ../Doc/CSparse/
248  cp -p Doc/* ../Doc/CSparse
249popd
250
251%else
252pushd CXSparse
253  pushd Lib
254    make CFLAGS="$RPM_OPT_FLAGS -fPIC"
255  popd
256  pushd ../Lib
257    gcc -shared -Wl,-soname,libcxsparse.so.%{cxsparse_version_major} -o \
258        libcxsparse.so.%{cxsparse_version} ../CXSparse/Lib/*.o -lm
259    ln -sf libcxsparse.so.%{cxsparse_version} libcxsparse.so.%{cxsparse_version_major}
260    ln -sf libcxsparse.so.%{cxsparse_version} libcxsparse.so
261    cp -p ../CXSparse/Lib/*.a ./
262  popd
263  cp -p Include/cs.h ../Include
264  mkdir ../Doc/CXSparse/
265  cp -p Doc/* ../Doc/CXSparse
266popd
267%endif
268
269pushd KLU
270  pushd Lib
271    make CFLAGS="$RPM_OPT_FLAGS -fPIC"
272  popd
273  pushd ../Lib
274    gcc -shared -Wl,-soname,libklu.so.%{klu_version_major} -o \
275        libklu.so.%{klu_version} ../KLU/Lib/*.o \
276        libamd.so.%{amd_version_major} libcolamd.so.%{colamd_version_major} \
277        libbtf.so.%{btf_version_major} \
278        libsuitesparseconfig.so.%{SuiteSparse_config_major}
279    ln -sf libklu.so.%{klu_version} libklu.so.%{klu_version_major}
280    ln -sf libklu.so.%{klu_version} libklu.so
281    cp -p ../KLU/Lib/*.a ./
282  popd
283  cp -p Include/*.h ../Include
284  cp -p README.txt Doc/lesser.txt ../Doc/KLU
285popd
286
287pushd LDL
288  pushd Lib
289    make CFLAGS="$RPM_OPT_FLAGS -fPIC"
290  popd
291  pushd ../Lib
292    gcc -shared -Wl,-soname,libldl.so.%{ldl_version_major} -o \
293        libldl.so.%{ldl_version} ../LDL/Lib/*.o
294    ln -sf libldl.so.%{ldl_version} libldl.so.%{ldl_version_major}
295    ln -sf libldl.so.%{ldl_version} libldl.so
296    cp -p ../LDL/Lib/*.a ./
297  popd
298  cp -p Include/*.h ../Include
299  cp -p README.txt Doc/ChangeLog Doc/lesser.txt Doc/*.pdf ../Doc/LDL
300popd
301
302pushd UMFPACK
303  pushd Lib
304    make CFLAGS="$RPM_OPT_FLAGS -fPIC"
305  popd
306  pushd ../Lib
307    gcc -shared -Wl,-soname,libumfpack.so.%{umfpack_version_major} -o \
308        libumfpack.so.%{umfpack_version} ../UMFPACK/Lib/*.o \
309        libamd.so.%{amd_version_major} \
310        libcholmod.so.%{cholmod_version_major} \
311        libsuitesparseconfig.so.%{SuiteSparse_config_major} -lm \
312        -llapack -lblas -lgfortran
313#        -L%{_libdir}/atlas %{atlaslibs} \
314    ln -sf libumfpack.so.%{umfpack_version} libumfpack.so.%{umfpack_version_major}
315    ln -sf libumfpack.so.%{umfpack_version} libumfpack.so
316    cp -p ../UMFPACK/Lib/*.a ./
317  popd
318  cp -p Include/*.h ../Include
319  cp -p README.txt Doc/License Doc/ChangeLog Doc/gpl.txt Doc/*.pdf ../Doc/UMFPACK
320popd
321
322pushd SPQR
323  pushd Lib
324    make CFLAGS="$RPM_OPT_FLAGS %{?with_tbb:-DHAVE_TBB} -DNPARTITION -fPIC"
325  popd
326  pushd ../Lib
327    g++ -shared -Wl,-soname,libspqr.so.%{spqr_version_major} -o \
328        libspqr.so.%{spqr_version} ../SPQR/Lib/*.o \
329        -L%{_libdir} \
330        %{?with_tbb:-ltbb} \
331        libcholmod.so.%{cholmod_version_major} \
332        libsuitesparseconfig.so.%{SuiteSparse_config_major} -lm \
333        -llapack -lblas -lgfortran
334#        -L%{_libdir}/atlas -L%{_libdir} %{atlaslibs} \
335    ln -sf libspqr.so.%{spqr_version} libspqr.so.%{spqr_version_major}
336    ln -sf libspqr.so.%{spqr_version} libspqr.so
337    cp -p ../SPQR/Lib/*.a ./
338  popd
339  cp -p Include/*.h* ../Include
340  cp -p README{,_SPQR}.txt
341  cp -p README_SPQR.txt Doc/* ../Doc/SPQR
342popd
343
344pushd RBio
345  pushd Lib
346    make CFLAGS="$RPM_OPT_FLAGS -fPIC"
347  popd
348  pushd ../Lib
349    gcc -shared -Wl,-soname,librbio.so.%{rbio_version_major} -o \
350        librbio.so.%{rbio_version} ../RBio/Lib/*.o \
351        libsuitesparseconfig.so.%{SuiteSparse_config_major}
352    ln -sf librbio.so.%{rbio_version} librbio.so.%{rbio_version_major}
353    ln -sf librbio.so.%{rbio_version} librbio.so
354    cp -p ../RBio/Lib/*.a ./
355  popd
356  cp -p Include/*.h ../Include
357  cp -p README.txt Doc/ChangeLog Doc/License.txt ../Doc/RBio
358popd
359
360%install
361rm -rf ${RPM_BUILD_ROOT}
362mkdir -p ${RPM_BUILD_ROOT}%{_libdir}
363mkdir -p ${RPM_BUILD_ROOT}%{_includedir}/%{name}
364pushd Lib
365  for f in *.a *.so*; do
366    cp -a $f ${RPM_BUILD_ROOT}%{_libdir}/$f
367  done
368popd
369pushd Include
370  for f in *.h *.hpp;  do
371    cp -a $f ${RPM_BUILD_ROOT}%{_includedir}/%{name}/$f
372  done
373popd
374
375
376%clean
377rm -rf ${RPM_BUILD_ROOT}
378
379%post -p /sbin/ldconfig
380
381%postun -p /sbin/ldconfig
382
383
384%files
385%defattr(-,root,root)
386%doc Doc/*
387%{_libdir}/lib*.so.*
388
389%files devel
390%defattr(-,root,root)
391%{_includedir}/%{name}
392%{_libdir}/lib*.so
393
394%files static
395%defattr(-,root,root)
396%{_libdir}/lib*.a
397
398
399%changelog
400* Thu Mar  5 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 4.3.1-2
401- built with tbb 4.3u3
402
403* Tue Feb 17 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 4.3.1-1
404- updated to 4.3.1
405
406* Thu Mar 15 2012 NAKAMURA Kenta <kenta@vinelinux.org> 3.7.0-1
407- Updated to 3.7.0
408
409* Mon Dec 01 2008 NAKAMURA Kenta <kenta@vinelinux.org> 3.6.1-1
410- Updated to 3.6.1
411
412* Sat Oct 11 2008 Shu KONNO <owa@bg.wakwak.com> 3.1.0-3vl5
413- applied new versioning policy
414
415* Wed Jan 02 2008 NAKAMURA Kenta <kenta@vinelinux.org> 3.1.0-2vl1
416- New release.
417
418* Wed Jan 02 2008 NAKAMURA Kenta <kenta@vinelinux.org> 3.0.0-2vl1
419- Rebuild for VineSeed
420
421* Fri Aug 24 2007 Quentin Spencer <qspencer@users.sourceforge.net> 3.0.0-2
422- Rebuild for F8.
423
424* Tue Jul  3 2007 Quentin Spencer <qspencer@users.sourceforge.net> 3.0.0-1
425- Change package name to match upstream, including provides and obsoletes.
426- New release. Numerous changes in build to reflect source reorganization.
427- Moved static libs into separate package.
428
429* Mon Oct 16 2006 Quentin Spencer <qspencer@users.sourceforge.net> 2.1.1-1
430- New release, and package name change from UFsparse to SuiteSparse. Fixes
431  bug #210846. Keep the ufsparse package name for now.
432
433* Thu Sep  7 2006 Quentin Spencer <qspencer@users.sourceforge.net> 2.1.0-1
434- New release. Increment versions of some libraries.
435- Rearrange and clean up spec file so all definitions are in one place.
436
437* Mon Aug  7 2006 Quentin Spencer <qspencer@users.sourceforge.net> 2.0.0-1
438- New release.
439- Build newly added CAMD library.
440- Misc minor spec changes.
441
442* Tue Mar  7 2006 Quentin Spencer <qspencer@users.sourceforge.net> 1.2-1
443- New release.
444- Build newly added library CXSparse (but not CSparse--see comments
445  in build section).
446
447* Wed Feb 15 2006 Quentin Spencer <qspencer@users.sourceforge.net> 0.93-2
448- Rebuild for Fedora Extras 5.
449
450* Thu Feb  9 2006 Quentin Spencer <qspencer@users.sourceforge.net> 0.93-1
451- New release. Remove old patch.
452
453* Wed Dec 14 2005 Quentin Spencer <qspencer@users.sourceforge.net> 0.92-2
454- Add patch0--fixes LDL/Makefile so CFLAGS are used when compiling ldl.a.
455
456* Wed Dec 14 2005 Quentin Spencer <qspencer@users.sourceforge.net> 0.92-1
457- Update to Dec 8 2005 version.
458
459* Tue Oct 25 2005 Quentin Spencer <qspencer@users.sourceforge.net> 0.91-2
460- Rebuild.
461
462* Tue Oct 18 2005 Quentin Spencer <qspencer@users.sourceforge.net> 0.91-1
463- New upstream release, incorporating previous patches
464- chmod the build directory to ensure all headers are world readable
465
466* Fri Oct 07 2005 Quentin Spencer <qspencer@users.sourceforge.net> 0.9-3
467- Build cholmod, but disable METIS using -DNPARTITION flag.
468
469* Sat Oct 01 2005 Quentin Spencer <qspencer@users.sourceforge.net> 0.9-2
470- Modify description, other modifications for import into FE.
471- Add dist tag, cosmetic changes.
472
473* Tue Sep 08 2005 David Bateman <dbateman@free.fr> 0.9-1
474- First version.
Note: See TracBrowser for help on using the repository browser.