]> git.pld-linux.org Git - packages/eigen3.git/blobdiff - eigen3.spec
- updated to 3.4.0
[packages/eigen3.git] / eigen3.spec
index 3ce96d402ae1e5c00c690bf8ee5f27dd208da710..b5aacee8b3558e8e9096606864bb8fb266f2ebbf 100644 (file)
@@ -1,15 +1,21 @@
+#
+# Conditional build:
+%bcond_with    tests           # make check (takes very long time, few tests fail)
+%bcond_without gdb             # GDB pretty printers
+
 Summary:       C++ template library for linear algebra
 Summary(pl.UTF-8):     Biblioteka szablonów C++ do algebry liniowej
 Name:          eigen3
-Version:       3.0.4
+Version:       3.4.0
 Release:       1
-License:       LGPL v3+ or GPL v2+
+License:       MPL v2.0 with LGPL v2.1+ parts
 Group:         Development/Libraries
-Source0:       http://bitbucket.org/eigen/eigen/get/%{version}.tar.bz2
-# Source0-md5: c4a403660311ad8d62a28c118883310f
-Patch0:                %{name}-buildtype.patch
+#Source0Download: http://eigen.tuxfamily.org/index.php?title=Main_Page
+Source0:       https://gitlab.com/libeigen/eigen/-/archive/%{version}/eigen-%{version}.tar.bz2
+# Source0-md5: 132dde48fe2b563211675626d29f1707
 URL:           http://eigen.tuxfamily.org/
-BuildRequires: cmake >= 2.6.2
+BuildRequires: cmake >= 3.5.0
+%{?with_gdb:BuildRequires:     python-modules}
 BuildRequires: rpmbuild(macros) >= 1.605
 Requires:      libstdc++-devel
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -46,29 +52,81 @@ Obsługuje bez powielania kodu i w całkowicie zintegrowany sposób:
    algebry liniowej, geometrii, kwaternionów i zaawansowanych operacji
    na tablicach.
 
+%package gdb
+Summary:       eigen3 pretty printers for GDB
+Summary(pl.UTF-8):     Funkcje wypisujące dane eigen3 dla GDB
+Group:         Development/Debuggers
+
+%description gdb
+This package contains Python scripts for GDB pretty printing of the
+eigen3 types/containers.
+To use it add:
+
+python
+from eigen3.printers import register_eigen_printers
+register_eigen_printers (None)
+end
+
+to a ~/.gdbinit file.
+
+%description gdb -l pl.UTF-8
+Ten pakiet zawiera skrypty Pythona dla GDB służące do ładnego
+wypisywania typów i kontenerów eigen3.
+Aby użyć skryptów trzeba dodać:
+
+python
+from eigen3.printers import register_eigen_printers
+register_eigen_printers (None)
+end
+
+do pliku ~/.gdbinit .
+
 %prep
-%setup -q -n eigen-eigen-13a11181fc5a
-%patch0 -p1
+%setup -q -n eigen-%{version}
 
 %build
 install -d build
 cd build
+# CMakeLists.txt requires CMAKE_INSTALL_INCLUDEDIR to be relative (for proper .pc file generation)
 %cmake .. \
        -DCMAKE_CXX_COMPILER_WORKS=1 \
-       -DCMAKE_CXX_COMPILER="%{__cc}"
+       -DCMAKE_CXX_COMPILER="%{__cxx}" \
+       -DCMAKE_INSTALL_DATADIR:PATH=share \
+       -DCMAKE_INSTALL_INCLUDEDIR:PATH=include
 
 %{__make}
 
+%if %{with tests}
+%{__make} check
+%endif
+
 %install
 rm -rf $RPM_BUILD_ROOT
 
 %{__make} -C build install \
        DESTDIR=$RPM_BUILD_ROOT
 
+%if %{with gdb}
+install -D debug/gdb/printers.py $RPM_BUILD_ROOT%{_datadir}/gdb/python/%{name}/printers.py
+touch $RPM_BUILD_ROOT%{_datadir}/gdb/python/%{name}/__init__.py
+%py_comp $RPM_BUILD_ROOT%{_datadir}/gdb/python/%{name}
+%py_ocomp $RPM_BUILD_ROOT%{_datadir}/gdb/python/%{name}
+%py_postclean %{_datadir}/gdb/python/%{name}
+%endif
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
+%doc COPYING.BSD COPYING.MINPACK COPYING.README README.md
 %{_includedir}/eigen3
 %{_npkgconfigdir}/eigen3.pc
+%dir %{_datadir}/eigen3
+%{_datadir}/eigen3/cmake
+
+%if %{with gdb}
+%files gdb
+%defattr(644,root,root,755)
+%{_datadir}/gdb/python/%{name}
+%endif
This page took 0.082513 seconds and 4 git commands to generate.