Группа :: Разработка/C++
Пакет: eigen3
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
%define oname eigen
Name: %{oname}3
Version: 3.4.0
Release: alt2.1
Summary: C++ template library for linear algebra
License: LGPLv3+ or GPLv2+
Group: Development/C++
Url: http://eigen.tuxfamily.org/
Source: %name-%version.tar
Packager: Andrey Cherepanov <cas at altlinux.org>
# Install FindEigen3.cmake
# Fix pkg-config file
Patch1: eigen_pkgconfig.patch
# Fix the include paths in the new Eigen3Config.cmake file
Patch2: eigen3-3.3.1-fixcmake.patch
# Avoid SSE4.2/AVX on e2k
Patch3: eigen3-3.4.0-alt-e2k.patch
# Temporarily disable EIGEN_ALTIVEC_DISABLE_MMA on PPC64le
Patch4: eigen_mma.patch
BuildRequires(pre): cmake
BuildRequires(pre): rpm-build-ninja
BuildRequires: libsuitesparse-devel libscotch-devel libgoogle-sparsehash
BuildRequires: gcc-c++ doxygen
BuildRequires: libsuperlu-devel libmpfr-devel libgmp-devel
BuildRequires: libfftw3-devel libGLU-devel libgsl-devel gcc-fortran
BuildRequires: liblapack-devel libglew-devel libGLUT-devel libXi-devel
BuildRequires: libXmu-devel libmetis-devel libXres-devel
BuildRequires: libXcomposite-devel libXdamage-devel libXdmcp-devel
BuildRequires: libXft-devel libxkbfile-devel libXpm-devel
BuildRequires: libXScrnSaver-devel libXxf86misc-devel libXxf86vm-devel
BuildRequires: boost-devel
# TODO: add devel subpackage and move stuff
Provides: %{name}-devel = %EVR
Provides: %{oname}-devel = %EVR
%description
Eigen is a C++ template library for linear algebra: matrices, vectors,
numerical solvers, and related algorithms.
%package docs
Summary: Documentation for Eigen3
Group: Development/Documentation
BuildArch: noarch
#BuildArch: noarch
%description docs
Eigen is a C++ template library for linear algebra: matrices, vectors,
numerical solvers, and related algorithms.
This package contains development documentation for Eigen.
%package examples
Summary: Examples for Eigen3
Group: Development/Documentation
%description examples
Eigen is a C++ template library for linear algebra: matrices, vectors,
numerical solvers, and related algorithms.
This package contains examples for Eigen.
%prep
%setup
%patch1 -p1
%patch2 -p0 -b .fixcmake
%ifarch %e2k
%patch3 -p2 -b .e2k
# crashes with a bus error
rm -f unsupported/doc/examples/BVH_Example.cpp
%endif
%ifarch ppc64le
%patch4 -p1
%endif
%build
export PATH=$PATH:%_libdir/pastix/bin
%cmake -GNinja \
-Wno-dev \
-DINCLUDE_INSTALL_DIR=%_includedir/%name \
-DPKGCONFIG_INSTALL_DIR=%_libdir/pkgconfig \
-DCMAKEPACKAGE_INSTALL_DIR=%_libdir/cmake/%name \
-DOpenGL_GL_PREFERENCE=GLVND \
-DCHOLMOD_INCLUDES=%_includedir/suitesparse \
-DUMFPACK_INCLUDES=%_includedir/suitesparse \
-DEIGEN_TEST_NOQT=ON \
-DSUPERLU_LIBRARIES=-lsuperlu_4.0 \
-DCMAKE_STRIP="/bin/echo" \
-DGOOGLEHASH_INCLUDES="%_includedir/google" \
-DGOOGLEHASH_COMPILE="g++ %optflags" \
-DMETIS_INCLUDE_DIRS=%_includedir/metis
%cmake_build
%cmake_build -t doc
%install
%cmake_install
install -d %buildroot%_bindir
cd %_cmake__builddir
rm -fR doc/examples/CMakeFiles doc/examples/*.out \
doc/examples/*.cmake
install -m755 doc/examples/* %buildroot%_bindir
cd -
%files
%_includedir/*
%_pkgconfigdir/*
%_libdir/cmake/%name
%files examples
%_bindir/*
%doc doc/examples/*
%files docs
%doc %_cmake__builddir/doc/html/*
%changelog
…
Полный changelog можно просмотреть здесь
Name: %{oname}3
Version: 3.4.0
Release: alt2.1
Summary: C++ template library for linear algebra
License: LGPLv3+ or GPLv2+
Group: Development/C++
Url: http://eigen.tuxfamily.org/
Source: %name-%version.tar
Packager: Andrey Cherepanov <cas at altlinux.org>
# Install FindEigen3.cmake
# Fix pkg-config file
Patch1: eigen_pkgconfig.patch
# Fix the include paths in the new Eigen3Config.cmake file
Patch2: eigen3-3.3.1-fixcmake.patch
# Avoid SSE4.2/AVX on e2k
Patch3: eigen3-3.4.0-alt-e2k.patch
# Temporarily disable EIGEN_ALTIVEC_DISABLE_MMA on PPC64le
Patch4: eigen_mma.patch
BuildRequires(pre): cmake
BuildRequires(pre): rpm-build-ninja
BuildRequires: libsuitesparse-devel libscotch-devel libgoogle-sparsehash
BuildRequires: gcc-c++ doxygen
BuildRequires: libsuperlu-devel libmpfr-devel libgmp-devel
BuildRequires: libfftw3-devel libGLU-devel libgsl-devel gcc-fortran
BuildRequires: liblapack-devel libglew-devel libGLUT-devel libXi-devel
BuildRequires: libXmu-devel libmetis-devel libXres-devel
BuildRequires: libXcomposite-devel libXdamage-devel libXdmcp-devel
BuildRequires: libXft-devel libxkbfile-devel libXpm-devel
BuildRequires: libXScrnSaver-devel libXxf86misc-devel libXxf86vm-devel
BuildRequires: boost-devel
# TODO: add devel subpackage and move stuff
Provides: %{name}-devel = %EVR
Provides: %{oname}-devel = %EVR
%description
Eigen is a C++ template library for linear algebra: matrices, vectors,
numerical solvers, and related algorithms.
%package docs
Summary: Documentation for Eigen3
Group: Development/Documentation
BuildArch: noarch
#BuildArch: noarch
%description docs
Eigen is a C++ template library for linear algebra: matrices, vectors,
numerical solvers, and related algorithms.
This package contains development documentation for Eigen.
%package examples
Summary: Examples for Eigen3
Group: Development/Documentation
%description examples
Eigen is a C++ template library for linear algebra: matrices, vectors,
numerical solvers, and related algorithms.
This package contains examples for Eigen.
%prep
%setup
%patch1 -p1
%patch2 -p0 -b .fixcmake
%ifarch %e2k
%patch3 -p2 -b .e2k
# crashes with a bus error
rm -f unsupported/doc/examples/BVH_Example.cpp
%endif
%ifarch ppc64le
%patch4 -p1
%endif
%build
export PATH=$PATH:%_libdir/pastix/bin
%cmake -GNinja \
-Wno-dev \
-DINCLUDE_INSTALL_DIR=%_includedir/%name \
-DPKGCONFIG_INSTALL_DIR=%_libdir/pkgconfig \
-DCMAKEPACKAGE_INSTALL_DIR=%_libdir/cmake/%name \
-DOpenGL_GL_PREFERENCE=GLVND \
-DCHOLMOD_INCLUDES=%_includedir/suitesparse \
-DUMFPACK_INCLUDES=%_includedir/suitesparse \
-DEIGEN_TEST_NOQT=ON \
-DSUPERLU_LIBRARIES=-lsuperlu_4.0 \
-DCMAKE_STRIP="/bin/echo" \
-DGOOGLEHASH_INCLUDES="%_includedir/google" \
-DGOOGLEHASH_COMPILE="g++ %optflags" \
-DMETIS_INCLUDE_DIRS=%_includedir/metis
%cmake_build
%cmake_build -t doc
%install
%cmake_install
install -d %buildroot%_bindir
cd %_cmake__builddir
rm -fR doc/examples/CMakeFiles doc/examples/*.out \
doc/examples/*.cmake
install -m755 doc/examples/* %buildroot%_bindir
cd -
%files
%_includedir/*
%_pkgconfigdir/*
%_libdir/cmake/%name
%files examples
%_bindir/*
%doc doc/examples/*
%files docs
%doc %_cmake__builddir/doc/html/*
%changelog
…
Полный changelog можно просмотреть здесь