LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File eigen3.spec of Package eigen3 (Project home:phradecky:HugsAlpha)

#
# spec file for package eigen3
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           eigen3
Version:        3.2.2
Release:        0
Summary:        C++ Template Library for Linear Algebra
License:        MPL-2.0 and LGPL-2.1+ and BSD-3-Clause
Group:          Development/Libraries/C and C++
Url:            http://eigen.tuxfamily.org/
#DL-URL: http://bitbucket.org/eigen/eigen/get/%{version}.tar.bz2
Source0:        eigen-%{version}.tar.bz2
#Patch0:         0001-Disable-Altivec-for-ppc64le.patch
#Patch1:         0001-Do-stack-allignment-on-ppc.patch
BuildRequires:  adolc-devel
BuildRequires:  cmake
BuildRequires:  doxygen
BuildRequires:  fdupes
BuildRequires:  fftw3-devel
BuildRequires:  gcc-c++
BuildRequires:  gcc-fortran
BuildRequires:  gmp-devel
%if 0%{?suse_version} > 1210
BuildRequires:  gnu-free-fonts
%else
BuildRequires:  freefont
%endif
BuildRequires:  freeglut-devel
BuildRequires:  glew-devel
BuildRequires:  graphviz
BuildRequires:  graphviz-gd
BuildRequires:  gsl-devel
BuildRequires:  libqt4-devel
%if 0%{?suse_version} > 1310
BuildRequires:  metis-devel
%endif
BuildRequires:  mpfr-devel
BuildRequires:  pkg-config
BuildRequires:  pkgconfig(gl)
%if 0%{?suse_version} > 1220
BuildRequires:  sparsehash-devel
%endif
%if 0%{?suse_version} > 1210
BuildRequires:  suitesparse-devel
%endif
BuildRequires:  superlu
%if 0%{?suse_version} > 1220
BuildRequires:  texlive-amsfonts
%endif
BuildRequires:  texlive-latex
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Eigen is a C++ template library for linear algebra: matrices, vectors,
numerical solvers, and related algorithms.

%package devel
Summary:        C++ Template Library for Linear Algebra
Group:          Development/Libraries/C and C++
# libeigen3-devel was last used at openSUSE 13.1 (version 3.2.0)
Provides:       libeigen3-devel = %{version}
Obsoletes:      libeigen3-devel < %{version}

%description devel
Eigen is a C++ template library for linear algebra: matrices, vectors,
numerical solvers, and related algorithms.

%prep
%setup -q -n eigen-eigen-1306d75b4a21
#%patch0 -p1
#%patch1 -p1

# Fix rpmlint warning "wrong-file-end-of-line-encoding"
sed -i 's/\r$//' COPYING.MINPACK

# Remove build time references so build-compare can do its work
echo "HTML_TIMESTAMP = NO" >> doc/Doxyfile.in

%build
mkdir build
cd build
cmake \
  -DCMAKE_INSTALL_PREFIX=%{_prefix} ..
make %{?_smp_mflags} VERBOSE=1
%if 0%{?suse_version} > 1140
make doc %{?_smp_mflags} VERBOSE=1
%endif
cd ..

%install
%make_install -C build

# Manually install documentation in order to fix rpmlint error "files-duplicated-waste" and warning "files-duplicate" with fdupes macro
mkdir -p %{buildroot}%{_docdir}/%{name}-devel
%if 0%{?suse_version} > 1140
cp -a build/doc/html/ %{buildroot}%{_docdir}/%{name}-devel/
%endif
cp -a COPYING.* %{buildroot}%{_docdir}/%{name}-devel/

%fdupes -s %{buildroot}

%files devel
%defattr(-,root,root,-)
%doc %{_docdir}/%{name}-devel/
%{_includedir}/eigen3/
%{_datadir}/pkgconfig/eigen3.pc

%changelog