]>
Commit | Line | Data |
---|---|---|
63a0bbb0 BS |
1 | # |
2 | # Conditional build: | |
1b86d2d6 | 3 | %bcond_with tests # make check (takes very long time, few tests fail) |
63a0bbb0 BS |
4 | %bcond_without gdb # GDB pretty printers |
5 | ||
86cdc95d JB |
6 | Summary: C++ template library for linear algebra |
7 | Summary(pl.UTF-8): Biblioteka szablonów C++ do algebry liniowej | |
8 | Name: eigen3 | |
1b86d2d6 | 9 | Version: 3.2.5 |
63a0bbb0 | 10 | Release: 1 |
86cdc95d JB |
11 | License: LGPL v3+ or GPL v2+ |
12 | Group: Development/Libraries | |
3859e214 | 13 | #Source0Download: http://eigen.tuxfamily.org/index.php?title=Main_Page |
fd4e6ee4 | 14 | Source0: https://bitbucket.org/eigen/eigen/get/%{version}.tar.bz2 |
1b86d2d6 | 15 | # Source0-md5: 21a928f6e0f1c7f24b6f63ff823593f5 |
86cdc95d JB |
16 | Patch0: %{name}-buildtype.patch |
17 | URL: http://eigen.tuxfamily.org/ | |
46a7de9a | 18 | BuildRequires: cmake >= 2.8.2 |
63a0bbb0 | 19 | %{?with_gdb:BuildRequires: python-modules} |
86cdc95d JB |
20 | BuildRequires: rpmbuild(macros) >= 1.605 |
21 | Requires: libstdc++-devel | |
22 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
23 | ||
24 | %description | |
25 | Eigen is a C++ template library for linear algebra: vectors, matrices, | |
26 | and related algorithms. It is versatile, fast, elegant and | |
27 | compiler-friendly. | |
28 | ||
29 | Eigen handles, without code duplication and in a completely integrated | |
30 | way: | |
31 | - both fixed-size and dynamic-size matrices and vectors | |
32 | - both dense and sparse (the latter is still experimental) matrices | |
33 | and vectors | |
34 | - both plain matrices/vectors and abstract expressions | |
35 | - both column-major (the default) and row-major matrix storage | |
36 | - both basic matrix/vector manipulation and many more advanced, | |
37 | specialized modules providing algorithms for linear algebra, | |
38 | geometry, quaternions, or advanced array manipulation. | |
39 | ||
40 | %description -l pl.UTF-8 | |
41 | Eigen to biblioteka szablonów C++ do algebry liniowej: wektorów, | |
42 | macierzy i związanych z nimi algorytmów. Jest elastyczna, szybka, | |
43 | elegancka i przyjazna dla kompilatorów. | |
44 | ||
45 | Obsługuje bez powielania kodu i w całkowicie zintegrowany sposób: | |
46 | - macierze i wektory o stałym i dynamicznym rozmiarze | |
47 | - macierze i wektory gęste i rzadkie (te drugie jeszcze | |
48 | eksperymentalnie) | |
49 | - zwykłe macierze/wektory jak i abstrakcyjne wyrażenia | |
50 | - przechowywanie danych kolumnowe (domyślne) oraz wierszowe | |
51 | - podstawowe operacje na macierzach/wektorach, jak i wiele | |
52 | bardziej zaawansowanych, specjalizowanych modułów z algorytmami | |
53 | algebry liniowej, geometrii, kwaternionów i zaawansowanych operacji | |
54 | na tablicach. | |
55 | ||
63a0bbb0 BS |
56 | %package gdb |
57 | Summary: eigen3 pretty printers for GDB | |
58 | Summary(pl.UTF-8): Funkcje wypisujące dane eigen3 dla GDB | |
59 | Group: Development/Debuggers | |
60 | ||
61 | %description gdb | |
62 | This package contains Python scripts for GDB pretty printing of the | |
63 | eigen3 types/containers. | |
64 | To use it add: | |
65 | ||
66 | python | |
67 | from eigen3.printers import register_eigen_printers | |
68 | register_eigen_printers (None) | |
69 | end | |
70 | ||
71 | to a ~/.gdbinit file. | |
72 | ||
73 | %description gdb -l pl.UTF-8 | |
74 | Ten pakiet zawiera skrypty Pythona dla GDB służące do ładnego | |
75 | wypisywania typów i kontenerów eigen3. | |
76 | Aby użyć skryptów trzeba dodać: | |
77 | ||
78 | python | |
79 | from eigen3.printers import register_eigen_printers | |
80 | register_eigen_printers (None) | |
81 | end | |
82 | ||
83 | do pliku ~/.gdbinit . | |
84 | ||
86cdc95d | 85 | %prep |
1b86d2d6 | 86 | %setup -q -n eigen-eigen-bdd17ee3b1b3 |
86cdc95d JB |
87 | %patch0 -p1 |
88 | ||
89 | %build | |
90 | install -d build | |
91 | cd build | |
92 | %cmake .. \ | |
93 | -DCMAKE_CXX_COMPILER_WORKS=1 \ | |
46a7de9a | 94 | -DCMAKE_CXX_COMPILER="%{__cxx}" |
86cdc95d JB |
95 | |
96 | %{__make} | |
97 | ||
63a0bbb0 | 98 | %if %{with tests} |
1b86d2d6 | 99 | %{__make} check |
63a0bbb0 BS |
100 | %endif |
101 | ||
86cdc95d JB |
102 | %install |
103 | rm -rf $RPM_BUILD_ROOT | |
104 | ||
105 | %{__make} -C build install \ | |
106 | DESTDIR=$RPM_BUILD_ROOT | |
107 | ||
63a0bbb0 BS |
108 | %if %{with gdb} |
109 | install -D debug/gdb/printers.py $RPM_BUILD_ROOT%{_datadir}/gdb/python/%{name}/printers.py | |
110 | touch $RPM_BUILD_ROOT%{_datadir}/gdb/python/%{name}/__init__.py | |
111 | %py_comp $RPM_BUILD_ROOT%{_datadir}/gdb/python/%{name} | |
112 | %py_ocomp $RPM_BUILD_ROOT%{_datadir}/gdb/python/%{name} | |
113 | %py_postclean %{_datadir}/gdb/python/%{name} | |
114 | %endif | |
115 | ||
86cdc95d JB |
116 | %clean |
117 | rm -rf $RPM_BUILD_ROOT | |
118 | ||
119 | %files | |
120 | %defattr(644,root,root,755) | |
121 | %{_includedir}/eigen3 | |
122 | %{_npkgconfigdir}/eigen3.pc | |
63a0bbb0 BS |
123 | |
124 | %if %{with gdb} | |
125 | %files gdb | |
126 | %defattr(644,root,root,755) | |
127 | %{_datadir}/gdb/python/%{name} | |
128 | %endif |