]> git.pld-linux.org Git - packages/eigen.git/blob - eigen.spec
- trick cmake not to require unneeded c++ compiler
[packages/eigen.git] / eigen.spec
1
2 Summary:        template library for linear algebra
3 Name:           eigen
4 Version:        2.0.52
5 Release:        1
6 License:        GPL v2
7 Group:          Libraries
8 Source0:        http://bitbucket.org/eigen/eigen2/get/default.tar.bz2
9 # Source0-md5:  b15d5cdb7b02a59eabde849412e9d0c4
10 URL:            http://eigen.tuxfamily.org/index.php?title=Main_Page
11 BuildRequires:  cmake >= 2.6.2
12 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
13
14 %description
15 Eigen is a C++ template library for linear algebra: vectors, matrices,
16 and related algorithms. It is:
17
18 - Versatile. (See modules and tutorial). Eigen handles, without code
19   duplication, and in a completely integrated way: o both fixed-size and
20   dynamic-size matrices and vectors. o both dense and sparse (the latter
21   is still experimental) matrices and vectors. o both plain
22   matrices/vectors and abstract expressions. o both column-major (the
23   default) and row-major matrix storage. o both basic matrix/vector
24   manipulation and many more advanced, specialized modules providing
25   algorithms for linear algebra, geometry, quaternions, or advanced
26   array manipulation.
27 - Fast. (See benchmark). o Expression templates allow to intelligently
28   remove temporaries and enable lazy evaluation, when that is
29   appropriate -- Eigen takes care of this automatically and handles
30   aliasing too in most cases. o Explicit vectorization is performed for
31   the SSE (2 and later) and AltiVec instruction sets, with graceful
32   fallback to non-vectorized code. Expression templates allow to perform
33   these optimizations globally for whole expressions. o With fixed-size
34   objects, dynamic memory allocation is avoided, and the loops are
35   unrolled when that makes sense. o For large matrices, special
36   attention is paid to cache-friendliness.
37 - Elegant. (See API showcase). The API is extremely clean and
38   expressive, thanks to expression templates. Implementing an algorithm
39   on top of Eigen feels like just copying pseudocode. You can use
40   complex expressions and still rely on Eigen to produce optimized code:
41   there is no need for you to manually decompose expressions into small
42   steps.
43 - Compiler-friendy. Eigen has very reasonable compilation times at
44   least with GCC, compared to other C++ libraries based on expression
45   templates and heavy metaprogramming. Eigen is also standard C++ and
46   supports various compilers.
47
48 %package devel
49 Summary:        Header files for eigen2 library
50 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki eigen2
51 Group:          Development/Libraries
52 Requires:       %{name} = %{version}-%{release}
53
54 %description devel
55 Header files for eigen2 library.
56
57 %description devel -l pl.UTF-8
58 Pliki nagłówkowe biblioteki eigen2
59
60 %prep
61 %setup -q -n %{name}2
62
63 %build
64 install -d build
65 cd build
66 %cmake \
67         -DCMAKE_INSTALL_PREFIX=%{_prefix} \
68         -DCMAKE_CXX_COMPILER_WORKS=1 \
69         -DCMAKE_CXX_COMPILER="%{__cc}" \
70         ../
71 %{__make}
72
73 %install
74 rm -rf $RPM_BUILD_ROOT
75
76 %{__make} -C build install \
77         DESTDIR=$RPM_BUILD_ROOT
78
79 install -d $RPM_BUILD_ROOT/%{_pkgconfigdir}
80 cp build/eigen2.pc $RPM_BUILD_ROOT/%{_pkgconfigdir}
81
82 %clean
83 rm -rf $RPM_BUILD_ROOT
84
85 %files
86 %defattr(644,root,root,755)
87 %{_includedir}/eigen2
88
89 %files devel
90 %defattr(644,root,root,755)
91 %{_pkgconfigdir}/eigen2.pc
This page took 0.04515 seconds and 3 git commands to generate.