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